megalinter icon indicating copy to clipboard operation
megalinter copied to clipboard

Request new MegaLinter flavor

Open sammcj opened this issue 1 year ago • 9 comments

MegaLinter would run faster on my project if I had a flavor containing the following list of linters:

ACTION_ACTIONLINT, EDITORCONFIG_EDITORCONFIG_CHECKER, JAVASCRIPT_ES, JAVASCRIPT_STANDARD, JSON_JSONLINT, JSON_ESLINT_PLUGIN_JSONC, JSON_V8R, JSON_PRETTIER, MARKDOWN_MARKDOWNLINT, MARKDOWN_MARKDOWN_LINK_CHECK, MARKDOWN_MARKDOWN_TABLE_FORMATTER, REPOSITORY_DEVSKIM, REPOSITORY_DUSTILOCK, REPOSITORY_GIT_DIFF, REPOSITORY_GITLEAKS, REPOSITORY_SECRETLINT, REPOSITORY_SEMGREP, REPOSITORY_SYFT, REPOSITORY_TRIVY, YAML_PRETTIER, YAML_YAMLLINT, YAML_V8R

Would it be possible to create one ? Thanks :relaxed:

sammcj avatar Jul 28 '22 02:07 sammcj

It seems like we should probably add a few linters to the existing JavaScript flavor. I have noticed a similar issue with the Python flavor where some of the recently added linters that should probably be included in it aren't.

Kurt-von-Laven avatar Jul 28 '22 19:07 Kurt-von-Laven

@Kurt-von-Laven which ones ? :)

nvuillam avatar Jul 30 '22 23:07 nvuillam

I haven't investigated every flavor, but I get this error message when I try using the v6 JavaScript flavor:

MegaLinter flavor [javascript] does not contain linters REPOSITORY_DEVSKIM,REPOSITORY_DUSTILOCK,REPOSITORY_SYFT.
As they are not available in this docker image, they will not be processed
To solve this problem, please either: 
- use default flavor oxsecurity/megalinter
- add ignored linters in DISABLE or DISABLE_LINTERS variables in your .mega-linter.yml config file located in your root directory
- ignore this message by setting config variable FLAVOR_SUGGESTIONS to false
Missing linter and FAIL_IF_MISSING_LINTER_IN_FLAVOR has been set to "true": Stop run

Same deal when I use the Python flavor:

MegaLinter flavor [python] does not contain linters REPOSITORY_DEVSKIM,REPOSITORY_DUSTILOCK,REPOSITORY_SYFT.
As they are not available in this docker image, they will not be processed
To solve this problem, please either: 
- use default flavor oxsecurity/megalinter
- add ignored linters in DISABLE or DISABLE_LINTERS variables in your .mega-linter.yml config file located in your root directory
- ignore this message by setting config variable FLAVOR_SUGGESTIONS to false
Missing linter and FAIL_IF_MISSING_LINTER_IN_FLAVOR has been set to "true": Stop run

Kurt-von-Laven avatar Jul 31 '22 00:07 Kurt-von-Laven

I think the message spears for itself ^^ FLAVOR_SUGGESTIONS: false should do the job :)

Message Missing linter and FAIL_IF_MISSING_LINTER_IN_FLAVOR has been set to "true": Stop run appears only if FAIL_IF_MISSING_LINTER_IN_FLAVOR has been set to true (it's false by default)

nvuillam avatar Jul 31 '22 00:07 nvuillam

To clarify, we aren't in need of a workaround. I am just suggesting that if Devskim, Dustilock, and Syft all run on all files, then they should probably be included in all flavors (as opposed to creating brand new flavors that contain them).

Kurt-von-Laven avatar Jul 31 '22 01:07 Kurt-von-Laven

I've added them for ox.security requirements, I think they should not make all ML images heavier ^^

nvuillam avatar Jul 31 '22 01:07 nvuillam

Oh, gotcha. It seems like FAIL_IF_MISSING_FLAVOR_IN_LINTER should have exceptions for these linters then or something since otherwise the config option will false positive on every flavor.

Kurt-von-Laven avatar Jul 31 '22 03:07 Kurt-von-Laven

@Kurt-von-Laven good idea, done in next AutoUpdate linters PR :)

nvuillam avatar Jul 31 '22 08:07 nvuillam

@sammcj does that address your request?

Kurt-von-Laven avatar Jul 31 '22 08:07 Kurt-von-Laven

I think that now the use of Javascript flavor should match the repo :) ( since MegaLinter v6.6.0)

Please reopen if there is still an issue :)

nvuillam avatar Aug 22 '22 14:08 nvuillam

Sorry @Kurt-von-Laven I missed the notification for your message 🤦 , Yes it does. Thanks all!!

sammcj avatar Aug 23 '22 00:08 sammcj