-
Notifications
You must be signed in to change notification settings - Fork 942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior not supported, please either only include (VALIDATE=true) or exclude (VALIDATE=false) linters, but not both #5567
Comments
The error message matches what your configuration does incorrectly: you validate jscpd, and not mypy. You can either 1) enable them one by one: once a That's why you can't mix both, how would you distinguish between these two modes? By alphabetical order? By the first variable passed? How to keep the order? It doesn't make sense... So, in your environment vars: SUPER_LINTER_VALIDATE_PYTHON_MYPY: 'false'
SUPER_LINTER_VALIDATE_JSCPD: 'true' Choose one of them according to the scenario you want (all except one, or none except one), and remove either -e VALIDATE_PYTHON_MYPY=${SUPER_LINTER_VALIDATE_PYTHON_MYPY} Or -e VALIDATE_JSCPD=${SUPER_LINTER_VALIDATE_JSCPD}
From script:
- docker run -e RUN_LOCAL=true
-e LINTER_RULES_PATH=${SUPER_LINTER_RULES_PATH}
-e ACTIONS_RUNNER_DEBUG=${SUPER_LINTER_ACTIONS_RUNNER_DEBUG}
-e LOG_FILE=${SUPER_LINTER_LOG_FILE}
-e USE_FIND_ALGORITHM=${SUPER_LINTER_USE_FIND_ALGORITHM}
-e VALIDATE_PYTHON_MYPY=${SUPER_LINTER_VALIDATE_PYTHON_MYPY}
-e CREATE_LOG_FILE=${SUPER_LINTER_CREATE_LOG_FILE}
-e VALIDATE_JSCPD=${SUPER_LINTER_VALIDATE_JSCPD}
-v ${CI_PROJECT_DIR}:/tmp/lint ${SUPER_LINTER_DOCKER_IMAGE}
|
@echoix Thanks for the quick reaction! But how to disable MYPY and JSCPD both? |
You can have multiple linters set to false. Following your pattern (if the quoting works correctly) SUPER_LINTER_VALIDATE_PYTHON_MYPY: 'false'
SUPER_LINTER_VALIDATE_JSCPD: 'false'
That would mean you enable everything except these two, and new linters that would be added in next (minor) releases would be enabled too. |
Great, thank you! PS: Previous versions of GitLab (don't know about 16.7+) failed on parsing boolean env variables inside a yaml. So quoting was a solution. |
I've never really written any workflow/pipeline for GitLab yet, I just followed the contents of the config yaml. |
Thanks @echoix for your help here :) |
You're welcome everyone! It was an easy one here. |
Is there an existing issue for this?
Current Behavior
Hi, it's me again :) Pushed a changes in two groovy projects, using the latest image in our GitLab CI. First one is ok (pastebin), second is (pastebin):
I'm pretty sure I wasn't duplicate anything. Here is my GitLab CI extend:
Also .groovylintrc.json, .yaml-lint.yml and an empty .gitleaks.toml (only comments inside).
Looks like this is a v6.4.1 (iamge pull
ghcr.io/super-linter/super-linter:latest
).Really curious what's wrong?
I ran it once again in DEBUG mode (pastebin):
still no attempts to lint a only groovy file in
src/org.company
folder. I have switched to v6.4.0 and the error was the same but colored (BTW, why it's colored?):Also v6.3.1, v6.3.0, v6.2.0, v6.1.1, v6.1.0, v6.0.0...
I also removed my
.gitleaks.toml
:and continue searching for lower version. v5.7.2 is also failed.
Then I mentioned that
VALIDATE_JSCPD=false
in my first project (which is ok). So I turned off them and switched to the latest super-linter, it's pass!Any ideas about JSCPD?
Expected Behavior
Expected to start npm-groovy-lint at least, but looks like it's failed on JSCPD.
Super-Linter version
Relevant log output
Pastebin links are in 'Current Behavior' section.
Steps To Reproduce
The main problem this project can't be a public. But I have a project with the same language and project structure.
Anything else?
Don't know
¯\_(ツ)_/¯
The text was updated successfully, but these errors were encountered: