-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding basic tooling: link, spell, & formatting checks
adding CI/infra label Signed-off-by: Nate W <[email protected]>
- Loading branch information
1 parent
6207cf4
commit 369a3de
Showing
10 changed files
with
172 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,33 @@ | ||
# cSpell:ignore textlintrc | ||
# For settings, see | ||
# https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/ | ||
version: '0.2' | ||
caseSensitive: true | ||
#ignorePaths: | ||
# Temporary | ||
# - /assessments/ | ||
# patterns: | ||
# - name: CodeBlock | ||
# pattern: | | ||
# / | ||
# ^(\s*[~`]{3,}) # code-block start | ||
# .* # all languages and options, e.g. shell {hl_lines=[12]} | ||
# [\s\S]*? # content | ||
# \1 # code-block end | ||
# /igmx # cspell:disable-line | ||
# languageSettings: | ||
# - languageId: markdown | ||
# ignoreRegExpList: | ||
# - CodeBlock | ||
words: | ||
- backstore | ||
- CNCF | ||
- Docsy | ||
- keda | ||
- kedacore | ||
- mentee | ||
- mentees | ||
- summerofcode | ||
- outreachy | ||
- techdocs | ||
- toto |
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
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,29 @@ | ||
name: Format checks | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
format-check: | ||
name: FILE FORMAT | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
cache-dependency-path: package.json | ||
- run: npm run check:format | ||
|
||
markdown-linter: | ||
name: MARKDOWN linter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
cache-dependency-path: package.json | ||
- run: npm run check:markdown |
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 @@ | ||
name: Link checks | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
link-check: | ||
name: LINK checking | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
cache-dependency-path: package.json | ||
- name: Check file format | ||
run: npm run check:links |
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 @@ | ||
name: Spelling checks | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
spelling-check: | ||
name: SPELLING check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
cache-dependency-path: package.json | ||
- name: Check file format | ||
run: npm run check:spelling |
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,3 @@ | ||
# npm assets | ||
node_modules/ | ||
package-lock.json |
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 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "^http://localhost" | ||
}, | ||
{ | ||
"pattern": "^#" | ||
}, | ||
{ | ||
"pattern": "^https://(www|docs).tremor.rs" | ||
}, | ||
{ | ||
"pattern": "\\?no-link-check$" | ||
} | ||
], | ||
"timeout": "3s", | ||
"retryOn429": true, | ||
"aliveStatusCodes": [200, 206] | ||
} |
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 @@ | ||
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md | ||
# and https://github.com/DavidAnson/markdownlint/blob/main/README.md | ||
|
||
list-marker-space: false | ||
no-inline-html: false |
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 @@ | ||
lts/* |
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,43 @@ | ||
{ | ||
"name": "mentoring", | ||
"version": "0.0.0", | ||
"description": "Resources provided for and by the CNCF Mentoring community", | ||
"scripts": { | ||
"_check:format:any": "npx prettier --check --ignore-path ''", | ||
"_check:format:delta": "npm run _check:format:any -- $(npm run -s _list:git:delta)", | ||
"_check:format": "npx prettier --check .", | ||
"_check:links": "npx markdown-link-check --config .markdown-link-check.json", | ||
"_check:markdown:all": "npm run -s _list:check:md | xargs -I {} -P 4 npx -p markdownlint-cli markdownlint -c .markdownlint.yaml {}", | ||
"_check:markdown:delta": "npm run -s _list:git:delta | xargs -I {} npx -p markdownlint-cli markdownlint -c .markdownlint.yaml {}", | ||
"_check:markdown:1": "npx -p markdownlint-cli markdownlint -c .markdownlint.yaml", | ||
"_list:git:delta": "git diff --name-only --diff-filter=ACMR | grep -E '\\.(js|md|scss|yml|yaml)$'", | ||
"_list:check:md:no-analysis": "find . -name '*.md' -not -path '*/node_modules/*' -a -not -path '*/.?*' -a -not -path '*/00*'", | ||
"_list:check:md": "find . -name '*.md' -not -path '*/node_modules/*' -a -not -path '*/.?*' | grep -Eve '/000|/0010|/0011'", | ||
"_list:check:*": "npm run --loglevel=warn | grep -Ee '^\\s*check:[^:]+$'", | ||
"_list:fix:*": "npm run --loglevel=warn | grep -Ee '^\\s*fix:[^:]+$' | grep -v 'fix:all'", | ||
"check:format": "npm run _check:format || (echo '[help] Run: npm run fix:format'; exit 1)", | ||
"check:links": "bash -c 'for f in *.md `find docs analyses -name \"*.md\"`; do npx markdown-link-check --config .markdown-link-check.json $f || exit 1; done'", | ||
"check:markdown": "npm run _check:markdown:all", | ||
"check:spelling": "npx cspell --no-progress -c .cspell.yml **/*.md", | ||
"check": "npm run seq -- $(npm run -s _list:check:*)", | ||
"fix:format": "npm run _check:format -- --write", | ||
"fix": "npm run seq -- $(npm -s run _list:fix:*)", | ||
"seq": "bash -c 'for cmd in \"$@\"; do npm run $cmd || exit 1; done' - ", | ||
"test": "npm run check" | ||
}, | ||
"author": "CNCF", | ||
"license": "CC-BY-4.0", | ||
"devDependencies": { | ||
"cspell": "^8.8.4", | ||
"markdown-link-check": "^3.12.2", | ||
"markdownlint": "^0.34.0", | ||
"markdownlint-cli": "^0.41.0", | ||
"prettier": "^3.3.2" | ||
}, | ||
"private": true, | ||
"spelling": "cSpell:ignore ACMR loglevel -", | ||
"prettier": { | ||
"proseWrap": "always", | ||
"singleQuote": true | ||
} | ||
} |