addons-linter icon indicating copy to clipboard operation
addons-linter copied to clipboard

Add ability to ignore files during linting

Open pdehaan opened this issue 4 years ago β€’ 6 comments

Describe the problem and steps to reproduce it:

Ref: https://github.com/mozilla/web-ext/issues/1770

When using web-ext, it looks like I can ignore files using an --ignore-files="" flag. I can't find a similar flag/API for the addons-linter.

What happened?

No API.

What did you expect to happen?

API for file ignoring (since I want to ignore a 3rd party vendor file).

Anything else we should know?

npx addons-linter --version # 1.14.0

┆Issue is synchronized with this Jira Task

pdehaan avatar Nov 27 '19 19:11 pdehaan

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.

stale[bot] avatar May 25 '20 19:05 stale[bot]

@rpl WDYT?

willdurand avatar Jun 23 '20 14:06 willdurand

@willdurand @pdehaan web-ext does integrate addons-linter as a library and to implement its --ignore-files cli option is passing to the addons-linter a function through the shouldScanFile option, and so shouldScanfile is technically the API to achieve the same thing when using the addons-linter npm package as an npm module in other projects.

It looks that there is also an explicit mention to the shouldScanfile and to scanFile options in the README.md:

  • https://github.com/mozilla/addons-linter#linter-api-usage

And so this should already be supported, maybe we should tweak that section in the readme to make it more visible?

rpl avatar Jun 23 '20 15:06 rpl

And so this should already be supported, maybe we should tweak that section in the readme to make it more visible?

Right, updating the README sounds good.

willdurand avatar Jun 23 '20 15:06 willdurand

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.

stale[bot] avatar Dec 28 '20 04:12 stale[bot]

And so this should already be supported, maybe we should tweak that section in the readme to make it more visible?

Right, updating the README sounds good.

S because of this ^

willdurand avatar Jul 14 '22 07:07 willdurand