-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MINIFICPP-1203 - Enable header linting in include directories and resolve linter recommendations #789
MINIFICPP-1203 - Enable header linting in include directories and resolve linter recommendations #789
Commits on Jun 12, 2020
-
MINIFICPP-1203 - Remove build/include suppression from linter, reorde…
…r corresponding .cpp files
Configuration menu - View commit details
-
Copy full SHA for e41f293 - Browse repository at this point
Copy the full SHA e41f293View commit details -
MINIFICPP-1203 - Swap include order in OSUtils.cpp for correct Window…
…s-specific symbol imports
Configuration menu - View commit details
-
Copy full SHA for 00850d9 - Browse repository at this point
Copy the full SHA 00850d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3dc81c - Browse repository at this point
Copy the full SHA c3dc81cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7289446 - Browse repository at this point
Copy the full SHA 7289446View commit details -
MINIFICPP-1203 - Add comments to header guard endif according to lint…
…er recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "endif line should be" | tr ":" " " | cut -d" " -f1,2,9-12 | xargs -n 3 sh -c 'sed -i "" "$2s;.*;$3;" $1' sh | less
Configuration menu - View commit details
-
Copy full SHA for c360e0b - Browse repository at this point
Copy the full SHA c360e0bView commit details -
MINIFICPP-1203 - Do not mark zero-parameter constructors explicit acc…
…ording to linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Zero-parameter constructors should not be marked explicit." | tr ":" " " | cut -d" " -f1,2 | xargs -n 2 sh -c 'sed -i "" "$2s/explicit //" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 24a176c - Browse repository at this point
Copy the full SHA 24a176cView commit details -
MINIFICPP-1203 - Do not leave blank lines after visibility modifiers …
…according to linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Do not leave a blank line" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2d" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 557e290 - Browse repository at this point
Copy the full SHA 557e290View commit details -
MINIFICPP-1203 - Add blank lines before visibility modifiers accordin…
…g to linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "should be preceded by a blank line" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$(expr $2 - 1)G;" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 1b347af - Browse repository at this point
Copy the full SHA 1b347afView commit details -
MINIFICPP-1203 - Remove blank lines from the beginning/end of code bl…
…ocks according to linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Redundant blank line at the start of a code block" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2d" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Redundant blank line at the end of a code block" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2d" $1' sh Both these scripts were used until there were no more errors of the given type reported
Configuration menu - View commit details
-
Copy full SHA for 531345a - Browse repository at this point
Copy the full SHA 531345aView commit details -
MINIFICPP-1203 - Remove redundant virtual specifiers on overridden fu…
…nctions according to linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "\"virtual\" is redundant" | tr ":" " " | cut -d" " -f1,2 | xargs -n 2 sh -c 'sed -i "" "$2s/virtual //" $1' sh
Configuration menu - View commit details
-
Copy full SHA for d5178bb - Browse repository at this point
Copy the full SHA d5178bbView commit details -
MINIFICPP-1203 - Remove whitespaces from line ends according to linte…
…r recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Line ends in whitespace" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/[[:blank:]]*$//" $1' sh
Configuration menu - View commit details
-
Copy full SHA for df5290a - Browse repository at this point
Copy the full SHA df5290aView commit details -
MINIFICPP-1203 - Add whitespace before { according to linter recommen…
…dations make linter |& egrep -v '^Done processing|^Ignoring' | grep "Missing space before {" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/{/ {/" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 1402e22 - Browse repository at this point
Copy the full SHA 1402e22View commit details -
MINIFICPP-1203 - Remove new line before { according to linter recomme…
…ndations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "{ should almost always" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/[[:blank:]]*{/{/" $1 && perl -pi -e "s/\\n/ / if $. == $2 - 1" $1' sh This was run repeatedly until no more errors were present.
Configuration menu - View commit details
-
Copy full SHA for 7163a43 - Browse repository at this point
Copy the full SHA 7163a43View commit details -
MINIFICPP-1203 - Add space between // and comments according to linte…
…r recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Should have a space between // and comment" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s;//;// ;" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 3d7e996 - Browse repository at this point
Copy the full SHA 3d7e996View commit details -
MINIFICPP-1203 - Add missing spaces according to compiler recommendat…
…ions Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Missing space before ( in if(" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/if(/if (/" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Missing space before ( in while(" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/while(/while (/" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Missing space before ( in for(" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/for(/for (/" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Missing spaces around =" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/=/ = /g" $1 && sed -i "" "$2s/ =/ =/g" $1 && sed -i "" "$2s/= /= /g" $1 && sed -i "" "$2s/= =/==/g" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Missing space after ," | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/,/, /g" $1 && sed -i "" "$2s/, /, /g" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Missing space after ;" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/;/; /" $1 && sed -i "" "$2s/; /; /" $1 && sed -i "" "$2s/; $/;/" $1' s
Configuration menu - View commit details
-
Copy full SHA for 8fee876 - Browse repository at this point
Copy the full SHA 8fee876View commit details -
MINIFICPP-1203 - Add at least two spaces between code and comment acc…
…ording to linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "At least two spaces is best between code and comments" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s;//; //;" $1 && sed -i "" "$2s; //; //;" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 34721e4 - Browse repository at this point
Copy the full SHA 34721e4View commit details -
MINIFICPP-1203 - Remove linter errors due to visibility modifiers fol…
…lowing each other This can only be solved by removing the first visibility modifier, because otherwise either a ... followed by a blank line or a ... should be preceded by a blank line error occurs Script used (after all the aforementioned errors were cleared): make linter |& egrep -v '^Done processing|^Ignoring' | grep "Do not leave a blank line after" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2d" $1 && sed -i "" "$(expr $2 - 1)d" $1' sh
Configuration menu - View commit details
-
Copy full SHA for a704db5 - Browse repository at this point
Copy the full SHA a704db5View commit details -
MINIFICPP-1203 - Remove only-semicolon lines according to linter reco…
…mmendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Line contains only semicolon." | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/[[:blank:]]*;/;/" $1 && perl -pi -e "s/\\n// if $. == $2 - 1" $1&& sed -i "" "$(expr $2 - 1)s/;;$/;/" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 25d3da3 - Browse repository at this point
Copy the full SHA 25d3da3View commit details -
MINIFICPP-1203 - Remove "should be indented +1" errors according to l…
…inter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "should be indented +1" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/^/ /" $1' sh Manual edit in: libminifi/include/core/logging/WindowsEventLogSink.h libminifi/include/core/repository/AtomicRepoEntries.h
Configuration menu - View commit details
-
Copy full SHA for b0c44b1 - Browse repository at this point
Copy the full SHA b0c44b1View commit details -
MINIFICPP-1203 - Remove extra space before last semicolon according t…
…o linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Extra space before last semicolon" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/ ;$/;/" $1' sh
Configuration menu - View commit details
-
Copy full SHA for f346cd4 - Browse repository at this point
Copy the full SHA f346cd4View commit details -
MINIFICPP-1203 - Eliminate extra space around () according to linter …
…recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Extra space after (" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/( /(/g" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Extra space before )" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/ )/)/g" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Extra space before (" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/ (/(/g" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 0cf1e80 - Browse repository at this point
Copy the full SHA 0cf1e80View commit details -
MINIFICPP-1203 - Add NOLINT rule to lines longer than 200 characters
Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "<= 200 characters long" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s;$; // NOLINT;" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 5ea1768 - Browse repository at this point
Copy the full SHA 5ea1768View commit details -
MINIFICPP-1203 - Replace tabs with spaces according to linter recomme…
…ndations Script used (until no more errors returned): make linter |& egrep -v '^Done processing|^Ignoring' | grep "Tab found; better to use spaces" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'perl -pi -e "s/\t/ /g if $. == $2" $1' sh
Configuration menu - View commit details
-
Copy full SHA for c902cf0 - Browse repository at this point
Copy the full SHA c902cf0View commit details -
MINIFICPP-1203 - Fix non-unix compilant line endings according to lin…
…ter recommendation Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "(^M) found" | tr ":" " " | cut -d" " -f1 | sort | uniq | xargs dos2unix --
Configuration menu - View commit details
-
Copy full SHA for aa53ff9 - Browse repository at this point
Copy the full SHA aa53ff9View commit details -
MINIFICPP-1203 - Fix weird number of spaces in beginning of line acco…
…rding to linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Weird number of spaces at line-start" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/^ //" $1' sh
Configuration menu - View commit details
-
Copy full SHA for fca40bd - Browse repository at this point
Copy the full SHA fca40bdView commit details -
MINIFICPP-1203 - Fix else statements placed on new line according to …
…linter recommendation Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "An else should appear on the same line as the preceding }" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/[[:blank:]]*else/else/" $1 && perl -pi -e "s/\\n/ / if $. == $2 - 1" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 9a08d3d - Browse repository at this point
Copy the full SHA 9a08d3dView commit details -
MINIFICPP-1203 - Resolve namespace should be terminated with ... acco…
…rding to linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "Namespace should be terminated with" | tr ":" " " | tr -d '"'| cut -d" " -f1,2,12 | xargs -n 3 sh -c 'sed -i "" "$2s;$; // namespace $3;" $1 && sed -i "" "$2s;/[*] names[ap][ap]ce .*[*]/ //;//;g" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "Anonymous namespace should be terminated with" | tr ":" " " | cut -d" " -f1,2 | xargs -n 2 sh -c 'sed -i "" "$2s;$; // namespace;" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 07a4eb8 - Browse repository at this point
Copy the full SHA 07a4eb8View commit details -
MINIFICPP-1203 - Remove redundant ";"-s according to linter recommend…
…ations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "You don't need a ;" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s/;$//" $1' sh Manual edits: libminifi/include/utils/file/FileUtils.h libminifi/include/agent/build_description.h
Configuration menu - View commit details
-
Copy full SHA for a955b7b - Browse repository at this point
Copy the full SHA a955b7bView commit details -
MINIFICPP-1203 - Fix missing includes according to linter recommendat…
…ions Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "build/include_what_you_use" | tr ":" " " | cut -d" " -f1,7 | sort -rn -k1 -k2 | uniq | xargs -n 2 sh -c 'perl -pi -e "s/#pragma once/#pragma once\n\n#include $2/" $1' sh make linter |& egrep -v '^Done processing|^Ignoring' | grep "build/include_what_you_use" | tr ":" " " | cut -d" " -f1,7 | sort -rn -k1 -k2 | uniq | xargs -n 2 sh -c 'perl -pi -e "BEGIN { undef $/; } s/#ifndef (.*)\n#define \1/#ifndef \1\n#define \1\n\n#include $2/" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 14b8a14 - Browse repository at this point
Copy the full SHA 14b8a14View commit details -
MINIFICPP-1203 - Resolve include order linter recommendations
Tool used: https://github.com/TheOstrichIO/cpplint/tree/nitpick-sort-includes/cpplint Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "build/include_order" | tr ":" " " | cut -d" " -f1 | sort -rn -k1 -k2 | uniq | xargs python nitpick.py style
Configuration menu - View commit details
-
Copy full SHA for d6dcdc5 - Browse repository at this point
Copy the full SHA d6dcdc5View commit details -
MINIFICPP-1203 - Put at least two spaces before comments according to…
… linter recommendations Script used: make linter |& egrep -v '^Done processing|^Ignoring' | grep "At least two spaces is best between code and comments" | tr ":" " " | cut -d" " -f1,2 | sort -rn -k1 -k2 | xargs -n 2 sh -c 'sed -i "" "$2s;//; //;" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 4514bed - Browse repository at this point
Copy the full SHA 4514bedView commit details -
Configuration menu - View commit details
-
Copy full SHA for 199aa18 - Browse repository at this point
Copy the full SHA 199aa18View commit details -
MINIFICPP-1203 - Remove extra empty lines between c++ headers
Script used (ran until it performed no new changes): git diff --name-only master...$(git branch --show-current) | xargs perl -0777 -ne 'print "$ARGV $1\n" while /^(#include \<.*(?<!\.h)\>)\n\n(#include \<.*(?<!\.h)\>)$/mg' | xargs -n 3 sh -c 'perl -pi -e "s/$2 $3\n/$2 $3/g" $1' sh
Configuration menu - View commit details
-
Copy full SHA for 19e566d - Browse repository at this point
Copy the full SHA 19e566dView commit details -
MINIFICPP-1203 - Make comments on closing braces for namespaces consi…
…stent Also, fix incorrect header guard closing #endifs that were not reported due linter becoming confused on /* style comments Script used: git diff --name-only master...$(git branch --show-current) | xargs perl -0777 -pi -e 's/^(\s*}) \/\* namespace (.*) \*\/ *$/$1 \/\/ namespace $2/mg' make linter |& egrep -v '^Done processing|^Ignoring' |& grep -v "Done proces" | grep "endif line should be" | tr ":" " " | cut -d" " -f1,2,9-12 | xargs -n 3 sh -c 'sed -i "" "$2s;.*;$3;" $1' sh | less
Configuration menu - View commit details
-
Copy full SHA for 87f558d - Browse repository at this point
Copy the full SHA 87f558dView commit details -
MINIFICPP-1203 - Split multiple commands on same line, remove leftove…
…r comments, add NOLINT to non-explicit ctors mentioned by the linter
Configuration menu - View commit details
-
Copy full SHA for c52d9bb - Browse repository at this point
Copy the full SHA c52d9bbView commit details -
MINIFICPP-1203 - Fix whitespace issues, comments, redundancies and on…
…e API breaking explicit
Configuration menu - View commit details
-
Copy full SHA for 8b4a717 - Browse repository at this point
Copy the full SHA 8b4a717View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab4cea9 - Browse repository at this point
Copy the full SHA ab4cea9View commit details -
Configuration menu - View commit details
-
Copy full SHA for d044e2e - Browse repository at this point
Copy the full SHA d044e2eView commit details -
MINIFICPP-1203 - Correct newly introduced incorrect namespace comment…
…ing, fix incorrect ctr explicitness
Configuration menu - View commit details
-
Copy full SHA for 2be2aec - Browse repository at this point
Copy the full SHA 2be2aecView commit details