Skip to content

Commit

Permalink
Merge pull request #188 from stepstone-tech/fix-simplecomplexitychecker
Browse files Browse the repository at this point in the history
Reset checker's statistics before analyzing each file.
  • Loading branch information
ryaneberly authored Aug 5, 2016
2 parents f437708 + 2f475ae commit 111ec82
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public class SimpleComplexityChecker extends CFLintScannerAdapter {
protected boolean alreadyTooComplex = false;
int functionLineNo = 1;

@Override
public void startFile(String fileName, BugList bugs) {
complexity = 0;
alreadyTooComplex = false;
functionLineNo = 1;
}

@Override
public void expression(final CFScriptStatement expression, final Context context, final BugList bugs) {
CFFuncDeclStatement function;
Expand Down

0 comments on commit 111ec82

Please sign in to comment.