Skip to content
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

chore: Update linters (Retire node 16) #1141

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/md-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Install dependencies
run: npm install -g [email protected]
- name: Changed Files Exporter
if: github.event_name == 'pull_request_target'
id: files
# This uses the SHA for 4.0.1 - https://github.com/umani/changed-files/releases/tag/v4.0.1
uses: umani/changed-files@0239328a3a6268aad16af7c3e4efc78e32d6c0f0
uses: umani/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: PR link check
Expand Down Expand Up @@ -67,7 +66,7 @@ jobs:
path: brokenlinks.txt
- name: Comment Broken Links
if: ${{ failure() && github.event_name == 'pull_request_target' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/md-lint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Install dependencies
run: npm install -g markdownlint-cli
- name: Run linter
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/md-textlint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,28 @@ jobs:
textlint:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout PR
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
path: pr
- name: Checkout Base
uses: actions/checkout@v4
with:
repository: OWASP/wstg
path: base
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Install dependencies
run: |
npm install -g textlint
npm install -g textlint-rule-terminology
- name: Changed Files Exporter
id: files
# This uses the SHA for 4.0.1 - https://github.com/umani/changed-files/releases/tag/v4.0.1
uses: umani/changed-files@0239328a3a6268aad16af7c3e4efc78e32d6c0f0
uses: umani/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pattern: '^.*\.(md)$'
Expand All @@ -43,7 +48,7 @@ jobs:
touch log.txt
# All markdown files, excluding .github
# Use fix flag so that it goes through all files
for FILE in $FILES; do echo $FILE | grep -v \.github && textlint --config .github/configs/.textlintrc --fix --rule terminology $FILE | tee -a log.txt; done
for FILE in $FILES; do echo 'pr/'"$FILE" | grep -v \.github && textlint --config base/.github/configs/.textlintrc --fix --rule terminology 'pr/'"$FILE" | tee -a log.txt; done
if grep -q 'Incorrect usage' log.txt ; then exit 1 ; else echo -e \"No terminology issues found.\"; fi
- name: Show Mistakes
if: failure()
Expand Down