Skip to content
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

Dirty issues list after SeCheck throws exception #615

Closed
inverno opened this issue Jun 27, 2017 · 1 comment
Closed

Dirty issues list after SeCheck throws exception #615

inverno opened this issue Jun 27, 2017 · 1 comment
Assignees
Labels
type: bug Exceptions and blocking issues during analysis
Milestone

Comments

@inverno
Copy link
Contributor

inverno commented Jun 27, 2017

SonarJS version: Since 3.0-RC1

Rule key: Any SeCheck rule

The strengthening of the analyzer against unexpected exceptions (see SONARJS-970) has introduced a side-effect : the SeCheck, base class for all our Data Flow Analysis checks, contains an instance field that stores all issues raised during analysis and returns them to the Sensor on SeCheck.scanFile. In case of an exception raised by a SeCheck that specific check's issues list never gets cleaned up, since the exception management happens much above and the next SeCheck.scanFile happens only when the next file is being analyzed.
If we are lucky and the next file is shorter than the previous one, a new exception is likely raised when issues collected in the previous file are saved with an higher line number that is larger than the current file lines (save issue at line 400 when file has only 300 lines). If instead we are not lucky, the issue from the previous file gets saved on the new file, showing issues that make no sense to the user and which are almost impossible to point back to this case (something like : why is SonarQube showing a "useless increment" issue on the second and third letter of a function name??).

@inverno inverno added the type: bug Exceptions and blocking issues during analysis label Jun 27, 2017
@inverno inverno mentioned this issue Jun 27, 2017
@inverno inverno added this to the 3.1.1 milestone Jun 27, 2017
@inverno
Copy link
Contributor Author

inverno commented Jun 27, 2017

Fixed in branch-3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Exceptions and blocking issues during analysis
Projects
None yet
Development

No branches or pull requests

2 participants