-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial setup for the localization rule set
- Loading branch information
0 parents
commit c2139e4
Showing
98 changed files
with
1,658 additions
and
0 deletions.
There are no files selected for viewing
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,30 @@ | ||
--- | ||
# | ||
# 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: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Create AsciiDoc ruleset release | ||
run: | | ||
cd .vale/styles | ||
echo $GITHUB_RUN_NUMBER > version.txt | ||
zip -r AsciiDoc.zip AsciiDoc | ||
zip -r OpenShiftAsciiDoc.zip OpenShiftAsciiDoc | ||
gh release create v$GITHUB_RUN_NUMBER 'AsciiDoc.zip' 'OpenShiftAsciiDoc.zip' | ||
env: | ||
GITHUB_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,19 @@ | ||
--- | ||
name: Verify Vale test fixtures | ||
on: | ||
- pull_request | ||
jobs: | ||
validate-rules: | ||
name: Validate rules | ||
runs-on: ubuntu-latest | ||
#antora-for-modular-docs:main includes vale | ||
container: quay.io/antoraformodulardocs/antora-for-modular-docs:main | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 # enable git diff and building many branches | ||
- name: Validate Vale rules | ||
id: validate-rules | ||
run: scripts/validate-vale-rules.sh |
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 @@ | ||
.idea/** |
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,11 @@ | ||
StylesPath = ../.vale/styles | ||
|
||
MinAlertLevel = suggestion | ||
|
||
Packages = https://github.com/rohennes/ocp-rules/releases/latest/download/AsciiDoc.zip | ||
|
||
#Ignore block comments in AsciiDoc source | ||
TokenIgnores = (\/\/\/\/\n(.*\n)*\/\/\/\/\n) | ||
|
||
[[!.]*.adoc] | ||
BasedOnStyles = RedHat, AsciiDoc |
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,5 @@ | ||
; Vale configuration file to test the `ClosedAttributeBlocks` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = suggestion | ||
[*.adoc] | ||
AsciiDoc.ClosedAttributeBlocks = YES |
9 changes: 9 additions & 0 deletions
9
.vale/fixtures/AsciiDoc/ClosedAttributeBlocks/testinvalid.adoc
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,9 @@ | ||
//vale-fixture | ||
:_content-type: ASSEMBLY | ||
[id="rosa-getting-started | ||
= Comprehensive guide to getting started with {product-title} | ||
|
||
//vale-fixture | ||
:_content-type: ASSEMBLY | ||
[id="rosa-getting-started_{context} | ||
= Another guide to getting started |
35 changes: 35 additions & 0 deletions
35
.vale/fixtures/AsciiDoc/ClosedAttributeBlocks/testvalid.adoc
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,35 @@ | ||
//vale-fixture | ||
:_content-type: ASSEMBLY | ||
[id="rosa-getting-started_{context}"] | ||
= Comprehensive guide to getting started with {product-title} | ||
|
||
//vale-fixture | ||
.Example output | ||
[source,terminal] | ||
---- | ||
{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"up","endpoint":"web","instance":"10.129.0.46:8080","job":"prometheus-example-app","namespace":"ns1","pod":"prometheus-example-app-68d47c4fb6-jztp2","service":"prometheus-example-app"},"value":[1591881154.748,"1"]}]}} | ||
---- | ||
|
||
//vale-fixture | ||
[source,terminal] | ||
---- | ||
$ oc adm must-gather | ||
[must-gather ] OUT Using must-gather plugin-in image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:125f183d13601537ff15b3239df95d47f0a604da2847b561151fedd699f5e3a5 | ||
[must-gather ] OUT namespace/openshift-must-gather-xm4wq created | ||
[must-gather ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-2bd8x created | ||
[must-gather ] OUT pod for plug-in image quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:125f183d13601537ff15b3239df95d47f0a604da2847b561151fedd699f5e3a5 created | ||
---- | ||
|
||
//vale-fixture | ||
.Example API response | ||
[source,json] | ||
---- | ||
[ | ||
{ | ||
"id": "ca11ab76-86f9-428c-8d3a-666c24e34d32", | ||
"endpointUri": "http://localhost:9089/api/ocloudNotifications/v1/dummy", | ||
"uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions/ca11ab76-86f9-428c-8d3a-666c24e34d32", | ||
"resource": "/cluster/node/openshift-worker-0.openshift.example.com/redfish/event" | ||
} | ||
] | ||
---- |
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,5 @@ | ||
; Vale configuration file to test the `ClosedIdQuotes` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = suggestion | ||
[*.adoc] | ||
AsciiDoc.ClosedIdQuotes = YES |
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,7 @@ | ||
//vale-fixture | ||
[id="rosa-getting-started_{context}] | ||
= Comprehensive guide to getting started with {product-title} | ||
|
||
//vale-fixture | ||
[id="rosa-getting-started] | ||
= Another guide to getting started |
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,4 @@ | ||
//vale-fixture | ||
:_content-type: ASSEMBLY | ||
[id="rosa-getting-started_{context}"] | ||
= Comprehensive guide to getting started with {product-title} |
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,5 @@ | ||
; Vale configuration file to test the `XrefContainsAnchorID` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = suggestion | ||
[*.adoc] | ||
AsciiDoc.ImageContainsAltText = YES |
2 changes: 2 additions & 0 deletions
2
.vale/fixtures/AsciiDoc/ImageContainsAltText/testinvalid.adoc
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,2 @@ | ||
//vale-fixture | ||
image::my-image-name.png[] |
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,2 @@ | ||
//Correct usage of alt text in image tags | ||
image::my-image-name.png[my-image-alt-text] |
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,5 @@ | ||
; Vale configuration file to test the `SequentialNumberedCallouts` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = suggestion | ||
[*.adoc] | ||
AsciiDoc.MatchingDotCallouts = YES |
25 changes: 25 additions & 0 deletions
25
.vale/fixtures/AsciiDoc/MatchingDotCallouts/testinvalid.adoc
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,25 @@ | ||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
get '/hi' do <.> | ||
get '/hi' do <.> | ||
get '/hi' do<.> <.> <.> | ||
---- | ||
<.> first callout | ||
<.> second callout | ||
<.> third callout | ||
<.> fourth callout | ||
<.> fifth callout | ||
<.> sixth callout | ||
|
||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
get '/hi' do <.> | ||
get '/hi' do <.> | ||
get '/hi' do <.> | ||
---- | ||
<.> first callout, second block | ||
<.> second callout, second block | ||
<.> third callout, second block | ||
<.> fourth callout, second block |
12 changes: 12 additions & 0 deletions
12
.vale/fixtures/AsciiDoc/MatchingDotCallouts/testvalid.adoc
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,12 @@ | ||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
require 'sinatra' <.> | ||
get '/hi' do <.> | ||
"Hello World!" <.> | ||
end | ||
---- | ||
<.> Library import | ||
<.> URL mapping | ||
<.> Response block |
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,5 @@ | ||
; Vale configuration file to test the `SequentialNumberedCallouts` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = suggestion | ||
[*.adoc] | ||
AsciiDoc.MatchingNumberedCallouts = YES |
20 changes: 20 additions & 0 deletions
20
.vale/fixtures/AsciiDoc/MatchingNumberedCallouts/testinvalid.adoc
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,20 @@ | ||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
require 'frank' <1> | ||
get '/hihi'<2><3> | ||
---- | ||
<1> text | ||
<2> More text | ||
<3> More text again | ||
<4> Again, more text | ||
|
||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
require 'frankie' <1> | ||
get '/hihihi' <2> | ||
---- | ||
<1> text! | ||
<2> More text! | ||
<3> More text again! |
26 changes: 26 additions & 0 deletions
26
.vale/fixtures/AsciiDoc/MatchingNumberedCallouts/testvalid.adoc
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,26 @@ | ||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
require 'sinatra' <1> | ||
get '/hi' do <2> <3> | ||
"Hello World!" | ||
end | ||
---- | ||
<1> Library import | ||
<2> URL mapping | ||
<3> Response block | ||
|
||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
require 'sinatra' \\//<1> | ||
get '/hi' do <2><3> | ||
"Hello World!"<4> | ||
end | ||
---- | ||
<1> Library import | ||
<2> URL mapping | ||
<3> Response block | ||
<4> Hi |
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,5 @@ | ||
; Vale configuration file to test the `SequentialNumberedCallouts` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = suggestion | ||
[*.adoc] | ||
AsciiDoc.SequentialNumberedCallouts = YES |
21 changes: 21 additions & 0 deletions
21
.vale/fixtures/AsciiDoc/SequentialNumberedCallouts/testinvalid.adoc
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,21 @@ | ||
[source,ruby] | ||
---- | ||
require 'sinatra' <1> | ||
get '/hi' do <2> | ||
require 'sinatra' <3> | ||
get '/hi' do <4> | ||
hi there <5> | ||
goop <6> | ||
require 'sinatra' | ||
get '/hi' do <7> <8> | ||
"Hello World!" | ||
---- | ||
//vale-fixture | ||
<1> text | ||
<2> More text | ||
<3> More text again | ||
<5> Some text | ||
<6> Again, some text | ||
<7> Moar text | ||
<8> Again, some more text |
25 changes: 25 additions & 0 deletions
25
.vale/fixtures/AsciiDoc/SequentialNumberedCallouts/testvalid.adoc
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,25 @@ | ||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
require 'sinatra' <1> | ||
get '/hi' do <2> <3> | ||
"Hello World!" | ||
end | ||
---- | ||
<1> Library import | ||
<2> URL mapping | ||
<3> Response block | ||
|
||
//vale-fixture | ||
[source,ruby] | ||
---- | ||
require 'sinatra' <1> | ||
get '/hi' do <1> | ||
"Hello World!" | ||
end | ||
key: value <2> | ||
---- | ||
<1> Library import | ||
<2> URL mapping |
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,5 @@ | ||
; Vale configuration file to test the `ValidAdmonitionBlocks` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = suggestion | ||
[*.adoc] | ||
AsciiDoc.ValidAdmonitionBlocks = YES |
18 changes: 18 additions & 0 deletions
18
.vale/fixtures/AsciiDoc/ValidAdmonitionBlocks/testinvalid.adoc
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,18 @@ | ||
//vale-fixture | ||
Here is a Admonition block: | ||
|
||
[IMPORTANT] | ||
.Feeding the Werewolves | ||
==== | ||
While werewolves are hardy community members, keep in mind the following dietary concerns: | ||
. They are allergic to cinnamon. | ||
. More than two glasses of orange juice in 24 hours makes them howl in harmony with alarms and sirens. | ||
. Celery makes them sad. | ||
More text | ||
[NOTE] | ||
==== | ||
Hello | ||
==== |
12 changes: 12 additions & 0 deletions
12
.vale/fixtures/AsciiDoc/ValidAdmonitionBlocks/testvalid.adoc
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,12 @@ | ||
//vale-fixture | ||
Here is a Admonition block: | ||
|
||
[IMPORTANT] | ||
.Feeding the Werewolves | ||
==== | ||
While werewolves are hardy community members, keep in mind the following dietary concerns: | ||
. They are allergic to cinnamon. | ||
. More than two glasses of orange juice in 24 hours makes them howl in harmony with alarms and sirens. | ||
. Celery makes them sad. | ||
==== |
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,5 @@ | ||
; Vale configuration file to test the `ValidConditions` rule | ||
StylesPath = ../../../styles | ||
MinAlertLevel = suggestion | ||
[*.adoc] | ||
AsciiDoc.ValidCodeBlocks = YES |
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,33 @@ | ||
//vale-fixture | ||
Here is a code block: | ||
|
||
[source,terminal] | ||
---- | ||
$ pwd | ||
---- | ||
|
||
Here is a another code block: | ||
|
||
[source,terminal] | ||
---- | ||
$ pwd | ||
---- | ||
|
||
Here is a code block: | ||
|
||
[source,yaml] | ||
---- | ||
--- | ||
apiVersion: 4.11 | ||
Some text. | ||
Here is a code block: | ||
[subs="+quotes",options="nowrap",role="white-space-pre"] | ||
---- | ||
--- | ||
apiVersion: 4.11 | ||
---- | ||
|
||
Some text. |
Oops, something went wrong.