Skip to content
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

Add pre-commit to run as a standalone linter #3683

Open
ferrarimarco opened this issue Dec 22, 2022 · 3 comments
Open

Add pre-commit to run as a standalone linter #3683

ferrarimarco opened this issue Dec 22, 2022 · 3 comments
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label

Comments

@ferrarimarco
Copy link
Collaborator

ferrarimarco commented Dec 22, 2022

Is your feature request related to a problem? Please describe.

Pre-commit has quite a few useful (Python-based) hooks: https://github.com/pre-commit/pre-commit-hooks

We could (relatively) easily integrate it because it supports a standalone mode. Example:

pre-commit run --all-files

Describe the solution you'd like

Run pre-commit as part of super-linter

Additional context

We could also deprecate bash-exec, and rely on those pre-commit hooks instead.

@lindluni What do you think?

@ferrarimarco ferrarimarco added enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label labels Dec 22, 2022
@lindluni
Copy link
Contributor

lindluni commented Jan 5, 2023

I love this idea! Especially to replace bash-exec, but it would be great to pick up at least some of their out of the box hooks.

@ferrarimarco
Copy link
Collaborator Author

Using pre-commit would also open a way of eventually offloading some tasks. For example, instead of maintaining linter installation, we might leverage pre-commit hooks because pre-commit already knows how to install (some) things.

@tunayokumus
Copy link

tunayokumus commented Feb 17, 2023

This might be a bit off topic, so happy to create another PR if you want to tackle it separately...

Would you also consider adding a pre-commit-hook for super-linter? This way we wouldn't have to define various linters for each repo but we could only use super-linter in the pre-commit-config.yaml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label
Projects
None yet
Development

No branches or pull requests

3 participants