Skip to content
Snippets Groups Projects
Commit b4195ffa authored by Moul's avatar Moul
Browse files

[doc] #169: Document CI linter hook usage

parent 51707499
No related branches found
No related tags found
2 merge requests!157v1.0.0rc0: merge dev into master,!146#169: Document CI linter hook usage
Pipeline #12863 waiting for manual action
......@@ -25,6 +25,23 @@ To run all checks on all files:
duniterpy> pre-commit run -a
```
### Authorization for GitLab CI linter hook
`pre-commit run -a (gitlab-ci-linter)` is failing due to authorization required for CI lint API accesses.
When running this command, just ignore this failed hook.
In case you want to commit a `.gitlab-ci.yml` edition, this hook will prevent the commit creation.
You can [skip the hooks](https://stackoverflow.com/a/7230886) with `git commit -m "msg" --no-verify`.
This is fine for occasional `.gitlab-ci.yml` editions. In case you would like to edit this file more often and have it checked, ask a maintainer to provide you with `GITLAB_PRIVATE_TOKEN` environment variable that can be set into a shell configuration.
With Bash, in `$HOME/.bashrc` add the following:
```bash
export GITLAB_PRIVATE_TOKEN=""
```
With Fish, in `$HOME/.config/fish/config.fish` add the following:
```fish
set -xg GITLAB_PRIVATE_TOKEN ""
```
Check out #169 for more details.
### Black formatting
We are using [Black](https://github.com/psf/black) formatter tool.
Run Black on a Python file to format it:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment