Skip to content
Snippets Groups Projects
README.md 873 B
Newer Older
Gauthier HEISS's avatar
Gauthier HEISS committed
# Bash file scorer

Gauthier HEISS's avatar
Gauthier HEISS committed
Give a score out of 10 to (BA)SH scripts like other linter, using [Spellcheck](https://www.shellcheck.net)

## Use the scorer in standalone mode

Download and run `score.sh` into your project directory. All `*.sh` and `*.bash` files will be analyzed. If you want to scan a specific file, run `./score.sh [filename]`

## Ise the scorer as a GitLab job and get a badge

Open your GitLab project's settings and create a new badge. Fill the form as bellow:
- Link: `https://gitlab.esiea.fr/%{project_path}/-/jobs/artifacts/%{default_branch}/browse/public/lint?job=bashlint`
- Badge image URL: `https://gitlab.esiea.fr/%{project_path}/-/jobs/artifacts/%{default_branch}/raw/public/badges/bashlint.svg?job=bashlint`

Then, copy the `.gitlab-ci.yml` of this repository into yours.

The bash file scorer will run everytime you push something to your repository.