File tree 2 files changed +22
-21
lines changed
2 files changed +22
-21
lines changed Original file line number Diff line number Diff line change 7
7
#
8
8
cd " $( dirname ${BASH_SOURCE} ) " /../..
9
9
10
- challenge_dir=" ${PWD} /${1} "
11
10
errors=0
12
11
13
- echo " Checking ${challenge_dir} "
14
- echo
15
-
16
- for question_path in $challenge_dir /*
12
+ for challenge_dir in $PWD /* -Challenge
17
13
do
18
- dirname=" ${question_path##*/ } " # remove parent directoris
19
- question=" ${dirname#* -} " # remove leading day prefix
20
- echo " Question ${dirname} :"
14
+ echo " Checking ${challenge_dir} "
15
+ echo
21
16
22
- for filepath in $question_path /*
17
+ for question_path in $challenge_dir /*
23
18
do
24
- filename=" ${filepath##*/ } "
25
- if [[ " ${filename% .* } " == " $question " || " $filename " == " README.md" ]]
26
- then
27
- echo " PASSED: ${filename} "
28
- else
29
- echo " FAILED: ${filename} "
30
- errors=$(( errors + 1 ))
31
- fi
19
+ dirname=" ${question_path##*/ } " # remove parent directoris
20
+ question=" ${dirname#* -} " # remove leading day prefix
21
+ echo " Question ${dirname} :"
22
+
23
+ for filepath in $question_path /*
24
+ do
25
+ filename=" ${filepath##*/ } "
26
+ if [[ " ${filename% .* } " == " $question " || " $filename " == " README.md" ]]
27
+ then
28
+ echo " PASSED: ${filename} "
29
+ else
30
+ echo " FAILED: ${filename} "
31
+ errors=$(( errors + 1 ))
32
+ fi
33
+ done
34
+ echo
32
35
done
33
36
echo
34
37
done
Original file line number Diff line number Diff line change 10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- uses : actions/checkout@v2
13
- - name : Check LeetCoding Challenge Apr 2020
14
- run : .github/scripts/check.sh 30-Day-Leetcoding-Challenge
15
- - name : Check LeetCoding Challenge May 2020
16
- run : .github/scripts/check.sh May-LeetCoding-Challenge
13
+ - name : Check File Naming
14
+ run : .github/scripts/check.sh
You can’t perform that action at this time.
0 commit comments