-
Notifications
You must be signed in to change notification settings - Fork 168
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
switch lint workflow to super-linter #323
Conversation
- line length 120 - move h1 to the first line
Inspection of all files locally yielded the following results.
It seems that there are some errors that should be ignored, so I will add additional configuration files later. RUN /rocker_scripts/install_rstudio.sh
RUN /rocker_scripts/install_pandoc.sh |
- .hadolint.yaml for Dockerfile - .jscpd.json for copy/paste detector - .lintr for R
Now.
If this gets merged, I would like to work on eliminating the above error that is occurring in the existing code. @cboettig What do you think about this linter workflow switching? |
Thanks, yeah this looks promising, though the configuration for Dockerfiles never to have consecutive RUN elements does feel over-zealous to me; sometimes it makes sense to have multiple layers. Overall though better-linted code would be a nice improvement to readability! |
Yes, this rule is the hadolint's "DL3059" and I set the config file to ignore this rule. 1ff0cd9 I have not been able to review all the errors because the super-linter log file is too long and difficult to read, but the errors that remain now are others. |
Nice, the proposed changes here to deploy super-linter and update the documentation at various points all looks good. As you know I'm not as familiar with linting tools outside of R / python toolset, but are there utilities that could auto-format the markdown and shell scripts? (similar to styler in R or black in python?) Probably wouldn't cover all issues, but might trim down the log of existing issues? |
I use VSCode as my main editor, so I use https://github.com/foxundermoon/vs-shell-format for shell scripts and https://github.com/yzhang-gh/vscode-markdown for Markdown. And, shellcheck supports automatic modification for some rules. https://github.com/DavidAnson/vscode-markdownlint, an extension for Markdownlint for VSCode, also seems to have an automatic modification function for some rules.
Yes, I believe some of the errors currently occurring in these auto-formats can be fixed automatically. |
Close #245
Switch to super-linter, which allows large numbers of linters to be used in a single workflow.
For example, this includes actionlint for GitHub Actions and lintr for R.
From my experience creating the GitHub Actions definition files for this repository, I feel that actionlint is really needed.
(I really don't often realize my mistakes until I run it and it fails!)
Because super-linter is maintained and popular by GitHub, there is little attention to pay to maintaining the workflow.
We have been using markdownlint/markdownlint as a linter for Markdown, but super-linter has DavidAnson/markdownlint built in.
Note that the format of the configuration file is different because of this. (
.mdlrc
v.s..markdownlint.jsonc
or.markdownlint.yaml
)All config files are here. https://github.com/github/super-linter/tree/main/TEMPLATES
Because of the large number of check items added by swiching the workflow, existing files will need to be modified in the future.
Since modifying everything in this PR would be a large amount of work, I edited only the
README.md
and theNEWS.md
first.