From bd7be5e664e9af2c7f80fcdff0568808eca77cf5 Mon Sep 17 00:00:00 2001 From: aireilly Date: Thu, 7 Sep 2023 11:09:38 +0100 Subject: [PATCH] fix-rules-val --- .github/workflows/preview-build.yml | 5 - .github/workflows/validate-rules.yml | 29 ++ .github/workflows/validate-scripts.yml | 21 ++ .../RedHat/TermsErrors/testinvalid.adoc | 252 ++++++++++++++++++ .../RedHat/TermsErrors/testinvalid2.adoc | 251 ----------------- tools/validate-shell-scripts.sh | 1 + 6 files changed, 303 insertions(+), 256 deletions(-) create mode 100644 .github/workflows/validate-rules.yml create mode 100644 .github/workflows/validate-scripts.yml delete mode 100644 .vale/fixtures/RedHat/TermsErrors/testinvalid2.adoc diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index ccf175c2a..10fd1e515 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -62,11 +62,6 @@ jobs: retention-days: 7 - name: Validate internal and external links run: htmltest - - name: Validate vale rules - id: validate-rules - run: tools/validate-vale-rules.sh - name: Validate language changes run: | tools/validate-language-changes.sh - - name: Validate shell scripts changes - run: tools/validate-shell-scripts.sh diff --git a/.github/workflows/validate-rules.yml b/.github/workflows/validate-rules.yml new file mode 100644 index 000000000..84a6bad56 --- /dev/null +++ b/.github/workflows/validate-rules.yml @@ -0,0 +1,29 @@ +--- +name: Validate Vale rules + +on: + pull_request: + paths: + - .vale/styles/**/* + - .vale/fixtures/**/* + +jobs: + validate-rules: + name: Validate rules + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: Install Vale and validate rules + run: | + sudo gem install asciidoctor + 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 - + mkdir bin && tar -xvzf *Linux_64-bit.tar.gz -C bin + export PATH=./bin:"$PATH" + vale -v + chmod +x tools/validate-vale-rules.sh + ./tools/validate-vale-rules.sh diff --git a/.github/workflows/validate-scripts.yml b/.github/workflows/validate-scripts.yml new file mode 100644 index 000000000..d54bea83b --- /dev/null +++ b/.github/workflows/validate-scripts.yml @@ -0,0 +1,21 @@ +--- +name: Validate scripts + +on: + pull_request: + paths: + - tools/** +jobs: + validate-rules: + name: Validate scripts + runs-on: ubuntu-latest + 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 scripts + run: | + chmod +x tools/validate-shell-scripts.sh + ./tools/validate-shell-scripts.sh diff --git a/.vale/fixtures/RedHat/TermsErrors/testinvalid.adoc b/.vale/fixtures/RedHat/TermsErrors/testinvalid.adoc index 201dc6485..413c6324f 100644 --- a/.vale/fixtures/RedHat/TermsErrors/testinvalid.adoc +++ b/.vale/fixtures/RedHat/TermsErrors/testinvalid.adoc @@ -297,6 +297,207 @@ initial caps Internet address Intranet invoke +io +IPI +irrecoverable +is shipped with +jar +JavaBean +joblog +jobstream +judgement +keep in mind +kernelspace +kick off +L10N +l10n +labelled +labour +large page +last name +learnings +learnt +leave out +left most +left-arrow key +left-hand +left-justified +left-justify +left-most +line cord +link edit +link editing +live broker +live only +loadtime +log into +log off of +log onto +logfile +lots of +main directory +make file +man day +man hour +manipulation button +manpage +masterbrand +matrices +memory stick +menu driven +menubar +menudriven +meta data +meta-data +microcomputer +motherboard +mountpoint +mouse button 1 +mouse button 2 +mouse over +mouse-button +mousebutton +multi site +multi-channel +multi-processing +multi-site +multi-tenant +multi-tier +multi-tiered +multijobbing +MV +nameserver +network-centric computing +new-line +newsfeed +nextgen +non-secure +nonrecoverable +nonsecure +notion +NWSAA +off-boarding +off-load +offline storage +omni-channel +on demand +on ramp +on the fly +on the other hand +on-boarding +on-line +on-ramp +oops +op-code +open-source +OpenShit +ops +organise +organised +organising +orientate +over ride +over-ride +pain point +parent task +parent/child +passive broker +pathname +PCOMM +perfcounter +perimeter network +phillips screw +phillips screwdriver +phone +PL/1 +plain-text +plaintext +planar board +plug in +plug ins +Plug-and-Play +plug-in +plug-ins +pm +Pod Cast +Podcast +pojo +pop-up list +pop-up menu +pop-up window +pops up +pow wow +power down +power up +poweroff +poweron +practise +preventative +print friendly +prior to +program product +programmed operator +Programming Language/I +proof of concepts +pseudo code +pseudo ops +pseudoops +publish-subscribe +pub/sub +pull down +read-write +recognise +recreate +Red Hat Java +Red Hat Open Java Development Kit +Red Hat OpenJDK +regex +remote-access +requestor +RHOJDK +right double-click +right now +right-hand +right-justified +right-justify +right-most +round table +round-robin task dispatching +rule of thumb +run level +run-time +S 390 +sanity check +schemata +screencap +screensaver +scroll bar +second name +secondary storage +segregate +segregation +selection button +send out +serial database +serverside +set-up +Sharename +shift-click +ships with +short cut +shortcut key +shortcut menu +sign into +sign off of +signoff +signon +Simple Object Access Protocol +single quote +single signon +slave +smartcard +smartpaper +SME routine snapset snapsets so long as @@ -385,3 +586,54 @@ unzip up grade up-sell up-selling +up-stream +up-time +updatable +upgradable +UPI +upward compatible +USB thumb drive +useable +utilize +vanilla +versus +video-mode +virtual diskette +virtual diskette drive +virtual DOS machine +virtual hard disk +virtual-equals-real +virtual-equals-virtual +vs +w/ this +w/o +wait condition +war room +warm boot +warmstart +warning notice +web cast +web master +web site +web-enable +webmistress +white hat hacker +whitelist +whitepaper +wi-fi +wild card +wiring closet +wish +work flow +work group +work load +work space +work station +would like +XSA +xsite +zero out +zeroes +zip file +zonegroup +Zulu time diff --git a/.vale/fixtures/RedHat/TermsErrors/testinvalid2.adoc b/.vale/fixtures/RedHat/TermsErrors/testinvalid2.adoc deleted file mode 100644 index 88638e4b1..000000000 --- a/.vale/fixtures/RedHat/TermsErrors/testinvalid2.adoc +++ /dev/null @@ -1,251 +0,0 @@ -io -IPI -irrecoverable -is shipped with -jar -JavaBean -joblog -jobstream -judgement -keep in mind -kernelspace -kick off -L10N -l10n -labelled -labour -large page -last name -learnings -learnt -leave out -left most -left-arrow key -left-hand -left-justified -left-justify -left-most -line cord -link edit -link editing -live broker -live only -loadtime -log into -log off of -log onto -logfile -lots of -main directory -make file -man day -man hour -manipulation button -manpage -masterbrand -matrices -memory stick -menu driven -menubar -menudriven -meta data -meta-data -microcomputer -motherboard -mountpoint -mouse button 1 -mouse button 2 -mouse over -mouse-button -mousebutton -multi site -multi-channel -multi-processing -multi-site -multi-tenant -multi-tier -multi-tiered -multijobbing -MV -nameserver -network-centric computing -new-line -newsfeed -nextgen -non-secure -nonrecoverable -nonsecure -notion -NWSAA -off-boarding -off-load -offline storage -omni-channel -on demand -on ramp -on the fly -on the other hand -on-boarding -on-line -on-ramp -oops -op-code -open-source -OpenShit -ops -organise -organised -organising -orientate -over ride -over-ride -pain point -parent task -parent/child -passive broker -pathname -PCOMM -perfcounter -perimeter network -phillips screw -phillips screwdriver -phone -PL/1 -plain-text -plaintext -planar board -plug in -plug ins -Plug-and-Play -plug-in -plug-ins -pm -Pod Cast -Podcast -pojo -pop-up list -pop-up menu -pop-up window -pops up -pow wow -power down -power up -poweroff -poweron -practise -preventative -print friendly -prior to -program product -programmed operator -Programming Language/I -proof of concepts -pseudo code -pseudo ops -pseudoops -publish-subscribe -pull down -read-write -recognise -recreate -Red Hat Java -Red Hat Open Java Development Kit -Red Hat OpenJDK -regex -remote-access -requestor -RHOJDK -right double-click -right now -right-hand -right-justified -right-justify -right-most -round table -round-robin task dispatching -rule of thumb -run level -run-time -S 390 -sanity check -schemata -screencap -screensaver -scroll bar -second name -secondary storage -segregate -segregation -selection button -send out -serial database -serverside -set-up -Sharename -shift-click -ships with -short cut -shortcut key -shortcut menu -sign into -sign off of -signoff -signon -Simple Object Access Protocol -single quote -single signon -slave -smartcard -smartpaper -SME routine -up-stream -up-time -updatable -upgradable -UPI -upward compatible -USB thumb drive -useable -utilize -vanilla -versus -video-mode -virtual diskette -virtual diskette drive -virtual DOS machine -virtual hard disk -virtual-equals-real -virtual-equals-virtual -vs -w/ this -w/o -wait condition -war room -warm boot -warmstart -warning notice -web cast -web master -web site -web-enable -webmistress -white hat hacker -whitelist -whitepaper -wi-fi -wild card -wiring closet -wish -work flow -work group -work load -work space -work station -would like -XSA -xsite -zero out -zeroes -zip file -zonegroup -Zulu time diff --git a/tools/validate-shell-scripts.sh b/tools/validate-shell-scripts.sh index 2611e455a..5f0b12e98 100755 --- a/tools/validate-shell-scripts.sh +++ b/tools/validate-shell-scripts.sh @@ -7,6 +7,7 @@ # # SPDX-License-Identifier: EPL-2.0 # + set -e if [ -z "${GITHUB_BASE_REF}" ] then