File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ echo "No subjects are of invalid size<br>" > too_long_subjects.txt
8
8
echo " No subjects with leading lower case characters<br>" > leading_lowercases.txt
9
9
echo " No subjects with trailing periods<br>" > trailing_periods.txt
10
10
echo " No body lines are too wide<br>" > too_long_body_lines.txt
11
+ echo " No keywords are missing in keywords.txt<br>" > missing_keywords.txt
11
12
12
13
too_long_subjects=` awk ' length > 72' subjects.txt`
13
14
if [ -n " $too_long_subjects " ]; then
@@ -39,8 +40,17 @@ if [ -n "$too_long_body_lines" ]; then
39
40
result=1
40
41
fi
41
42
43
+ missing_keywords=$( for keyword in $( grep -A999 ' #if DOXYGEN' MyConfig.h | grep -B999 ' #endif' | grep ' #define' | awk ' { print $2 ' } | grep -e ' ^MY_' ) ; do grep -q $keyword keywords.txt || echo $keyword ; done)
44
+ if [ -n " $missing_keywords " ]; then
45
+ echo " <b>Keywords that are missing from keywords.txt:</b>" > missing_keywords.txt
46
+ echo " $missing_keywords " >> missing_keywords.txt
47
+ sed -i -e ' s/$/<br>/' missing_keywords.txt
48
+ result=1
49
+ fi
50
+
51
+
42
52
printf " %s" " <html>" > gitler.html
43
- awk ' FNR==1{print "<br>"}1' too_long_subjects.txt leading_lowercases.txt trailing_periods.txt too_long_body_lines.txt >> gitler.html
53
+ awk ' FNR==1{print "<br>"}1' too_long_subjects.txt leading_lowercases.txt trailing_periods.txt too_long_body_lines.txt missing_keywords.txt >> gitler.html
44
54
echo " <br>" >> gitler.html
45
55
if [ $result -ne 0 ]; then
46
56
echo " You should follow <a href=" http://chris.beams.io/posts/git-commit" >this guide</a> when writing your commit messages.<br>" >> gitler.html
You can’t perform that action at this time.
0 commit comments