Skip to content

Enable all warnings as errors - #862

Merged
NicolasFussberger merged 8 commits into
eclipse-score:mainfrom
etas-contrib:feature/enable-all-warnings-as-errors
Oct 27, 2026
Merged

NicolasFussberger merged 8 commits into
eclipse-score:mainfrom
etas-contrib:feature/enable-all-warnings-as-errors

Conversation

@cameron-craig-etas

@cameron-craig-etas cameron-craig-etas commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

#683

This PR enables warnings as errors for the list of warnings defined in score_cpp_policies.

  • Warnings as errors are enforced for production code, and integration test code.
  • Warnings are enabled for unit test code, but they remain warnings (not warnings as errors).
  • For a successful build we rely on a recent change to baselibs, so we are using an unreleased commit hash until a release is available.
  • We do what we can to ignore warnings from external sources, by setting the below config, but this does not ignore external warnings from headers that we include into our own build targets.
    build --per_file_copt=external/.*@-w
    build --host_per_file_copt=external/.*@-w
    
  • All remaining warnings are fixed to allow the build to succeed.

@cameron-craig-etas
cameron-craig-etas force-pushed the feature/enable-all-warnings-as-errors branch from 6fd37e4 to 274d6c0 Compare October 26, 2026 13:58
@cameron-craig-etas
cameron-craig-etas force-pushed the feature/enable-all-warnings-as-errors branch from 519e288 to dab74dd Compare October 27, 2026 08:57
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-862: https://eclipse-score.github.io/lifecycle/pr-862/

@danth danth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes look good to me.

Are the warnings disabled also for integration tests as well as unit tests?

@cameron-craig-etas

Copy link
Copy Markdown
Contributor Author

All changes look good to me.

Are the warnings disabled also for integration tests as well as unit tests?

The warnings actually enabled for integration tests. And the tests currently seem to be passing without any warnings. So I would be tempted to keep warnings as errors here. We are currently only removing the warnings as errors for the lm_cc_test wrapper.

@danth

danth commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

OK. I think we should aim to resolve all warnings in the unit tests too eventually

@cameron-craig-etas

Copy link
Copy Markdown
Contributor Author

OK. I think we should aim to resolve all warnings in the unit tests too eventually

Yes I was thinking the same. I just didn't want to open that can of worms in this PR 😆

@NicolasFussberger
NicolasFussberger added this pull request to the merge queue Oct 27, 2026
Merged via the queue into eclipse-score:main with commit fc81f78 Oct 27, 2026
17 of 21 checks passed
@NicolasFussberger
NicolasFussberger deleted the feature/enable-all-warnings-as-errors branch October 27, 2026 13:37
@github-project-automation github-project-automation Bot moved this from Backlog to Done in LCM - Lifecycle & Health FT Oct 27, 2026

This branch was successfully deployed

1 active deployment
workflow-approval — 90b238ed Deployed Oct 27, 2026 by cameron-craig-etas via Build and test unit-tests-arm64-qnx / approval #1836
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants