{"action":"created","issue":{"url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/996","repository_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx","labels_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/996/labels{/name}","comments_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/996/comments","events_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/996/events","html_url":"https://github.com/SonarOpenCommunity/sonar-cxx/issues/996","id":189161279,"number":996,"title":"CxxHighlighter is requesting multiple highlights for overlapping section/lines","user":{"login":"CCob","id":3064210,"avatar_url":"https://avatars.githubusercontent.com/u/3064210?v=3","gravatar_id":"","url":"https://api.github.com/users/CCob","html_url":"https://github.com/CCob","followers_url":"https://api.github.com/users/CCob/followers","following_url":"https://api.github.com/users/CCob/following{/other_user}","gists_url":"https://api.github.com/users/CCob/gists{/gist_id}","starred_url":"https://api.github.com/users/CCob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCob/subscriptions","organizations_url":"https://api.github.com/users/CCob/orgs","repos_url":"https://api.github.com/users/CCob/repos","events_url":"https://api.github.com/users/CCob/events{/privacy}","received_events_url":"https://api.github.com/users/CCob/received_events","type":"User","site_admin":false},"labels":[{"id":15973031,"url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/labels/bug","name":"bug","color":"fc2929","default":true},{"id":15973034,"url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/labels/invalid","name":"invalid","color":"e6e6e6","default":true}],"state":"closed","locked":false,"assignee":{"login":"guwirth","id":6077367,"avatar_url":"https://avatars.githubusercontent.com/u/6077367?v=3","gravatar_id":"","url":"https://api.github.com/users/guwirth","html_url":"https://github.com/guwirth","followers_url":"https://api.github.com/users/guwirth/followers","following_url":"https://api.github.com/users/guwirth/following{/other_user}","gists_url":"https://api.github.com/users/guwirth/gists{/gist_id}","starred_url":"https://api.github.com/users/guwirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guwirth/subscriptions","organizations_url":"https://api.github.com/users/guwirth/orgs","repos_url":"https://api.github.com/users/guwirth/repos","events_url":"https://api.github.com/users/guwirth/events{/privacy}","received_events_url":"https://api.github.com/users/guwirth/received_events","type":"User","site_admin":false},"assignees":[{"login":"guwirth","id":6077367,"avatar_url":"https://avatars.githubusercontent.com/u/6077367?v=3","gravatar_id":"","url":"https://api.github.com/users/guwirth","html_url":"https://github.com/guwirth","followers_url":"https://api.github.com/users/guwirth/followers","following_url":"https://api.github.com/users/guwirth/following{/other_user}","gists_url":"https://api.github.com/users/guwirth/gists{/gist_id}","starred_url":"https://api.github.com/users/guwirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guwirth/subscriptions","organizations_url":"https://api.github.com/users/guwirth/orgs","repos_url":"https://api.github.com/users/guwirth/repos","events_url":"https://api.github.com/users/guwirth/events{/privacy}","received_events_url":"https://api.github.com/users/guwirth/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/milestones/8","html_url":"https://github.com/SonarOpenCommunity/sonar-cxx/milestone/8","labels_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/milestones/8/labels","id":1845404,"number":8,"title":"0.9.7","description":"support of SQ 5.6 to SQ 6.2","creator":{"login":"guwirth","id":6077367,"avatar_url":"https://avatars.githubusercontent.com/u/6077367?v=3","gravatar_id":"","url":"https://api.github.com/users/guwirth","html_url":"https://github.com/guwirth","followers_url":"https://api.github.com/users/guwirth/followers","following_url":"https://api.github.com/users/guwirth/following{/other_user}","gists_url":"https://api.github.com/users/guwirth/gists{/gist_id}","starred_url":"https://api.github.com/users/guwirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guwirth/subscriptions","organizations_url":"https://api.github.com/users/guwirth/orgs","repos_url":"https://api.github.com/users/guwirth/repos","events_url":"https://api.github.com/users/guwirth/events{/privacy}","received_events_url":"https://api.github.com/users/guwirth/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":125,"state":"open","created_at":"2016-06-23T14:00:06Z","updated_at":"2017-01-25T18:10:30Z","due_on":"2016-12-31T08:00:00Z","closed_at":null},"comments":4,"created_at":"2016-11-14T16:39:50Z","updated_at":"2017-01-26T16:41:24Z","closed_at":"2016-12-25T13:52:45Z","body":"When analyzing files within my C++ project, multiple highlighters have been requested for the same section of text within the source.  It seems SonarQube will check for overlapping highlight ranges and throw errors when it finds overlapping highlight sections.\r\n\r\nHere is the line that SonarQube is complaining about\r\n\r\n```\r\n        qWarning() << \"Failed to open file \" << sourceFilename << \" for reading\";\r\n```\r\n\r\nAnd here is the exception\r\n\r\n```\r\norg.sonar.squidbridge.api.AnalysisException: Unable to analyze file: File.cpp\r\n\tat org.sonar.squidbridge.AstScanner.scanFiles(AstScanner.java:131)\r\n\tat org.sonar.plugins.cxx.squid.CxxSquidSensor.execute(CxxSquidSensor.java:128)\r\n\tat org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)\r\n\tat org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)\r\n\tat org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)\r\n\tat org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)\r\n\tat org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)\r\n\tat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)\r\n\tat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)\r\n\tat org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)\r\n\tat org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)\r\n\tat org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)\r\n\tat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)\r\n\tat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)\r\n\tat org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)\r\n\tat org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)\r\n\tat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)\r\n\tat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)\r\n\tat org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)\r\n\tat org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)\r\n\tat org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)\r\n\tat com.sun.proxy.$Proxy0.execute(Unknown Source)\r\n\tat org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)\r\n\tat org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)\r\n\tat org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)\r\n\tat org.sonarsource.scanner.cli.Main.execute(Main.java:74)\r\n\tat org.sonarsource.scanner.cli.Main.main(Main.java:61)\r\nCaused by: java.lang.IllegalStateException: Cannot register highlighting rule for characters at Range[from [line=163, lineOffset=38] to [line=163, lineOffset=46]] as it overlaps at least one existing rule\r\n\tat org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.checkOverlappingBoudaries(DefaultHighlighting.java:59)\r\n\tat org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.doSave(DefaultHighlighting.java:122)\r\n\tat org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:43)\r\n\tat org.sonar.plugins.cxx.highlighter.CxxHighlighter.leaveFile(CxxHighlighter.java:118)\r\n\tat com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:71)\r\n\tat org.sonar.squidbridge.AstScanner.scanFiles(AstScanner.java:110)\r\n\t... 31 more\r\n```"},"comment":{"url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/comments/275438999","html_url":"https://github.com/SonarOpenCommunity/sonar-cxx/issues/996#issuecomment-275438999","issue_url":"https://api.github.com/repos/SonarOpenCommunity/sonar-cxx/issues/996","id":275438999,"user":{"login":"tomikais","id":7860085,"avatar_url":"https://avatars.githubusercontent.com/u/7860085?v=3","gravatar_id":"","url":"https://api.github.com/users/tomikais","html_url":"https://github.com/tomikais","followers_url":"https://api.github.com/users/tomikais/followers","following_url":"https://api.github.com/users/tomikais/following{/other_user}","gists_url":"https://api.github.com/users/tomikais/gists{/gist_id}","starred_url":"https://api.github.com/users/tomikais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomikais/subscriptions","organizations_url":"https://api.github.com/users/tomikais/orgs","repos_url":"https://api.github.com/users/tomikais/repos","events_url":"https://api.github.com/users/tomikais/events{/privacy}","received_events_url":"https://api.github.com/users/tomikais/received_events","type":"User","site_admin":false},"created_at":"2017-01-26T16:41:24Z","updated_at":"2017-01-26T16:41:24Z","body":"Hi,\r\nI have the the same issue:\r\norg.sonar.squidbridge.api.AnalysisException: Unable to analyze file: \r\n\tat org.sonar.squidbridge.AstScanner.scanFiles(AstScanner.java:131)\r\n\tat org.sonar.plugins.cxx.squid.CxxSquidSensor.execute(CxxSquidSensor.java:141)\r\n\tat org.sonar.batch.sensor.SensorWrapper.analyse(SensorWrapper.java:57)\r\n\tat org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)\r\n\tat org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)\r\n\tat org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)\r\n\tat org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)\r\n\tat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)\r\n\tat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)\r\n\tat org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)\r\n\tat org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)\r\n\tat org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)\r\n\tat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)\r\n\tat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)\r\n\tat org.sonar.batch.task.ScanTask.execute(ScanTask.java:47)\r\n\tat org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)\r\n\tat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)\r\n\tat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)\r\n\tat org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106)\r\n\tat org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)\r\n\tat org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)\r\n\tat com.sun.proxy.$Proxy0.execute(Unknown Source)\r\n\tat org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)\r\n\tat org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)\r\n\tat org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)\r\n\tat org.sonarsource.scanner.cli.Main.execute(Main.java:74)\r\n\tat org.sonarsource.scanner.cli.Main.main(Main.java:61)\r\nCaused by: java.lang.IllegalStateException: Cannot register highlighting rule for characters at Range[from [line=73, lineOffset=90] to [line=73, lineOffset=96]] as it overlaps at least one existing rule\r\n\tat org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.checkOverlappingBoudaries(DefaultHighlighting.java:59)\r\n\tat org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.doSave(DefaultHighlighting.java:124)\r\n\tat org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:43)\r\n\tat org.sonar.plugins.cxx.highlighter.CxxHighlighter.leaveFile(CxxHighlighter.java:118)\r\n\tat com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:71)\r\n\tat org.sonar.squidbridge.AstScanner.scanFiles(AstScanner.java:110)\r\n\t... 31 more\r\n\r\nRegards, Thomas"}}
{"actor":{"display_login":"tomikais"}}