mirror of
https://github.com/gaurav-nelson/github-action-markdown-link-check.git
synced 2024-08-16 23:20:21 +03:00
WIP:Do not merge
This commit is contained in:
parent
24cd99c2f8
commit
0e4cd887f4
6
.github/workflows/push.yml
vendored
6
.github/workflows/push.yml
vendored
@ -17,8 +17,10 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
# Add a test to restrict the test to just dir4 and dir5.
|
# Add a test to restrict the test to just dir4 and dir5.
|
||||||
folder-path: './md/dir4, ./md/dir5'
|
folder-path: 'md/dir4/, md/dir5/'
|
||||||
file-path: './md/AdditionalFileTest1.md, ./md/AdditionalFileTest2.md'
|
file-path: 'md/AdditionalFileTest1.md, md/AdditionalFileTest2.md'
|
||||||
|
check-modified-files-only: 'yes'
|
||||||
|
use-verbose-mode: 'yes'
|
||||||
shellcheck:
|
shellcheck:
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
|
@ -8,7 +8,7 @@ YELLOW='\033[0;33m'
|
|||||||
BLUE='\033[0;34m'
|
BLUE='\033[0;34m'
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
|
|
||||||
npm i -g markdown-link-check@3.8.6
|
npm i -g markdown-link-check@3.8.7
|
||||||
|
|
||||||
declare -a FIND_CALL
|
declare -a FIND_CALL
|
||||||
declare -a COMMAND_DIRS COMMAND_FILES
|
declare -a COMMAND_DIRS COMMAND_FILES
|
||||||
@ -142,7 +142,7 @@ check_additional_files () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$8" ]; then
|
if [ -z "$4" ]; then
|
||||||
FOLDERS="."
|
FOLDERS="."
|
||||||
else
|
else
|
||||||
handle_dirs
|
handle_dirs
|
||||||
@ -167,16 +167,23 @@ if [ "$CHECK_MODIFIED_FILES" = "yes" ]; then
|
|||||||
|
|
||||||
for i in "${FILE_ARRAY[@]}"
|
for i in "${FILE_ARRAY[@]}"
|
||||||
do
|
do
|
||||||
|
echo "------------------------------> filename is ${i}"
|
||||||
if [ "${i##*.}" == "${FILE_EXTENSION#.}" ]; then
|
if [ "${i##*.}" == "${FILE_EXTENSION#.}" ]; then
|
||||||
FIND_CALL+=("${i}")
|
echo "------------------------------> File extension match"
|
||||||
COMMAND="${FIND_CALL[*]}"
|
echo "------------------------------> filename: ${i##*/}"
|
||||||
$COMMAND &>> error.txt || true
|
if [ $(find ${FOLDERS} -name "${i##*/}" ) ]; then
|
||||||
unset 'FIND_CALL[${#FIND_CALL[@]}-1]'
|
echo "------------------------------> folders is ${FOLDERS}"
|
||||||
|
FIND_CALL+=("${i}")
|
||||||
|
COMMAND="${FIND_CALL[*]}"
|
||||||
|
echo "------------------------------> Command is ${COMMAND}"
|
||||||
|
$COMMAND &>> error.txt || true
|
||||||
|
unset 'FIND_CALL[${#FIND_CALL[@]}-1]'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
check_additional_files
|
check_additional_files
|
||||||
|
|
||||||
check_errors
|
check_errors
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -4,3 +4,9 @@
|
|||||||
|
|
||||||
Go to [Ok5](../dir5/ok5.md#test)
|
Go to [Ok5](../dir5/ok5.md#test)
|
||||||
|
|
||||||
|
This [doesn't exists](#alpha).
|
||||||
|
But [missing files are reported](missing-example.js).
|
||||||
|
|
||||||
|
What about refs and definitions are [checked][beta].
|
||||||
|
|
||||||
|
[beta]: #beta
|
@ -13,7 +13,7 @@ This is to test URLencoding.
|
|||||||
<https://en.wikipedia.org/wiki/Glob_%28programming%29>
|
<https://en.wikipedia.org/wiki/Glob_%28programming%29>
|
||||||
<https://www.google.com/?q=url%20with%20a%20space>
|
<https://www.google.com/?q=url%20with%20a%20space>
|
||||||
|
|
||||||
### Alpha
|
### Alpha check
|
||||||
|
|
||||||
This [exists](#alpha).
|
This [exists](#alpha).
|
||||||
<!-- markdown-link-check-disable-next-line -->
|
<!-- markdown-link-check-disable-next-line -->
|
||||||
|
Loading…
Reference in New Issue
Block a user