Giter Club home page Giter Club logo

goat's Introduction

Grand Opinionated AutoTester (GOAT)

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.

Getting Started

  1. Create a per-repository dictionary (relative to the root of your git repository).

    mkdir -p .github/etc/
    touch .github/etc/dictionary.txt
  2. Ensure your code is checked out during the GitHub action.

    uses: actions/checkout@v2
  3. Add the goat to your GitHub Actions workflows.

    uses: seisollc/goat@main

Example

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@v2
    - uses: seisollc/goat@main

Customizations

  1. Populate the custom dictionary file in .github/etc/dictionary.txt for any repository-specific language.

    $ cat << EOF >> .github/etc/dictionary.txt
    capricornis
    crispus
    EOF
  2. Configure the goat to skip mypy scanning.

    uses: seisollc/goat@main
    with:
      disable_mypy: true
  3. Exclude a file extension.

    uses: seisollc/goat@main
    with:
      exclude: \.md$
  4. Exclude a list of files.

    uses: seisollc/goat@main
    with:
      exclude: ^.*/(Dockerfile|Dockerfile\.dev)$
  5. 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
  6. 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 a dirty git directory. You will need to manage committing and pushing any changes.

    uses: seisollc/goat@main
    with:
      auto_fix: false

Supported Linters

  • actionlint
  • black
  • cfn-lint
  • cspell
  • dockerfile_lint
  • hadolint
  • jscpd
  • kubeconform
  • markdown-link-check
  • markdownlint
  • mypy
  • ruff
  • shellcheck
  • textlint
  • yamllint

Supported Pipelines

  • GitHub Actions
  • Bitbucket Pipelines

Debugging

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

Releases

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.

GOAT Development

See CONTRIBUTING.md

goat's People

Contributors

callmestu avatar chiefholland avatar dependabot[bot] avatar derekseisollc avatar digeseiso avatar ericseiso avatar github-actions[bot] avatar jimmio avatar jonzeolla avatar seanctech avatar seisoautomation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.