File tree Expand file tree Collapse file tree 4 files changed +581
-16
lines changed Expand file tree Collapse file tree 4 files changed +581
-16
lines changed Original file line number Diff line number Diff line change @@ -9,23 +9,17 @@ language: c++
99# alternatives: gcc, clang, or both (as yaml list)
1010compiler : clang
1111
12+ addons :
13+ apt :
14+ packages :
15+ - hunspell
16+
1217install :
1318 -
1419
1520script :
1621 - cd scripts; make -k
1722 - cd ..
1823
19- # # find lines with tabs
20- # - rm -f CppCoreGuidelines.md.tabs
21- # - cat CppCoreGuidelines.md | nl -ba | sed -s 's/\(^[^\t]*\)\t/\1--/g' | grep $'\t' | sed -s 's/\t/\*\*\*\*/g' > CppCoreGuidelines.md.tabs
22- # - if [[ -s CppCoreGuidelines.md.tabs ]]; then echo 'Tabs found'; cat CppCoreGuidelines.md.tabs; false; fi;
23-
24- # # check references unique
25- - rm -f CppCoreGuidelines.md.uniq
26- - grep -oP '(?<=<a name=")[^\"]+' CppCoreGuidelines.md | uniq -d > CppCoreGuidelines.md.uniq
27- - if [[ -s CppCoreGuidelines.md.uniq ]]; then echo 'Found duplicate anchors:'; cat CppCoreGuidelines.md.uniq; false; fi;
28-
29-
3024notifications :
3125 email : false
Original file line number Diff line number Diff line change 1717check-markdown \
1818check-references \
1919check-notabs \
20+ hunspell-check \
2021cpplint-all \
2122check-badchars
2223
@@ -83,6 +84,17 @@ check-badchars: $(SOURCEPATH) $(BUILD_DIR) Makefile
8384 @if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.badchars ]; then echo 'Warning: Undesired chars (–’‘“”¸…¦) found, use straight quotes instead:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.badchars; false; fi;
8485
8586
87+ .PHONY : hunspell-check
88+ hunspell-check : $(BUILD_DIR ) /plain-nohtml.txt
89+ hunspell -p hunspell/isocpp.dic -u < build/plain-nohtml.txt > $(BUILD_DIR ) /hunspell-report.txt
90+ if [ -s $( BUILD_DIR) /hunspell-report.txt ]; then echo ' Warning: Spellcheck failed, fix words or add to dictionary:' ; cat $( BUILD_DIR) /hunspell-report.txt; false ; fi ;
91+
92+ # only list words that are not in dict
93+ # to include all add them to bottom of hunspell/isocpp.dict, and run
94+ # cat hunspell/isocpp.dic | sort | uniq > hunspell/isocpp.dic2; mv hunspell/isocpp.dic2 hunspell/isocpp.dic
95+ .PHONY : hunspell-list
96+ hunspell-list : $(BUILD_DIR ) /plain.txt
97+ hunspell -p hunspell/isocpp.dic -l < build/plain-nohtml.txt
8698
8799# ### Cpplint
88100
@@ -101,6 +113,9 @@ $(BUILD_DIR)/codeblocks: splitfile
101113
102114$(BUILD_DIR ) /plain.txt : splitfile
103115
116+ $(BUILD_DIR ) /plain-nohtml.txt : $(BUILD_DIR ) /plain.txt
117+ sed ' s;<a \(name\|href\)=".*</a>;;g' $(BUILD_DIR ) /plain.txt > $(BUILD_DIR ) /plain-nohtml.txt
118+
104119.PHONY : splitfile
105120splitfile : $(SOURCEPATH ) ./python/md-split.py
106121 @python ./python/md-split.py $(SOURCEPATH ) $(BUILD_DIR ) /plain.txt $(BUILD_DIR ) /codeblocks
You can’t perform that action at this time.
0 commit comments