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 instructions to lint locally #2217

Closed
wants to merge 11 commits into from
Closed

Conversation

cory-miller
Copy link
Contributor

No description provided.

@cory-miller cory-miller marked this pull request as ready for review October 24, 2022 18:39
@cory-miller cory-miller requested a review from a team as a code owner October 24, 2022 18:39
@@ -0,0 +1,7 @@
#!/bin/bash
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Contributor

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 \
Copy link
Contributor

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?

Copy link
Contributor

@JoannaaKL JoannaaKL left a 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:

  1. Locally it's very slow
  2. 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

@cory-miller
Copy link
Contributor Author

Closing. Handled in #2436

@cory-miller cory-miller deleted the user/cory-miller/lint-guide branch February 16, 2023 15:21
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.

4 participants