-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
68 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,10 @@ | ||
name: Check Markdown links | ||
|
||
on: push | ||
|
||
jobs: | ||
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: gaurav-nelson/[email protected] |
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,10 @@ | ||
{ | ||
"default": true, | ||
"MD004": { "style": "dash"}, | ||
"MD007": {"indent": 4}, | ||
"MD013": false, | ||
"MD024": { "siblings_only": true}, | ||
"MD029": false, | ||
"MD033": { "allowed_elements": [ "details" , "summary" ]}, | ||
"MD040": 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,18 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "^bundle.zip" | ||
}, | ||
{ | ||
"pattern": "^/" | ||
} | ||
], | ||
"httpHeaders": [ | ||
{ | ||
"urls": ["https://", "http://"], | ||
"headers": { | ||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0" | ||
} | ||
} | ||
] | ||
} |
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 @@ | ||
#!/bin/bash | ||
# Script in charge of auditing the released cheatsheets MD files | ||
# in order to detect dead links | ||
# cd ../ | ||
# find . -name \*.md -exec markdown-link-check -c ../.linkcheck.json {} \; 1>../link-check-result.out 2>&1 | ||
# errors=`grep -c "ERROR:" ../link-check-result.out` | ||
# content=`cat ../link-check-result.out` | ||
# if [[ $errors != "0" ]] | ||
# then | ||
# echo "[!] Error(s) found by the Links validator: $errors CS have dead links !" | ||
# exit $errors | ||
# else | ||
# echo "[+] No error found by the Links validator." | ||
# fi | ||
|
||
# Only check the specific README.md file | ||
target_file="../README.md" | ||
|
||
# Run link check with specific file and redirect output | ||
markdown-link-check -c ../.linkcheck.json "$target_file" 1>../link-check-result.out 2>&1 | ||
|
||
# Check for errors and handle appropriately | ||
errors=$(grep -c "ERROR:" ../link-check-result.out) | ||
|
||
if [[ $errors != "0" ]]; then | ||
echo "[!] Error(s) found in 'README.md': $errors broken links!" | ||
exit $errors | ||
else | ||
echo "[+] No errors found in 'README.md'." | ||
fi |