--output=sed src/*.cpp
1
8
sed -i '2s/\/\//\/\/ /' src/sillycode.cpp # Should have a space between // and comment  [whitespace/comments] [4]
sed -i '120s/,\([^ ]\)/, \1/g' src/sillycode.cpp # Missing space after ,  [whitespace/comma] [3]
sed -i '122s/\s*$//' src/sillycode.cpp # Line ends in whitespace.  Consider deleting these extra spaces.  [whitespace/end_of_line] [4]
sed -i '126s/,\([^ ]\)/, \1/g' src/sillycode.cpp # Missing space after ,  [whitespace/comma] [3]
sed -i '208s/\([^ ]\){/\1 {/' src/sillycode.cpp # Missing space before {  [whitespace/braces] [5]
sed -i '249s/\s*$//' src/sillycode.cpp # Line ends in whitespace.  Consider deleting these extra spaces.  [whitespace/end_of_line] [4]
sed -i '249s/\([^ ]\){/\1 {/' src/sillycode.cpp # Missing space before {  [whitespace/braces] [5]

# src/sillycode.cpp:0:  "No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>""  [legal/copyright] [5]
# src/sillycode.cpp:1:  "Include the directory when naming header files"  [build/include_subdir] [4]
# src/sillycode.cpp:2:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# 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:8:  "public: should be indented +1 space inside class Date"  [whitespace/indent] [3]
# src/sillycode.cpp:15:  "{ should almost always be at the end of the previous line"  [whitespace/braces] [4]
# src/sillycode.cpp:39:  "{ should almost always be at the end of the previous line"  [whitespace/braces] [4]
# src/sillycode.cpp:40:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:40:  "If/else bodies with multiple statements require braces"  [readability/braces] [4]
# src/sillycode.cpp:49:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:49:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:55:  "{ should almost always be at the end of the previous line"  [whitespace/braces] [4]
# src/sillycode.cpp:60:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:60:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:64:  "public: should be indented +1 space inside class X"  [whitespace/indent] [3]
# src/sillycode.cpp:65:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:65:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:66:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:66:  "Single-parameter constructors should be marked explicit."  [runtime/explicit] [4]
# src/sillycode.cpp:74:  "public: should be indented +1 space inside class X2"  [whitespace/indent] [3]
# src/sillycode.cpp:75:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:76:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:76:  "Single-parameter constructors should be marked explicit."  [runtime/explicit] [4]
# src/sillycode.cpp:80:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:80:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:84:  "public: should be indented +1 space inside class X3"  [whitespace/indent] [3]
# src/sillycode.cpp:85:  "Constructors callable with one argument should be marked explicit."  [runtime/explicit] [4]
# src/sillycode.cpp:86:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:94:  "public: should be indented +1 space inside class Foo"  [whitespace/indent] [3]
# src/sillycode.cpp:100:  "{ should almost always be at the end of the previous line"  [whitespace/braces] [4]
# src/sillycode.cpp:110:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:111:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:111:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:113:  "public: should be indented +1 space inside class Vector2"  [whitespace/indent] [3]
# src/sillycode.cpp:119:  "{ should almost always be at the end of the previous line"  [whitespace/braces] [4]
# src/sillycode.cpp:120:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:122:  "Weird number of spaces at line-start.  Are you using a 2-space indent?"  [whitespace/indent] [3]
# src/sillycode.cpp:124:  "{ should almost always be at the end of the previous line"  [whitespace/braces] [4]
# src/sillycode.cpp:125:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:125:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:126:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:143:  "Missing spaces around ="  [whitespace/operators] [4]
# src/sillycode.cpp:144:  "Missing spaces around ="  [whitespace/operators] [4]
# src/sillycode.cpp:149:  "Missing spaces around ="  [whitespace/operators] [4]
# src/sillycode.cpp:150:  "Missing spaces around ="  [whitespace/operators] [4]
# src/sillycode.cpp:155:  "Missing spaces around ="  [whitespace/operators] [4]
# src/sillycode.cpp:156:  "Missing spaces around ="  [whitespace/operators] [4]
# src/sillycode.cpp:162:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:164:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:166:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:168:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:171:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:171:  "Do not use variable-length arrays.  Use an appropriately named ('k' followed by CamelCase) compile-time constant for the size."  [runtime/arrays] [1]
# src/sillycode.cpp:175:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:178:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:178:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:178:  "Static/global string variables are not permitted."  [runtime/string] [4]
# src/sillycode.cpp:179:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:179:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:184:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:184:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:190:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:190:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:195:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:195:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:197:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:197:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:199:  "If an else has a brace on one side, it should have it on both"  [readability/braces] [5]
# src/sillycode.cpp:202:  "An else should appear on the same line as the preceding }"  [whitespace/newline] [4]
# src/sillycode.cpp:208:  "Static/global string variables are not permitted."  [runtime/string] [4]
# src/sillycode.cpp:209:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:209:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:214:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:217:  "{ should almost always be at the end of the previous line"  [whitespace/braces] [4]
# src/sillycode.cpp:218:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:218:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:219:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:219:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:220:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:220:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:225:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:225:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:227:  "Static/global string variables are not permitted."  [runtime/string] [4]
# src/sillycode.cpp:228:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:228:  "Using C-style cast.  Use reinterpret_cast<double*>(...) instead"  [readability/casting] [4]
# src/sillycode.cpp:236:  "public: should be indented +1 space inside class derived2"  [whitespace/indent] [3]
# src/sillycode.cpp:241:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:243:  "Lines should be <= 84 characters long"  [whitespace/line_length] [2]
# src/sillycode.cpp:243:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:243:  "Using C-style cast.  Use reinterpret_cast<derived2*>(...) instead"  [readability/casting] [4]
# src/sillycode.cpp:244:  "Lines should be <= 84 characters long"  [whitespace/line_length] [2]
# src/sillycode.cpp:244:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:249:  "Lines should be <= 84 characters long"  [whitespace/line_length] [2]
# src/sillycode.cpp:249:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:253:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:254:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:257:  "Tab found; better to use spaces"  [whitespace/tab] [1]
# src/sillycode.cpp:257:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:260:  "Empty loop bodies should use {} or continue"  [whitespace/empty_loop_body] [5]
# src/sillycode.cpp:260:  "At least two spaces is best between code and comments"  [whitespace/comments] [2]
# src/sillycode.cpp:263:  "Redundant blank line at the end of a code block should be deleted."  [whitespace/blank_line] [3]
# src/sillycode.cpp:14:  "Add #include <vector> for vector<>"  [build/include_what_you_use] [4]
# src/sillycode.cpp:126:  "Add #include <utility> for swap"  [build/include_what_you_use] [4]
# src/sillycode.cpp:168:  "Add #include <memory> for unique_ptr<>"  [build/include_what_you_use] [4]
# src/sillycode.cpp:179:  "Add #include <iostream> for cin"  [build/include_what_you_use] [4]
# src/sillycode.cpp:224:  "Add #include <limits> for numeric_limits<>"  [build/include_what_you_use] [4]
# src/sillycode.cpp:237:  "Add #include <string> for string"  [build/include_what_you_use] [4]
# src/sillycode.cpp:264:  "Could not find a newline character at the end of the file."  [whitespace/ending_newline] [5]

