Skip to content

Commit bd72fc8

Browse files
committed
Vale POS rule For noun + using
1 parent 5610115 commit bd72fc8

File tree

21 files changed

+120
-94
lines changed

21 files changed

+120
-94
lines changed

.github/workflows/preview-build.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
preview-build:
2121
name: Preview build
2222
runs-on: ubuntu-latest
23-
container: quay.io/antoraformodulardocs/antora-for-modular-docs:main
2423
steps:
2524
- name: Checkout code
2625
uses: actions/checkout@v4
@@ -45,6 +44,13 @@ jobs:
4544
with:
4645
path: .cache
4746
key: ${{ steps.get-date.outputs.yearweek }}
47+
- name: Install Vale
48+
run: |
49+
sudo gem install asciidoctor
50+
curl -s https://api.github.com/repos/errata-ai/vale/releases/latest | grep "browser_download_url.*Linux_64-bit.tar.gz" | cut -d : -f 2,3 | tr -d \" | wget -qi -
51+
mkdir bin && tar -xvzf *Linux_64-bit.tar.gz -C bin
52+
export PATH=./bin:"$PATH"
53+
vale -v
4854
- name: Build
4955
run: tools/publication-builder.sh
5056
- name: Store pull request details for preview-publish
@@ -64,4 +70,4 @@ jobs:
6470
run: htmltest
6571
- name: Validate language changes
6672
run: |
67-
tools/validate-language-changes.sh
73+
tools/validate-language-changes.sh

.github/workflows/publication-builder.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
publication-builder:
1616
name: Build and publish to publication branch
1717
runs-on: ubuntu-latest
18-
container: quay.io/antoraformodulardocs/antora-for-modular-docs:main
18+
container: container: quay.io/antoraformodulardocs/antora-for-modular-docs:main
1919
steps:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4

.github/workflows/validate-rules.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
- name: Install Vale and validate rules
2222
run: |
2323
sudo gem install asciidoctor
24-
wget https://github.com/errata-ai/vale/releases/download/v2.30.0/vale_2.30.0_Linux_64-bit.tar.gz
24+
curl -s https://api.github.com/repos/errata-ai/vale/releases/latest | grep "browser_download_url.*Linux_64-bit.tar.gz" | cut -d : -f 2,3 | tr -d \" | wget -qi -
2525
mkdir bin && tar -xvzf *Linux_64-bit.tar.gz -C bin
2626
export PATH=./bin:"$PATH"
2727
vale -v
2828
chmod +x tools/validate-vale-rules.sh
29-
./tools/validate-vale-rules.sh
29+
./tools/validate-vale-rules.sh

.github/workflows/web-ide-link.yml

-24
This file was deleted.

.vale/fixtures/OpenShiftAsciiDoc/SuggestAttribute/testinvalid.adoc

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ Hybrid Cloud Console
2323
//vale-fixture
2424
IBM Cloud
2525
//vale-fixture
26-
IBM Cloud Bare Metal
27-
//vale-fixture
2826
IBM LinuxONE
2927
//vale-fixture
3028
IBM Power
@@ -177,4 +175,4 @@ CAPV
177175
//vale-fixture
178176
CAPX
179177
//vale-fixture
180-
CAPZ
178+
CAPZ

.vale/fixtures/RedHat/CaseSensitiveTerms/testinvalid.adoc

-3
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,6 @@ UNIX-like
499499
uri
500500
url
501501
urn
502-
Use the .NET Core framework
503-
Use the .Net Core framework
504-
Use the .Net framework
505502
User Portal
506503
var
507504
VCPU

.vale/fixtures/RedHat/TermsErrors/testinvalid.adoc

+19-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ back slash
3030
backside
3131
backwards compatible
3232
barcode
33+
bare metal clusters
34+
bare metal compute
35+
bare metal configuration
36+
bare metal control
37+
bare metal environment
38+
bare metal equipment
39+
bare metal event
40+
bare metal hardware
41+
bare metal host
42+
bare metal infrastructure
43+
bare metal installation
44+
bare metal installer
45+
bare metal machine
46+
bare metal media
47+
bare metal node
48+
bare metal provisioning
49+
bare metal server
50+
bare metal worker
51+
Install on bare-metal.
3352
best of breed
3453
Bidi
3554
Big Blue
@@ -388,7 +407,6 @@ TCP/IP network
388407
teleprocessing line
389408
testcase
390409
the installer
391-
There are many ways to write, for instance, using a pencil.
392410
thin provisioned
393411
third-party software vendor
394412
thru
@@ -443,7 +461,6 @@ virtual diskette drive
443461
virtual DOS machine
444462
virtual hard disk
445463
virtual hard disk
446-
w/ this
447464
w/o
448465
wait condition
449466
war room

.vale/fixtures/RedHat/TermsErrors/testvalid.adoc

