-
Notifications
You must be signed in to change notification settings - Fork 1k
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 instructions to lint locally #2217
Conversation
@@ -0,0 +1,7 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does this file get used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just manually, documented in docs/contribute.md
. I can put the command directly in the doc instead if preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me wondering should we just use the dotnet-format
and ignore the super-linter
altogether or the reverse way.
Want to make sure the linter workflow
and the dev.sh format
lines up with each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under the hood, super-linter
uses dotnet-format
. It'll also read the ./src/.editorconfig
settings the same as dotnet-format
.
Being new to C#, I couldn't find any high usage GitHub Actions on the marketplace for dotnet-format
specific linting. If there's one you're familiar with that'll support both, let me know.
However, if we also wanted to enforce any lints on shell, cmd, pwsh, md, etc. files that also are in here, then super-linter supports all of them.
|
||
``` | ||
cd ./src | ||
./dev.(cmd|sh) format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
#!/bin/bash | ||
|
||
docker run \ | ||
-e RUN_LOCAL=true \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In dev.sh in function format(), can we now call lint.sh instead of dotnet-format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are couple of issues with this approach that we discussed, but just to summarise:
- Locally it's very slow
- Because of the way super-linter works with RUN_LOCAL flag it's impossible to lint only modified files. Additionally it's impossible not to use RUN_LOCAL locally :D
So overall I think we don't have any other choice but to continue with current process, that is linting as part of the pr build
Closing. Handled in #2436 |
No description provided.