Skip to content

Commit 91a731a

Browse files
committed
Remove last 2 tab instances, Flag all tabs as warning breaking travis build
1 parent d9562f6 commit 91a731a

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5531,7 +5531,7 @@ It's a standard-library requirement.
55315531
##### Example, bad
55325532

55335533
template<>
5534-
struct hash<My_type> { // thoroughly bad hash specialization
5534+
struct hash<My_type> { // thoroughly bad hash specialization
55355535
using result_type = size_t;
55365536
using argument_type = My_type;
55375537

@@ -14333,7 +14333,7 @@ The names are mostly ISO standard-library style (lower case and underscore):
1433314333

1433414334
* `T*` // The `T*` is not an owner, may be null; assumed to be pointing to a single element.
1433514335
* `char*` // A C-style string (a zero-terminated array of characters); may be null.
14336-
* `const char*` // A C-style string; may be null.
14336+
* `const char*` // A C-style string; may be null.
1433714337
* `T&` // The `T&` is not an owner and can never be a "null reference"; references are always bound to objects.
1433814338

1433914339
The "raw-pointer" notation (e.g. `int*`) is assumed to have its most common meaning; that is, a pointer points to an object, but does not own it.

scripts/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ default: all
1515
.PHONY: all
1616
all: \
1717
check-markdown \
18-
check-references
18+
check-references \
19+
check-notabs
1920

2021

2122
$(BUILD_DIR):
@@ -57,6 +58,14 @@ check-references: $(SOURCEPATH) $(BUILD_DIR) Makefile
5758
## check if output has data
5859
if [ -s "build/CppCoreGuidelines.md.uniq" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi
5960

61+
.PHONY: check-notabs
62+
check-notabs: $(SOURCEPATH) $(BUILD_DIR) Makefile
63+
# find lines with tabs
64+
# old file still might be around
65+
rm -f $(BUILD_DIR)/CppCoreGuidelines.md.tabs
66+
# print file, add line numbers, remove tabs from nl tool, grep for remaining tabs, replace with stars
67+
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+
if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.tabs ]; then echo 'Warning: Tabs found:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.tabs; false; fi;
6069

6170
#### install npm modules
6271
# install/update npm dependencies defined in file package.json

0 commit comments

Comments
 (0)