mirror of
https://github.com/gaurav-nelson/github-action-markdown-link-check.git
synced 2024-07-14 15:20:29 +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: ./
|
||||
with:
|
||||
# Add a test to restrict the test to just dir4 and dir5.
|
||||
folder-path: './md/dir4, ./md/dir5'
|
||||
file-path: './md/AdditionalFileTest1.md, ./md/AdditionalFileTest2.md'
|
||||
folder-path: 'md/dir4/, md/dir5/'
|
||||
file-path: 'md/AdditionalFileTest1.md, md/AdditionalFileTest2.md'
|
||||
check-modified-files-only: 'yes'
|
||||
use-verbose-mode: 'yes'
|
||||
shellcheck:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
|
@ -8,7 +8,7 @@ YELLOW='\033[0;33m'
|
||||
BLUE='\033[0;34m'
|
||||
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 COMMAND_DIRS COMMAND_FILES
|
||||
@ -142,7 +142,7 @@ check_additional_files () {
|
||||
|
||||
}
|
||||
|
||||
if [ -z "$8" ]; then
|
||||
if [ -z "$4" ]; then
|
||||
FOLDERS="."
|
||||
else
|
||||
handle_dirs
|
||||
@ -167,16 +167,23 @@ if [ "$CHECK_MODIFIED_FILES" = "yes" ]; then
|
||||
|
||||
for i in "${FILE_ARRAY[@]}"
|
||||
do
|
||||
echo "------------------------------> filename is ${i}"
|
||||
if [ "${i##*.}" == "${FILE_EXTENSION#.}" ]; then
|
||||
FIND_CALL+=("${i}")
|
||||
COMMAND="${FIND_CALL[*]}"
|
||||
$COMMAND &>> error.txt || true
|
||||
unset 'FIND_CALL[${#FIND_CALL[@]}-1]'
|
||||
echo "------------------------------> File extension match"
|
||||
echo "------------------------------> filename: ${i##*/}"
|
||||
if [ $(find ${FOLDERS} -name "${i##*/}" ) ]; then
|
||||
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
|
||||
done
|
||||
|
||||
check_additional_files
|
||||
|
||||
|
||||
check_errors
|
||||
|
||||
else
|
||||
|
@ -4,3 +4,9 @@
|
||||
|
||||
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://www.google.com/?q=url%20with%20a%20space>
|
||||
|
||||
### Alpha
|
||||
### Alpha check
|
||||
|
||||
This [exists](#alpha).
|
||||
<!-- markdown-link-check-disable-next-line -->
|
||||
|
Loading…
Reference in New Issue
Block a user