Skip to content

Configurable linter commands#4482

Merged
nvuillam merged 10 commits intomainfrom
configurable-linter-commands
Jan 19, 2025
Merged

Configurable linter commands#4482
nvuillam merged 10 commits intomainfrom
configurable-linter-commands

Conversation

@bdovaz
Copy link
Copy Markdown
Collaborator

@bdovaz bdovaz commented Jan 10, 2025

Resolves #4015

Let's see what you think @nvuillam

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 10, 2025

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ API spectral 1 0 1.71s
⚠️ BASH bash-exec 6 1 0.02s
✅ BASH shellcheck 6 0 0.19s
✅ BASH shfmt 6 0 0 0.19s
✅ COPYPASTE jscpd yes no 2.86s
✅ DOCKERFILE hadolint 129 0 23.5s
✅ JSON jsonlint 20 0 0.22s
✅ JSON v8r 22 0 15.85s
⚠️ MARKDOWN markdownlint 267 0 303 21.55s
✅ MARKDOWN markdown-table-formatter 267 0 0 160.82s
⚠️ PYTHON bandit 215 66 2.79s
✅ PYTHON black 215 0 0 3.9s
✅ PYTHON flake8 215 0 1.86s
✅ PYTHON isort 215 0 0 0.7s
✅ PYTHON mypy 215 0 15.67s
✅ PYTHON pylint 215 0 18.32s
✅ PYTHON ruff 215 0 0 0.29s
✅ REPOSITORY checkov yes no 32.9s
✅ REPOSITORY git_diff yes no 0.2s
⚠️ REPOSITORY grype yes 26 13.07s
✅ REPOSITORY secretlint yes no 11.81s
✅ REPOSITORY trivy yes no 16.59s
✅ REPOSITORY trivy-sbom yes no 0.28s
⚠️ REPOSITORY trufflehog yes 1 53.71s
✅ SPELL cspell 718 0 11.95s
⚠️ SPELL lychee 349 17 39.1s
✅ XML xmllint 3 0 0 0.26s
✅ YAML prettier 160 0 0 2.99s
✅ YAML v8r 102 0 26.04s
✅ YAML yamllint 161 0 2.73s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@nvuillam
Copy link
Copy Markdown
Member

@bdovaz please can you explain what you do ?

It's not that obvious when quickly reading the PR updated files :/

cc @echoix

@echoix
Copy link
Copy Markdown
Collaborator

echoix commented Jan 12, 2025

I didn't really understood the issue nor this fix..

@bdovaz
Copy link
Copy Markdown
Collaborator Author

bdovaz commented Jan 12, 2025

  • The pre/post commands at linter level have a new bool option called parallel with default value to true so that it is not a breaking change.
  • The aforementioned option makes these commands that have the value as false to be executed before/after executing the linters in parallel.
  • Inside the function that makes the linters to be called in parallel the commands with the value to true are executed.
  • If at global level the value of parallel is set to false which makes the linters to be executed sequentially, they ignore the value of the parallel command of the linter and all of the commands are executed.

cc @echoix

@nvuillam
Copy link
Copy Markdown
Member

@bdovaz i get it, it seems nice :)

Please can you

@bdovaz
Copy link
Copy Markdown
Collaborator Author

bdovaz commented Jan 18, 2025

@nvuillam done! Check if I haven't screwed up by refactoring the command and having to invert the bool.

Thanks!

cc @echoix

Copy link
Copy Markdown
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz check comments :)
As it is impacting, I'd also like a double-check from @echoix :)

@bdovaz
Copy link
Copy Markdown
Collaborator Author

bdovaz commented Jan 19, 2025

Ready!

cc @nvuillam @echoix

Copy link
Copy Markdown
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, thanks @bdovaz :)

@nvuillam nvuillam merged commit 995935c into main Jan 19, 2025
@nvuillam nvuillam deleted the configurable-linter-commands branch January 19, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error installing prettier plugin with pre commands

3 participants