-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
- 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}} | ||
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |