I wish this would also prevent creating PRs that don’t pass the lint rules. It reduces churn on PR reviewers.
You could use something like https://github.com/typicode/husky to prevent a push if the linter fails.
GitHub Super Linter: one linter to rule them all
11–20 of 360 posts
Re: GitHub Super Linter: one linter to rule them all
#12I wish this would also prevent creating PRs that don’t pass the lint rules. It reduces churn on PR reviewers.
You could use something like https://github.com/typicode/husky to prevent a push if the linter fails.
Re: GitHub Super Linter: one linter to rule them all
#13I get why it's probably not ideal as a local tool, and integration with Status API is nice and all, but I personally prefer to see devs linting their code before pushing for review.
Correction: it can run locally in Docker, as pointed out below: https://github.com/github/super-linter/blob/master/docs/run-...
Re: GitHub Super Linter: one linter to rule them all
#14Earlier quoted context omitted.
You could use something like https://github.com/typicode/husky to prevent a push if the linter fails.
My (small) issue with git hooks, is that they need be installed everywhere for them to be 100% enforced. Works fine for small teams, but doesn’t scale that well beyond that.
If you're trying to enforce something locally you can definitely enforce it on CI automatically. Once people realized their PRs were failing due to linting issues they started checking them locally as well.
Re: GitHub Super Linter: one linter to rule them all
#15Is it? In my company I maintain a set of exemplars for all of our commonly used repository types. When someone wants to make a new one they just copy and paste stuff from one of the exemplars.
Over the years I've come to value "white box" code re-use over "black box" re-use. In my experience many projects will outgrow their tools and need custom tooling, so it makes sense to keep the black boxes tiny and copy over large tooling in a white box fashion. For example, what if I want to change the Python linter for Pylint to flake8? I'll need a separate fork of superlinter or something. I'd prefer to just edit the tooling that is build in to my project.
Re: GitHub Super Linter: one linter to rule them all
#16A problem I can see with this super linter is that it seems be written exclusively for GitHub Actions; there's no local install option. (I didn't read the code, maybe you can use lib/linter.sh directly, but it's certainly not directly supported.) So contributors have to rely on the CI feedback loop to see if their changes are compliant (insert fencing comic here)... Or more realistically, still use whatever linters t…
Re: GitHub Super Linter: one linter to rule them all
#17A problem I can see with this super linter is that it seems be written exclusively for GitHub Actions; there's no local install option. (I didn't read the code, maybe you can use lib/linter.sh directly, but it's certainly not directly supported.) So contributors have to rely on the CI feedback loop to see if their changes are compliant (insert fencing comic here)... Or more realistically, still use whatever linters t…
Re: GitHub Super Linter: one linter to rule them all
#18Yay for (some) Perl support! The Perl validation seems to be restricted to "compile with warnings", despite "perlcritic" being now almost 15 years old, predating both some other linters' and even some other languages' very existence. I'll try to see how feasible it'd be to add it as a ("the"?) Perl linter to be used as using just the compilation step to infer everything's fine doesn't really satisfy the role a linter…
Re: GitHub Super Linter: one linter to rule them all
#19I imagine the latter is possible thanks to it being a docker image.
So far I've been using this script I built for similar purposes:
https://gist.github.com/silviogutierrez/3dca60a6b5b8fe214052...
Runs locally, and only on changed files against master. Fixes all my python, JS, yaml, terraform, etc. And you can run it against a single file too so I integrated it with vim to replace all my linters.
I really hope the GitHub initiative projects takes off as a standard API (à la language server) for linters and fixers. Seems every single IDE needs to reinvent a plugin for applying a specific linter.
Re: GitHub Super Linter: one linter to rule them all
#20A problem I can see with this super linter is that it seems be written exclusively for GitHub Actions; there's no local install option. (I didn't read the code, maybe you can use lib/linter.sh directly, but it's certainly not directly supported.) So contributors have to rely on the CI feedback loop to see if their changes are compliant (insert fencing comic here)... Or more realistically, still use whatever linters t…
Hi, there is a local run option with instructions here: https://github.com/github/super-linter/blob/master/docs/run-...