Add flag to change compiler warnings #75
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for a
--compiler-warnings-all
flag tobuild_platform.py
. When set,arduino-cli compile ...
is run with--warnings all
. It does this in simple way, without an args-parsing library, which limits configurability.This is opt-in, where each library must add this flag. I'm interested in feedback and ideas about this decision.
Another option I'm considering is to making this the default, but maintaining two methods to opt-out.
build_platform.py
for all libraries that don't currently pass with the new setting. This list would shrink to zero eventually; nothing new should be added.--compiler-warnings-default
flag for libraries that really don't want this new setting. If an existing library will opt-out indefinitely, it should use the opt-out flag and be removed from the opt-out list inbuild_platform.py
See this PR which demonstrates how this can catch bugs for platforms (specifically ESP32) where "compiler.warning_flags=all" includes
-Werror
and can break.