Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ target/
profile_default/
ipython_config.py

# VSCode
.vscode/

# pyenv
.python-version

Expand Down
5 changes: 1 addition & 4 deletions cpplint_clitest.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,7 @@ def testVlcSample(self):
self.checkAllInFolder('./samples/vlc-sample', 1)

def testSillySample(self):
self.checkAllInFolder('./samples/silly-sample', 4)

def testCfgFileSample(self):
self.checkAllInFolder('./samples/cfg-file', 1)
self.checkAllInFolder('./samples/silly-sample', 5)

def testBoostSample(self):
self.checkAllInFolder('./samples/boost-sample', 4)
Expand Down
3 changes: 0 additions & 3 deletions samples/cfg-file/CPPLINT.cfg

This file was deleted.

262 changes: 0 additions & 262 deletions samples/cfg-file/src/sillycode.cpp

This file was deleted.

3 changes: 3 additions & 0 deletions samples/silly-sample/.cpplint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set noparent
filter=-build/namespaces, -whitespace,+whitespace/line_length,-build/include_what_you_use
headers=w
3 changes: 3 additions & 0 deletions samples/silly-sample/CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set noparent
linelength=84
headers=omg, w
17 changes: 13 additions & 4 deletions samples/cfg-file/simple.def → samples/silly-sample/cfg.def
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
src/*.cpp
--config=.cpplint src/*
1
3
4
Done processing src/sillycode.cpp
Total errors found: 18
Done processing src/sillycode.w
Total errors found: 26

src/sillycode.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
src/sillycode.cpp:3: Found C system header after C++ system header. Should be: sillycode.h, c system, c++ system, other. [build/include_order] [4]
src/sillycode.cpp:2: <ratio> is an unapproved C++11 header. [build/c++11] [5]
src/sillycode.cpp:3: Found C system header after other header. Should be: sillycode.h, c system, c++ system, other. [build/include_order] [4]
src/sillycode.cpp:4: Found C system header after other header. Should be: sillycode.h, c system, c++ system, other. [build/include_order] [4]
src/sillycode.cpp:14: Is this a non-const reference? If so, make const or use a pointer: vector<string>& v [runtime/references] [2]
src/sillycode.cpp:40: If/else bodies with multiple statements require braces [readability/braces] [4]
src/sillycode.cpp:66: Single-parameter constructors should be marked explicit. [runtime/explicit] [4]
src/sillycode.cpp:76: Single-parameter constructors should be marked explicit. [runtime/explicit] [4]
src/sillycode.cpp:85: Constructors callable with one argument should be marked explicit. [runtime/explicit] [4]
src/sillycode.cpp:86: Lines should be <= 80 characters long [whitespace/line_length] [2]
src/sillycode.cpp:118: Is this a non-const reference? If so, make const or use a pointer: N::X& a [runtime/references] [2]
src/sillycode.cpp:118: Is this a non-const reference? If so, make const or use a pointer: N::X& b [runtime/references] [2]
src/sillycode.cpp:123: Is this a non-const reference? If so, make const or use a pointer: N::X& a [runtime/references] [2]
Expand All @@ -21,5 +25,10 @@ src/sillycode.cpp:199: If an else has a brace on one side, it should have it on
src/sillycode.cpp:208: Static/global string variables are not permitted. [runtime/string] [4]
src/sillycode.cpp:227: Static/global string variables are not permitted. [runtime/string] [4]
src/sillycode.cpp:228: Using C-style cast. Use reinterpret_cast<double*>(...) instead [readability/casting] [4]
src/sillycode.cpp:243: Lines should be <= 80 characters long [whitespace/line_length] [2]
src/sillycode.cpp:243: Using C-style cast. Use reinterpret_cast<derived2*>(...) instead [readability/casting] [4]
src/sillycode.cpp:244: Lines should be <= 80 characters long [whitespace/line_length] [2]
src/sillycode.cpp:249: Lines should be <= 80 characters long [whitespace/line_length] [2]
src/sillycode.w:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
src/sillycode.w:0: No #ifndef header guard found, suggested CPP variable is: SAMPLES_SILLY_SAMPLE_SRC_SILLYCODE_W_ [build/header_guard] [5]

10 changes: 7 additions & 3 deletions samples/silly-sample/filters.def
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
1
7
Done processing src/sillycode.cpp
Category 'build' errors found: 1
Category 'build' errors found: 5
Category 'legal' errors found: 1
Category 'readability' errors found: 4
Category 'runtime' errors found: 12
Total errors found: 18
Total errors found: 22

src/sillycode.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5]
src/sillycode.cpp:3: Found C system header after C++ system header. Should be: sillycode.h, c system, c++ system, other. [build/include_order] [4]
src/sillycode.cpp:1: Include the directory when naming header files [build/include_subdir] [4]
src/sillycode.cpp:2: <ratio> is an unapproved C++11 header. [build/c++11] [5]
src/sillycode.cpp:3: Found C system header after other header. Should be: sillycode.h, c system, c++ system, other. [build/include_order] [4]
src/sillycode.cpp:4: Found C system header after other header. Should be: sillycode.h, c system, c++ system, other. [build/include_order] [4]
src/sillycode.cpp:5: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5]
src/sillycode.cpp:14: Is this a non-const reference? If so, make const or use a pointer: vector<string>& v [runtime/references] [2]
src/sillycode.cpp:40: If/else bodies with multiple statements require braces [readability/braces] [4]
src/sillycode.cpp:66: Single-parameter constructors should be marked explicit. [runtime/explicit] [4]
Expand Down
Loading