+18
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@ back
4949
backslash
5050
backup
5151
bar code
52+
bare-metal clusters
53+
bare-metal compute
54+
bare-metal configuration
55+
bare-metal control
56+
bare-metal environment
57+
bare-metal equipment
58+
bare-metal event
59+
bare-metal hardware
60+
bare-metal host
61+
bare-metal infrastructure
62+
bare-metal installation
63+
bare-metal installer
64+
bare-metal machine
65+
bare-metal media
66+
bare-metal node
67+
bare-metal provisioning
68+
bare-metal server
69+
bare-metal worker
5270
bean
5371
benchmark
5472
best in class

.vale/fixtures/RedHat/TermsSuggestions/testinvalid.adoc

-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
above
22
afterwards
33
all caps
4-
bare metal clusters
5-
bare metal compute
6-
bare metal configuration
7-
bare metal control
8-
bare metal environment
9-
bare metal equipment
10-
bare metal event
11-
bare metal hardware
12-
bare metal host
13-
bare metal infrastructure
14-
bare metal installation
15-
bare metal installer
16-
bare metal machine
17-
bare metal media
18-
bare metal node
19-
bare metal provisioning
20-
bare metal server
21-
bare metal worker
224
below
235
bottom left
246
bottom right
@@ -48,7 +30,6 @@ segfault
4830
shell
4931
spawn
5032
start up
51-
Start using this.
5233
tar
5334
tar file
5435
tarball

.vale/fixtures/RedHat/TermsSuggestions/testvalid.adoc

+1-20
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,8 @@ about using
33
after
44
are not using
55
are using
6-
bare-metal clusters
7-
bare-metal compute
8-
bare-metal configuration
9-
bare-metal control
10-
bare-metal environment
11-
bare-metal equipment
12-
bare-metal event
13-
bare-metal hardware
14-
bare-metal host
15-
bare-metal infrastructure
16-
bare-metal installation
17-
bare-metal installer
18-
bare-metal machine
19-
bare-metal media
20-
bare-metal node
21-
bare-metal provisioning
22-
bare-metal server
23-
bare-metal worker
246
before
25-
By using
26-
by using
7+
by
278
earlier
289
following
2910
from
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
This is __<a-user-replaced-value>__ with hyphens.
2-
This is __<a-user-replaced_value>__ with hyphens and underscores.
3-
This is __<a_user-replaced-value>__ with hyphens and undersores.
4-
This is __<a_user-replaced_value>__ with hyphens and underscores.
5-
This is __<a_user-`replaced`_value>__ with hyphens and monospaced.
1+
* `<user-replaced-value>` with hyphens in backticks
2+
* <user-replaced_value> with hyphens and underscores
3+
* <user-replaced-value> with hyphens and undersores
4+
* <user-replaced_value> with hyphens and underscores
5+
* __<a-user-replaced-value>__ with hyphens
6+
* __<a-user-replaced_value>__ with hyphens and underscores
7+
* __<a_user-replaced-value>__ with hyphens and undersores
8+
* __<a_user-replaced_value>__ with hyphens and underscores
9+
* __<a_user-`replaced`_value>__ with hyphens and monospaced

.vale/fixtures/RedHat/Using/.vale.ini

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
; Vale configuration file to test the `Using` rule
2+
StylesPath = ../../../styles
3+
MinAlertLevel = suggestion
4+
[*.adoc]
5+
RedHat.Using = YES
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
We improved the system using new algorithms.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
If you are using the ElasticSearch log store do nothing.
2+
The application crashes when not using the recommended API.
3+
Developers are using the latest version of the framework.
4+
Switching to using cloud storage improved our backup efficiency.
5+
The documentation provides guidelines about using third-party libraries.
6+
Users experience faster load times when using the optimized query.

.vale/styles/RedHat/CaseSensitiveTerms.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ swap:
3232
'(?<!JBoss )EAP|(?<!Red Hat )JBoss(?!\sCommunity|\sBroker|\sClients|\sConsole|\sAMQ|\sData\sGrid|\sBRMS|\sBPMS|\sEnterprise\sApplication\sPlatform|\.org|\sInterconnect|\sEAP|\sBPM\sSuite)': JBoss EAP
3333
'(?<!Realtime )Decision\sServer': Realtime Decision Server
3434
'[nN]odejs|[nN]ode\.JS|node\.js': Node.js
35-
'\s\.Net Core|\s\.Net|\s\.NET\sCore|dotNet': .NET
35+
'\s\.Net Core|\s\.Net|\s\.NET\sCore|dotNet': \s.NET
3636
'A-MQ(?!\sBroker|\sClient|\sConsole|\sInterconnect)': AMQ
3737
'A-MQ\sBroker': AMQ Broker
3838
'A-MQ\sClients': AMQ Clients

