Skip to content

Add the ability to mute some rules #205

@bblanchon

Description

@bblanchon

Hi,

Thank you for this excellent tool 👍

I wish I could include it in my GitHub workflow, but unfortunately, rule LP012 fails for my library
Indeed, the name of my library starts with Arduino; I created it at a time when this prefix was allowed for unofficial libraries.

Please add a command-line flag (and a setting in arduino-lint-action) that allows the user to exclude or mute some rules.
Thanks!!!

Best regards,
Benoit

Activity

per1234

per1234 commented on Jul 15, 2021

@per1234
Contributor

Hi @bblanchon. Thanks for your kind words and interest in Arduino Lint!

unfortunately, rule LP012 fails for my library

If you add the --library-manager=update flag to the arduino-lint command line (or set the arduino/arduino-lint-action action's library-manager: update input), violations of rule LP012 only result in a warning. It was configured to not be an error for this very situation of libraries that have been "grandfathered" due to being in the Library Manager index prior to the instatement of the rule about the use of the "Arduino" library name prefix.

The LP012 warning is perhaps a bit annoying in the case where a library name is too well established to allow for it to be changed, but at least it will not result in a unwarranted linting failure.

Please add a command-line flag (and a setting in arduino-lint-action) that allows the user to exclude or mute some rules.

Some of the groundwork for this has been laid with the assignment of dedicated IDs to each rule, but I am reluctant to add this feature. I always prefer "opinionated" linters and formatters because it encourages consistency and eliminates the tedious discussions about configuration preferences that can derail attempts to start using such a tool on a project.

So my thought was to wait to see whether a strong need was shown for disabling rules before giving any consideration to adding the feature. What I have seen so far is that we are not having any serious problems when using Arduino Lint in "specification" compliance mode, but a small number of rule violations that can not be resolved are blocking us from using the tool in my preferred "strict" compliance mode in quite a few projects.

self-assigned this
on Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftype: enhancementProposed improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @bblanchon@per1234

      Issue actions

        Add the ability to mute some rules · Issue #205 · arduino/arduino-lint