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 @@ -16,7 +16,8 @@ default: all
16
16
all : \
17
17
check-markdown \
18
18
check-references \
19
- check-notabs
19
+ check-notabs \
20
+ check-badchars
20
21
21
22
22
23
$(BUILD_DIR ) :
@@ -67,6 +68,15 @@ check-notabs: $(SOURCEPATH) $(BUILD_DIR) Makefile
67
68
cat ../CppCoreGuidelines.md | nl -ba | sed -s 's/\(^[^\t]*\)\t/\1--/g' | grep -P '\t' | sed -s 's/\t/\*\*\*\*/g' > $(BUILD_DIR)/CppCoreGuidelines.md.tabs
68
69
if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.tabs ]; then echo 'Warning: Tabs found:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.tabs; false; fi;
69
70
71
+ .PHONY : check-badchars
72
+ check-badchars : $(SOURCEPATH ) $(BUILD_DIR ) Makefile
73
+ # find lines with tabs
74
+ # old file still might be around
75
+ rm -f $(BUILD_DIR)/CppCoreGuidelines.md.badchars
76
+ # print file, add line numbers, grep for bad chars
77
+ cat ../CppCoreGuidelines.md | nl -ba | grep -P '’|‘|”|“|¸|–|…|¦' > $(BUILD_DIR)/CppCoreGuidelines.md.badchars || true
78
+ if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.badchars ]; then echo 'Warning: Undesired chars (–’‘“”¸…¦) found:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.badchars; false; fi;
79
+
70
80
# ### install npm modules
71
81
# install/update npm dependencies defined in file package.json
72
82
# requires npm (nodejs package manager)
You can’t perform that action at this time.
0 commit comments