.vale/styles/RedHat/RepeatedWords.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference
66
ignorecase: false
77
alpha: true
88
action:
9-
name: remove
9+
name: edit
10+
params:
11+
- regex
12+
- '(\w+)(\s\w+)' # pattern
13+
- "$1" # replace
1014
tokens:
1115
- '[^\s\.]+'
1216
- '[^\s]+'

.vale/styles/RedHat/TermsErrors.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ swap:
1919
"(?<!Mozilla )Thunderbird": Mozilla Thunderbird
2020
"(?<!pseudo-)ops": operations
2121
"(?<!self-)hosted engine|hosted-engine": self-hosted engine
22+
"bare metal( clusters?| compute| configuration| controls?| environments?| equipment| events?| hardware| hosts?| infrastructure| installations?| installers?| machines?| media| nodes?| provisioning| servers?| workers?)": bare-metal $1
23+
"bare-metal(?! clusters?| compute| configuration| controls?| environments?| equipment| events?| hardware| hosts?| infrastructure| installations?| installers?| machines?| media| nodes?| provisioning| servers?| workers?)": bare metal
2224
"[bB]asic [aA]uth": Basic HTTP authentication|Basic authentication
2325
"a lot(?: of)?": many|much
2426
"best of breed|best-of-breed": best in class
@@ -34,7 +36,6 @@ swap:
3436
"top(?:-)?left": upper left|upper right|upper-left|upper-right
3537
"top(?:-)?right": upper left|upper right|upper-left|upper-right
3638
"UPI": user-provisioned infrastructure
37-
"w/(?!o) ": "with "
3839
"w/o": without
3940
'(?<!IBM\s)S\/390|S90|S\s390': IBM S/390
4041
'backwards?\scompatible': compatible with earlier versions

.vale/styles/RedHat/TermsSuggestions.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ ignorecase: false
44
level: suggestion
55
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termssuggestions/
66
message: "Depending on the context, consider using '%s' rather than '%s'."
7+
scope: sentence
78
action:
89
name: replace
910
swap:
10-
"(?<!,| in| on| at| to| for| from| of| with| without| against) which": ", which| that"
11-
"(?<!.-)jar": compress|archive
12-
"(?<![Bb]y |not |are |to |about |[Ww]hen )using": by using|that uses
11+
"(?<!, | in | on | at | to | for | from | of | with | without | against )which": "that"
1312
", that": ", which| that"
14-
"[Bb]are metal(?= clusters?| compute| configuration| controls?| environments?| equipment| events?| hardware| hosts?| infrastructure| installations?| installers?| machines?| media| nodes?| provisioning| servers?| workers?)": bare-metal
15-
"[Bb]are-metal(?! clusters?| compute| configuration| controls?| environments?| equipment| events?| hardware| hosts?| infrastructure| installations?| installers?| machines?| media| nodes?| provisioning| servers?| workers?)": bare metal
13+
"(?<!.-)jar": compress|archive
1614
"[Nn]avigate": click|select|browse|go to
1715
"bottom(?:-)?left": lower left|lower-left
1816
"bottom(?:-)?right": lower right|lower-right
+13-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
---
2-
extends: substitution
3-
message: "%s."
4-
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/userreplacedvalues/
2+
extends: existence
53
level: suggestion
4+
message: "Separate words by underscores in user-replaced values."
5+
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/userreplacedvalues/
66
scope: raw
7-
swap:
8-
'__<[a-z_\x60]+-[\x60a-z_-]+>__': Separate words by underscores in user-replaced values
7+
nonword: true
8+
action:
9+
name: edit
10+
params:
11+
- regex
12+
- "(-)" # pattern
13+
- "_" # replace
14+
tokens:
15+
- '__<[a-z_\x60]+-[\x60a-z_-]+>__'
16+
- '<[a-z_]+-[a-z_-]+>'

.vale/styles/RedHat/Using.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
extends: sequence
3+
message: "Use 'by using' instead of 'using' when it follows a noun for clarity and grammatical correctness."
4+
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/using/
5+
level: warning
6+
action:
7+
name: edit
8+
params:
9+
- regex
10+
- '(\w+)( using)' # pattern
11+
- "$1 by using" # replace
12+
tokens:
13+
- tag: NN|NNP|NNPS|NNS
14+
- pattern: using
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:navtitle: using
2+
:keywords: reference, rule, by using
3+
= By using
4+
5+
Do not omit articles and prepositions that can increase the clarity of a sentence.
6+
7+
.Additional resources
8+
9+
* link:{ibmsg-url-print}[{ibmsg-print} - Grammar, p. 239]
10+
* link:{ibmsg-url}?topic=medium-global-audiences#grammar[{ibmsg} - Grammar]
11+
* link:{repository-url}blob/main/.vale/styles/RedHat/Using.yml[`Using.yml` source code]

0 commit comments

Comments
 (0)