-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vale #3147
vale #3147
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Linting with Vale on pull request | ||
on: [pull_request] | ||
|
||
jobs: | ||
vale: | ||
name: Linting with Vale | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: errata-ai/vale-action@reviewdog | ||
with: | ||
filter_mode: diff_context | ||
vale_flags: "--no-exit --minAlertLevel=error --glob=!*/doc-*/common/*" | ||
# github-pr-annotations doesn't require elevated token privileges | ||
reporter: github-pr-annotations | ||
fail_on_error: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It has annotations, but the check doesn't appear to fail. That's confusing to me. |
||
# let's limit this a bit | ||
files: guides/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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, AsciiDoc | ||
|
||
Vocab = Foreman | ||
|
||
# Use local Vocab terms | ||
Vale.Terms = YES | ||
Vale.Avoid = YES | ||
|
||
# Ignore files in dirs starting with `.` to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files | ||
[[!.]*.adoc] | ||
|
||
BasedOnStyles = RedHat, AsciiDoc | ||
|
||
# Match INI files. See: https://docs.errata.ai/vale/scoping | ||
[*.ini] | ||
|
||
# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs. | ||
TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[), (<[^\n]+>), (URL}[^\n]+\[) | ||
|
||
# Disabling rules (NO) | ||
RedHat.ReleaseNotes = NO | ||
|
||
# Disabling rules (NO) | ||
RedHat.CaseSensitiveTerms = NO | ||
RedHat.ConfigMap = NO | ||
RedHat.Definitions = NO | ||
RedHat.Slash = YES | ||
RedHat.Spacing = NO | ||
RedHat.Spelling = NO | ||
RedHat.TermsSuggestions = NO |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Regex terms added to accept.txt are ignored by the Vale linter and override RedHat Vale rules. | ||
# Add terms that have a corresponding incorrectly capitalized form to reject.txt. | ||
Katello | ||
[Ss]hellhooks | ||
installer | ||
HAProxy | ||
Product | ||
SSL | ||
|
||
# Terms added until they are fixed in Vale rules | ||
content view | ||
composite content view | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Regex terms added to reject.txt are highlighted as errors by the Vale linter and override RedHat Vale rules. | ||
# Add terms that have a corresponding correctly capitalized form to accept.txt. | ||
product | ||
|
||
# Terms added until they are fixed in Vale rules | ||
Content View | ||
Composite Content View |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[id="Accessing_Server_{context}"] | ||
= Accessing {ProjectName} | ||
|
||
THIS IS A TEST | ||
|
||
Content View | ||
Check failure on line 6 in guides/common/modules/con_ERROR-TEST.adoc GitHub Actions / Linting with Vale
|
||
Composite Content View | ||
Check failure on line 7 in guides/common/modules/con_ERROR-TEST.adoc GitHub Actions / Linting with Vale
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*.adoc will prevent the sym links problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean
--glob=*.adoc
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work for me locally.
Running it with
--glob='*.adoc'
(quoted, so my shell doesn't interpret the *) and it spins for minutes now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misread your earlier comment. No, I meant this:
--glob=!*/doc-*/common/*.adoc"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but now I'm not certain. I have not used that flag.