Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Feature request: adding arduino-cli option to set warning level (--warnings <level>) #1746

Description

@da-phil

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions