See discussion #1508
The arduino-cli has a CLI option --warnings string Optional, can be: none, default, more, all. Used to tell gcc which warning level to use (-W flag). (default "none") to set which warning compiler flags are used during compilation.
As a reminder, those are:
["compiler.warning_flags",""],
["compiler.warning_flags.none", ""],
["compiler.warning_flags.all",""],
["compiler.warning_flags.extra",""]
In previous vscode-arduino versions somehow it was possible to set this option via buildPreferences:
"buildPreferences": [
["compiler.warning_level", "all"]
]
However this does not work anymore, as those are directly parsed to ``--build-property STRING` CLI options, see here:
|
if (this.useArduinoCli()) { |
Can we either also expose this CLI option to the vscode-arduino plug-in (clean approach) or add a special case for compiler.warning_level when parsing buildPreferences to set
["--warnings", `${key}=${value}`]);
which is not so clean and rather a "temporary" solution 😇 .
What do you think?