mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-18 05:04:41 +03:00
add ability to split md into code snippets, check with cpplint
This commit is contained in:
@@ -17,9 +17,9 @@ all: \
|
||||
check-markdown \
|
||||
check-references \
|
||||
check-notabs \
|
||||
cpplint-all \
|
||||
check-badchars
|
||||
|
||||
|
||||
$(BUILD_DIR):
|
||||
mkdir -p $(BUILD_DIR)
|
||||
|
||||
@@ -77,6 +77,29 @@ check-badchars: $(SOURCEPATH) $(BUILD_DIR) Makefile
|
||||
cat ../CppCoreGuidelines.md | nl -ba | grep -P '’|‘|”|“|¸|–|…|¦' > $(BUILD_DIR)/CppCoreGuidelines.md.badchars || true
|
||||
if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.badchars ]; then echo 'Warning: Undesired chars (–’‘“”¸…¦) found:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.badchars; false; fi;
|
||||
|
||||
|
||||
|
||||
#### Cpplint
|
||||
|
||||
.PHONY: cpplint-all
|
||||
cpplint-all: $(BUILD_DIR)/codeblocks $(BUILD_DIR)/Makefile python/Makefile.in
|
||||
cd $(BUILD_DIR)/codeblocks; $(MAKE) cpplint-all -k
|
||||
|
||||
#### generic makefile for sourceblocks (need to be evaluated after c++ file generation)
|
||||
|
||||
$(BUILD_DIR)/Makefile: python/Makefile.in
|
||||
cp python/Makefile.in $(BUILD_DIR)/codeblocks/Makefile
|
||||
|
||||
#### split md file into plain text and code
|
||||
|
||||
$(BUILD_DIR)/codeblocks: splitfile
|
||||
|
||||
$(BUILD_DIR)/plain.txt: splitfile
|
||||
|
||||
.PHONY: splitfile
|
||||
splitfile: $(SOURCEPATH) ./python/md-split.py
|
||||
python ./python/md-split.py $(SOURCEPATH) $(BUILD_DIR)/plain.txt $(BUILD_DIR)/codeblocks
|
||||
|
||||
#### install npm modules
|
||||
# install/update npm dependencies defined in file package.json
|
||||
# requires npm (nodejs package manager)
|
||||
|
||||
Reference in New Issue
Block a user