Skip to content

Commit

Permalink
WIP:Do not merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-nelson committed Apr 9, 2021
1 parent 24cd99c commit fe1e9ed
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 13 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ check_additional_files () {

}

if [ -z "$8" ]; then
if [ -z "$4" ]; then
FOLDERS="."
else
handle_dirs
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions md/dir4/ok4.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

Go to [Ok5](../dir5/ok5.md#test)

This [doesn't exists](#alpha).
2 changes: 1 addition & 1 deletion md/file1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down

0 comments on commit fe1e9ed

Please sign in to comment.