-
I'm struggling to get megalinter to respect any options that I pass inline. Here's my current attempt: npx mega-linter-runner -e "'JSON_REPORTER=true'" -e "'JSON_REPORTER_FILE_NAME=./bob.json'" -e "'TEXT_REPORTER=false'" -e "'SARIF_REPORTER=false'" -e "'TAP_REPORTER=false'" -e "'DISABLE_LINTERS=SPELL_CSPELL'" -e "'DISABLE_LINTERS=SPELL_MISSPELL'" -e "'DISABLE_LINTERS=COPYPASTE_JSCPD'" -e "'DISABLE_LINTERS=CREDENTIALS_SECRETLINT'" -e "'DISABLE=true'" I don't want to have a configuration file, but pass options with flags. Why is it not working? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@pessi-v please can you share your command log ? |
Beta Was this translation helpful? Give feedback.
-
Pulling docker image oxsecurity/megalinter:v8 ... What's next:
========================================================== ------------------------------------ MegaLinter, by OX Security ------------------------------------
The MegaLinter documentation can be found at: MegaLinter initialization [Activation] ACTION_ACTIONLINT has been set inactive, as subdirectory has not been found: .github/workflows (set value "any" to always activate) MegaLinter now collects the files to analyse
+----MATCHING LINTERS-------------------+------------------------------------------------------------------------+----------------+------------+ ..... [Updated Sources Reporter] No source file has been formatted or fixed +----SUMMARY----+--------------------------+---------------+-------+-------+--------+----------+--------------+ �[34mYou could have same capabilities but better runtime performances if you use a MegaLinter flavor:�[0m
[JSON Reporter] Generated JSON report: /tmp/lint/megalinter-reports/./bob.json |
Beta Was this translation helpful? Give feedback.
-
I've solved the problem: It appears, that only the last -e option for any env variable will be used, so if you want to disable multiple linters, you'd have to use -e "'DISABLE_LINTERS=SPELL_CSPELL,SPELL_MISSPELL'" not -e "'DISABLE_LINTERS=SPELL_CSPELL'" -e "'DISABLE_LINTERS=SPELL_MISSPELL'" |
Beta Was this translation helpful? Give feedback.
I've solved the problem:
It appears, that only the last -e option for any env variable will be used, so if you want to disable multiple linters, you'd have to use
-e "'DISABLE_LINTERS=SPELL_CSPELL,SPELL_MISSPELL'"
not
-e "'DISABLE_LINTERS=SPELL_CSPELL'" -e "'DISABLE_LINTERS=SPELL_MISSPELL'"