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

ci: add mega-linter for linting #834

Merged
merged 2 commits into from
Mar 11, 2024
Merged

ci: add mega-linter for linting #834

merged 2 commits into from
Mar 11, 2024

Conversation

eitsupi
Copy link
Collaborator

@eitsupi eitsupi commented Feb 23, 2024

No description provided.

Copy link
Collaborator

@etiennebacher etiennebacher left a comment

Choose a reason for hiding this comment

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

Why do we need this? From what I can see it will use lintr and cargo clippy for linting so what is the advantage of using this compared to our existing formatting tools in the taskfile? Does this push changes automatically?

@eitsupi
Copy link
Collaborator Author

eitsupi commented Feb 23, 2024

This is required for everything but R and Rust.
For example, there is often a problem with spaces at the end of the NEWS.md file, but such things are automatically detected.
It also includes parsing of things that are difficult to run locally, such as actionlint's inspection of GitHub Actions files.

Some linters have automatic fixes (auto commit), but I have turned them off for now.
This is because commit with GitHub default token does not trigger other actions and could stop things like R CMD check.

@etiennebacher
Copy link
Collaborator

Looks like a very big tool for not many linting usages (the workflow takes about 2min to lint yaml and markdown files and we don't have many of them). If I remember correctly, it was Prettier that fixed the Markdown spaces for you locally. Maybe we could add a format-other task that calls the Prettier CLI locally?

I see they also have a Github action, is it worth trying it as well?

@eitsupi
Copy link
Collaborator Author

eitsupi commented Feb 23, 2024

What I really want to run is editorconfg, but I can't find the proper action in GitHub Actions.

Yes, the execution time is relatively long, but it is far better than no check.

@eitsupi
Copy link
Collaborator Author

eitsupi commented Mar 10, 2024

@etiennebacher I want to merge this so can you please take a look?
(I am tired of having extra whitespace added to Markdown files being missed and merged.)

@etiennebacher etiennebacher marked this pull request as ready for review March 11, 2024 11:44
@etiennebacher
Copy link
Collaborator

I really think this is overkill for spaces in Markdown files. I merge it so we can move on but I'll open an issue to see if Prettier has a github action that is less massive

@etiennebacher etiennebacher merged commit ee6b7f9 into main Mar 11, 2024
17 of 18 checks passed
@etiennebacher etiennebacher deleted the trailing-whitespace branch March 11, 2024 11:44
@eitsupi
Copy link
Collaborator Author

eitsupi commented Mar 11, 2024

I really think this is overkill for spaces in Markdown files. I merge it so we can move on but I'll open an issue to see if Prettier has a github action that is less massive

I agree with that. However, what I am concerned about Mega-Linter is that it also reliably performs checks for things that are difficult to inspect locally, such as GitHub Actions.

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.

2 participants