diff --git a/.github/.vale.ini b/.github/.vale.ini deleted file mode 100644 index dff4da0..0000000 --- a/.github/.vale.ini +++ /dev/null @@ -1,8 +0,0 @@ -StylesPath = styles -MinAlertLevel = suggestion - -Packages = RedHat, AsciiDoc - -# Ignore files in dirs starting with `.` to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files -[[!.]*.adoc] -BasedOnStyles = RedHat, AsciiDoc \ No newline at end of file diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index eb86c4b..48d7cc4 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -1,17 +1,31 @@ -name: reviewdog +--- +# +# Copyright (c) 2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +name: Linting with Vale on pull request on: [pull_request] jobs: vale: - name: runner / vale - runs-on: ubuntu-latest + name: Linting with Vale + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: errata-ai/vale-action@v2.1.1 + - name: Install Asciidoctor + run: sudo apt-get install -y asciidoctor + - uses: errata-ai/vale-action@reviewdog with: - version: 2.17.0 - files: /src/*.adoc - reporter: github-pr-check + filter_mode: diff_context + vale_flags: "--no-exit --minAlertLevel=error --glob=*.adoc" + reporter: github-pr-review fail_on_error: true - filter_mode: nofilter - token: ${{secrets.VALE_GITHUB_TOKEN}} \ No newline at end of file + 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}} + REVIEWDOG_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..36a9d4e --- /dev/null +++ b/.vale.ini @@ -0,0 +1,40 @@ +StylesPath = .vale/styles + +MinAlertLevel = suggestion + +IgnoredScopes = code, tt, img, url, a, body.id + +SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock, literalblock + +Packages = RedHat + +# Match AsciiDoc files. See: https://vale.sh/docs/topics/scoping/ +# Ignore files in a directory starting by `.` +# to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files +[[!.]*.adoc] + +BasedOnStyles = RedHat + +[*.md] + +BasedOnStyles = RedHat + +# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs. +TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[) + +# Match INI files. See: https://vale.sh/docs/topics/scoping/ +[*.ini] + +BasedOnStyles = RedHat + +# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs. +TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[) + +# Disabling rules (NO) +RedHat.CaseSensitiveTerms = NO +RedHat.ConfigMap = NO +RedHat.Definitions = NO +RedHat.Slash = NO +RedHat.Spacing = NO +RedHat.Spelling = NO +RedHat.TermsSuggestions = NO \ No newline at end of file