Closed jbampton closed 3 years ago
"Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements. By pointing these issues out before code review, this allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks."
Thank you John
GitHub action occur to error.
https://github.com/DonyaOS/Donya/actions/runs/352176158 Process completed with exit code 1.
Please check out this. @jbampton
Hey @BaseMax I think I can fix all of these problems with the shell script linting but you will need to help with the PR review.
Plus I have more work to do on the documenting the pre-commit framework and also trying to add more static checks to the pre-commit framework. The more docs the better.
For example the pre-commit should really check all 3 -> Markdown, Shell and YAML for linting issues so that we don't run into this issue again on the CI perhaps.
For the shell tests it uses https://github.com/koalaman/shellcheck which is very popular
The pre-commit works on the command line just as you try to commit and can be installed with pip
or Homebrew
.
Anyway I recently did somework on Apache Airflow where I added the markdownlint
check to their pre-commit framework.
Plus if you look here https://github.com/apache/airflow/blob/master/.pre-commit-config.yaml
they have a huge amount of tests so just giving you an idea about it. Perhaps we can add other checks to pre-commit, Airflow has about 60 checks.
Maybe we could even get some Golang tests built into the pre-commit framework for the Go projects we have as well and I found a repo here:
https://github.com/dnephin/pre-commit-golang that documents them.
Anyway I hope you are doing very well Max and I am sorry for the delay in response.
Add markdown lint to pre-commit hook.
Lint Markdown.
Move non-github config files to the root.