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++
9
9
# alternatives: gcc, clang, or both (as yaml list)
10
10
compiler : clang
11
11
12
+ addons :
13
+ apt :
14
+ packages :
15
+ - hunspell
16
+
12
17
install :
13
18
-
14
19
15
20
script :
16
21
- cd scripts; make -k
17
22
- cd ..
18
23
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
-
30
24
notifications :
31
25
email : false
Original file line number Diff line number Diff line change 17
17
check-markdown \
18
18
check-references \
19
19
check-notabs \
20
+ hunspell-check \
20
21
cpplint-all \
21
22
check-badchars
22
23
@@ -83,6 +84,17 @@ check-badchars: $(SOURCEPATH) $(BUILD_DIR) Makefile
83
84
@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;
84
85
85
86
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
86
98
87
99
# ### Cpplint
88
100
@@ -101,6 +113,9 @@ $(BUILD_DIR)/codeblocks: splitfile
101
113
102
114
$(BUILD_DIR ) /plain.txt : splitfile
103
115
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
+
104
119
.PHONY : splitfile
105
120
splitfile : $(SOURCEPATH ) ./python/md-split.py
106
121
@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