mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 04:44:34 +03:00
update to pypi cpplint 1.3.0, fix linter errors
This commit is contained in:
@@ -12175,7 +12175,7 @@ Not all member functions can be called.
|
|||||||
// if elem!=nullptr then elem points to sz doubles
|
// if elem!=nullptr then elem points to sz doubles
|
||||||
public:
|
public:
|
||||||
vector() : elem{nullptr}, sz{0}{}
|
vector() : elem{nullptr}, sz{0}{}
|
||||||
vctor(int s) : elem{new double},sz{s} { /* initialize elements */ }
|
vector(int s) : elem{new double}, sz{s} { /* initialize elements */ }
|
||||||
~vector() { delete elem; }
|
~vector() { delete elem; }
|
||||||
|
|
||||||
double& operator[](int s) { return elem[s]; }
|
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
|
|||||||
// ...
|
// ...
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if (g1.valid()) cleanup(g1);
|
if (g1.valid()) cleanup(g1);
|
||||||
if (g1.valid()) cleanup(g2);
|
if (g1.valid()) cleanup(g2);
|
||||||
return {res, err};
|
return {res, err};
|
||||||
}
|
}
|
||||||
|
|
||||||
The larger the function, the more tempting this technique becomes.
|
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
|
|||||||
fill(b, 0); // std::fill() + Ranges TS
|
fill(b, 0); // std::fill() + Ranges TS
|
||||||
|
|
||||||
if ( a == b ) {
|
if ( a == b ) {
|
||||||
|
// ...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,5 +14,5 @@ CXX_LINT := ${CXX_SRCS:.cpp=.lint}
|
|||||||
cpplint-all: $(CXX_LINT)
|
cpplint-all: $(CXX_LINT)
|
||||||
|
|
||||||
%.lint: %.cpp
|
%.lint: %.cpp
|
||||||
@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)
|
@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)
|
||||||
|
|
||||||
|
|||||||
1435
scripts/python/cpplint.py
vendored
1435
scripts/python/cpplint.py
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user