Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Fixes #7 Deprecated Incrementer check due to too many false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
JossWhittle committed May 6, 2014
1 parent 1983b2d commit e1b06db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion flint/Checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,9 @@ namespace flint {
}
};

// ******************************************
// Deprecated due to too many false positives
// ******************************************
/**
* Check for postfix incrementers
*
Expand All @@ -912,7 +915,7 @@ namespace flint {
* The path to the file currently being linted
* @param tokens
* The token list for the file
*/
void checkIncrementers(ErrorFile &errors, const string &path, const vector<Token> &tokens) {
const vector<TokenType> iteratorPlus = {
Expand All @@ -931,6 +934,7 @@ namespace flint {
}
}
};
*/

/**
* Balance of #if(#ifdef, #ifndef)/#endif.
Expand Down
4 changes: 3 additions & 1 deletion flint/Checks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ namespace flint {
#define X(func) \
void check##func(ErrorFile &errors, const string &path, const vector<Token> &tokens)

X(Incrementers);
// Deprecated due to too many false positives
//X(Incrementers);

X(DefinedNames);
X(CatchByReference);
X(BlacklistedSequences);
Expand Down
3 changes: 2 additions & 1 deletion flint/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ void checkEntry(ErrorReport &errors, const string &path, uint depth = 0) {
// Checks which note Advice
if (Options.LEVEL >= Lint::ADVICE) {

checkIncrementers(errorFile, path, tokens);
// Deprecated due to too many false positives
//checkIncrementers(errorFile, path, tokens);

if (!Options.CMODE) {
checkUpcaseNull(errorFile, path, tokens);
Expand Down

0 comments on commit e1b06db

Please sign in to comment.