calyptia/fluent-linter-action

Option to exclude files/sections/lines from linting

patrick-stephens opened this issue · 1 comments

Add an option (with documented examples) on how to exclude at least files from linting but ideally lines or sections of plugin configuration. There is probably some horrible config glob we can come up with now to exclude files if they are named appropriately but I think a specific exclude option would be easier to use - we have an option to include and an option to exclude taking priority so we can include all files in a directory, with a naming convention, etc. but then exclude specific ones out of those.

Inline comments similar to Hadolint/Shellcheck would also be nice and possibly simpler.

A common example here would be the usage of the custom Grafana image which uses different configuration options for the Loki output plugin - these would trigger failures on the OSS Loki plugin and hence linting would fail.

Another example from me would be using a custom image or similar with configuration that will trigger "expected" warnings or errors - I want to ignore those and just flag new ones.

Add an option to exclude files from linting at the action configuration level. The linter will skip this file entirely. If something in the file is relied upon elsewhere (e.g. parser definition) then this may trigger a failure to keep it simple:

 - uses: fluent-bit-linter
   with:
     include: *.conf
     exclude: custom/, my-special-config.conf

We want an inline ignore syntax following Hadolint/Shellcheck to either ignore the whole file (at the top) or the next line:
# fluent-linter ignore