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

Analysis does not continue after error (sonar.cxx.errorRecoveryEnabled=true) #1386

Closed
guwirth opened this issue Jan 14, 2018 · 0 comments · Fixed by #1387
Closed

Analysis does not continue after error (sonar.cxx.errorRecoveryEnabled=true) #1386

guwirth opened this issue Jan 14, 2018 · 0 comments · Fixed by #1387
Labels
Milestone

Comments

@guwirth
Copy link
Collaborator

guwirth commented Jan 14, 2018

Analysis does not continue after error (sonar.cxx.errorRecoveryEnabled=true)
https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Supported-configuration-properties#sonarcxxerrorrecoveryenabled

ERROR: Error during SonarQube Scanner execution
org.sonar.squidbridge.api.AnalysisException: Unable to analyze file: xxx.h
	at org.sonar.squidbridge.AstScanner.scanFiles(AstScanner.java:131)
	at org.sonar.cxx.sensors.squid.CxxSquidSensor.execute(CxxSquidSensor.java:164)
	at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
        ...
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
        ...
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalArgumentException: Line 41 is out of range for file xxx.h. File has 40 lines.
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
	at org.sonar.scanner.DefaultFileLinesContext.checkLineRange(DefaultFileLinesContext.java:70)
	at org.sonar.scanner.DefaultFileLinesContext.setIntValue(DefaultFileLinesContext.java:63)
	at org.sonar.cxx.sensors.visitors.CxxFileLinesVisitor.lambda$leaveFile$0(CxxFileLinesVisitor.java:185)
	at java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source)
	at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
	at org.sonar.cxx.sensors.visitors.CxxFileLinesVisitor.leaveFile(CxxFileLinesVisitor.java:185)
	at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:71)
	at org.sonar.squidbridge.AstScanner.scanFiles(AstScanner.java:110)
	... 33 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant