The Grand Opinionated AutoTester (GOAT) automatically applies Seiso's policy as code. This project is designed to be easier to understand and more opinionated than other open source multi-linter projects, and easily extended to enforce Seiso policies programmatically.
-
Create a per-repository dictionary (relative to the root of your Git repository).
mkdir -p .github/etc/ touch .github/etc/dictionary.txt
-
Ensure your code is checked out during the GitHub Action.
uses: actions/checkout@v4
-
Add the goat to your GitHub Actions workflows.
uses: seisollc/goat@main
To run the goat on each PR against main
, create the following file as .github/workflows/pr.yml
:
For example, you could use the following to run the goat on each PR against main
:
---
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: Ubuntu-20.04
name: Test the project
steps:
- uses: actions/checkout@v4
- uses: seisollc/goat@main
-
Populate the custom dictionary file in
.github/etc/dictionary.txt
for any repository-specific language.$ cat << EOF >> .github/etc/dictionary.txt capricornis crispus EOF
-
Configure the goat to skip mypy scanning.
uses: seisollc/goat@main with: disable_mypy: true
-
Exclude a file extension.
uses: seisollc/goat@main with: exclude: \.md$
-
Exclude a list of files.
uses: seisollc/goat@main with: exclude: ^.*/(Dockerfile|Dockerfile\.dev)$
-
Provide a linting configuration for any of the supported linters in the
.github/linters/
directory of your repository.$ mkdir -p .github/linters/ $ cat << EOF >> .github/linters/.markdown-lint.yml --- MD013: line_length: 120 EOF
-
Autofix code formatting errors using those linters with a built-in
fix
option. Note, this is enabled by default when running locally and can create adirty
Git directory. You will need to manage committing and pushing any changes.uses: seisollc/goat@main with: auto_fix: false
- actionlint
- black
- cfn-lint
- cspell
- dockerfile_lint
- hadolint
- jscpd
- kubeconform
- markdown-link-check
- markdownlint
- mypy
- ruff
- shellcheck
- textlint
- yamllint
- GitHub Actions
- Bitbucket Pipelines
To debug an issue with the goat, configure the log level to either ERROR
, WARN
, INFO
, or DEBUG
.
uses: seisollc/goat@main
with:
log_level: DEBUG
The goat
project does not do releases, as it is intended as a minimum expectation that evolves over time. Please refer to main
or, in limited
situations, pin to the commit hash tag that is published with each commit.
See CONTRIBUTING.md