Skip to content

Commit 0120560

Browse files
committed
update to pypi cpplint 1.3.0, fix linter errors
1 parent 0785e0b commit 0120560

File tree

3 files changed

+745
-701
lines changed

3 files changed

+745
-701
lines changed

CppCoreGuidelines.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12175,7 +12175,7 @@ Not all member functions can be called.
1217512175
// if elem!=nullptr then elem points to sz doubles
1217612176
public:
1217712177
vector() : elem{nullptr}, sz{0}{}
12178-
vctor(int s) : elem{new double},sz{s} { /* initialize elements */ }
12178+
vector(int s) : elem{new double}, sz{s} { /* initialize elements */ }
1217912179
~vector() { delete elem; }
1218012180

1218112181
double& operator[](int s) { return elem[s]; }
@@ -12874,9 +12874,9 @@ A not uncommon technique is to gather cleanup at the end of the function to avoi
1287412874
// ...
1287512875

1287612876
exit:
12877-
if (g1.valid()) cleanup(g1);
12878-
if (g1.valid()) cleanup(g2);
12879-
return {res, err};
12877+
if (g1.valid()) cleanup(g1);
12878+
if (g1.valid()) cleanup(g2);
12879+
return {res, err};
1288012880
}
1288112881

1288212882
The larger the function, the more tempting this technique becomes.
@@ -16511,6 +16511,7 @@ Also, `std::array<>::fill()` or `std::fill()` or even an empty initializer are b
1651116511
fill(b, 0); // std::fill() + Ranges TS
1651216512

1651316513
if ( a == b ) {
16514+
// ...
1651416515
}
1651516516
}
1651616517

scripts/python/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ CXX_LINT := ${CXX_SRCS:.cpp=.lint}
1414
cpplint-all: $(CXX_LINT)
1515

1616
%.lint: %.cpp
17-
@python ../../python/cpplint.py --verbose=0 --linelength=100 --filter=-legal/copyright,-build/include_order,-build/c++11,-build/namespaces,-readability/inheritance,-readability/function,-readability/casting,-readability/namespace,-readability/alt_tokens,-readability/braces,-readability/fn_size,-whitespace/comments,-whitespace/braces,-whitespace/empty_loop_body,-whitespace/indent,-whitespace/newline,-runtime/explicit,-runtime/arrays,-runtime/int,-runtime/references,-runtime/string,-runtime/operator $< || (cat $< | nl -ba | grep -v 'md-split' && false)
17+
@python ../../python/cpplint.py --verbose=0 --linelength=100 --filter=-legal/copyright,-build/include_order,-build/c++11,-build/namespaces,-build/class,-build/include,-build/include_subdir,-readability/inheritance,-readability/function,-readability/casting,-readability/namespace,-readability/alt_tokens,-readability/braces,-readability/fn_size,-whitespace/comments,-whitespace/braces,-whitespace/empty_loop_body,-whitespace/indent,-whitespace/newline,-runtime/explicit,-runtime/arrays,-runtime/int,-runtime/references,-runtime/string,-runtime/operator $< || (cat $< | nl -ba | grep -v 'md-split' && false)
1818

0 commit comments

Comments
 (0)