File tree Expand file tree Collapse file tree 5 files changed +38
-10
lines changed
Expand file tree Collapse file tree 5 files changed +38
-10
lines changed Original file line number Diff line number Diff line change 2121 run : |
2222 # We want space splitting
2323 # shellcheck disable=SC2086
24- for file in $(git ls-files .github/workflows/*)
24+ for file in $(git ls-files .github/workflows/*.yml )
2525 do
2626 echo "Checking $file"
2727 ${{ steps.get_actionlint.outputs.executable }} -color $file || exit 1
Original file line number Diff line number Diff line change 1+ name : shellcheck
2+ # This pipeline runs shellcheck on all files with extension .sh,
3+ # except the ones listed in .github/workflows/shellcheck-exceptions.txt.
4+
5+ on :
6+ push :
7+ merge_group :
8+ pull_request :
9+
10+ jobs :
11+ shellcheck :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v5
15+
16+ - name : Shellcheck
17+ run : |
18+ for file in $(git ls-files "*.sh")
19+ do
20+ if grep -q "$file" ".github/workflows/shellcheck-exceptions.txt"
21+ then
22+ echo "⚠️ $file is ignored from shellcheck's verifications. Please consider fixing it."
23+ else
24+ echo "shellcheck \"$file\""
25+ shellcheck "$file"
26+ fi
27+ done
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- set -e
32#
43# Generate the .java files here, taking the snippets
54# from the various *.md files as input
65
7- for f in $( ls * .md | grep course)
6+ set -e
7+
8+ for f in course* .md
89do
9- f_java=$( echo $f | tr -d ' -' | sed ' s/\.md$/.java/' )
10+ f_java=$( echo " $f " | tr -d ' -' | sed ' s/\.md$/.java/' )
1011 f_java=" ${f_java^} " # Put first character uppercase
1112 rm -Rf " $f_java "
12- exdown.py -f java $f > " $f_java " || exit 1
13+ exdown.py -f java " $f " > " $f_java " || exit 1
1314done
1415
15- javac * .java
16+ javac ./ * .java
1617
1718RC=" $? "
1819
19- rm -Rf * .class
20+ rm -Rf ./ * .class
2021
2122exit " $RC "
Original file line number Diff line number Diff line change 77
88EXDOWN=" ${EXDOWN:- exdown.py} "
99
10- for f in $( ls * .md | grep course )
10+ for f in course * .md
1111do
12- hs_module_name=$( echo $f | tr -d ' -' | sed ' s/\.md$//' )
12+ hs_module_name=$( echo " $f " | tr -d ' -' | sed ' s/\.md$//' )
1313 hs_module_name=${hs_module_name^} # Put first character uppercase
1414 f_hs=" ${hs_module_name} .hs"
1515 rm -Rf " $f_hs "
1616 echo " $EXDOWN -f hs $f > $f_hs "
17- $EXDOWN -f hs $f > " $f_hs " || exit 1 # exdown is https://github.com/smelc/exdown
17+ $EXDOWN -f hs " $f " > " $f_hs " || exit 1 # exdown is https://github.com/smelc/exdown
1818 echo " Written $f_hs "
1919done
You can’t perform that action at this time.
0 commit comments