diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml new file mode 100644 index 00000000..deca9e06 --- /dev/null +++ b/.github/workflows/linters.yaml @@ -0,0 +1,21 @@ +name: Linters +on: + - pull_request +jobs: + vale: + name: vale + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install Asciidoctor + run: sudo apt-get install -y asciidoctor + - name: Vale Linter + uses: errata-ai/vale-action@reviewdog + with: + vale_flags: "--minAlertLevel=error" + fail_on_error: true + env: + # Required, set by GitHub actions automatically: + # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.gitignore b/.gitignore index 01813a21..67d0ae97 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,7 @@ public/ # Netlify deploy output from preview workflow deploy.json .DS_Store + +# Vale styles +.vale/styles/* +!.vale/styles/config diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 00000000..ef72286f --- /dev/null +++ b/.vale.ini @@ -0,0 +1,15 @@ +StylesPath = .vale/styles + +MinAlertLevel = warning + +IgnoredScopes = code, tt, img, url, a, body.id + +SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock, literalblock + +Packages = RedHat + +Vocab = konflux + +[*.adoc] + +BasedOnStyles = RedHat diff --git a/.vale/styles/config/vocabularies/konflux/accept.txt b/.vale/styles/config/vocabularies/konflux/accept.txt new file mode 100644 index 00000000..797a1e59 --- /dev/null +++ b/.vale/styles/config/vocabularies/konflux/accept.txt @@ -0,0 +1,5 @@ +lockfile +prefetch +Snyk +Konflux +kubectl