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

change colourizer #644

Merged
merged 1 commit into from
Oct 18, 2015

Conversation

jmecosta
Copy link
Member

with this pr i get this error:

ERROR: Caused by: Unable to highlight file [moduleKey=com.fmrco.ist.fot:tws, relative=CppProjectMultiModule/CppProjectMultiModule.h, basedir=D:\SonarVersions\MultLanguageProject] from offset 1 to offset 13
ERROR: Caused by: 13 is not a valid offset for file [moduleKey=com.fmrco.ist.fot:tws, relative=CppProjectMultiModule/CppProjectMultiModule.h, basedir=D:\SonarVersions\MultLanguageProject]. Max offset is 12

for this file:

pragma once

if include \r\n then it does not fail.

this pr is just to help debug what file is failing so users can add the new line

@guwirth
Copy link
Collaborator

guwirth commented Oct 17, 2015

@jmecosta wouldn't it be better to fix the wrong offset calculation instead of creating an error message?

@jmecosta
Copy link
Member Author

Sure, i did try. But did not went far because all the tests are throwing
exceptions not sure why?

But anyway, even if fixing this case there might be more and the logging
should help

On Sat, Oct 17, 2015, 22:42 Günter Wirth [email protected] wrote:

@jmecosta https://github.com/jmecosta wouldn't it be better to fix the
wrong offset calculation instead of creating an error message?


Reply to this email directly or view it on GitHub
#644 (comment).

@jmecosta
Copy link
Member Author

@guwirth i will try to still understand what that thing, seems to me that we can use another approach to highlight code. for example :
https://github.com/SonarCommunity/sonar-csharp/blob/master/src/main/java/org/sonar/plugins/csharp/CSharpSourceCodeColorizer.java

that does not rely on the AST

@jmecosta jmecosta changed the title improve logging when highligh fails change colourizer Oct 18, 2015
@guwirth guwirth added the bug label Oct 18, 2015
@guwirth guwirth added this to the M 0.9.4 milestone Oct 18, 2015
@guwirth
Copy link
Collaborator

guwirth commented Oct 18, 2015

👍 PR looks good to me. My only question is if this interface is the most up to date one?

@jmecosta
Copy link
Member Author

perhaps not, however i did a test with 5.2 RC 2 and with the previous
version on top of the problem i add during normal analysis there was
another issue in server side.

see: https://groups.google.com/forum/#!topic/sonarqube/lupyII6ATvo

once i used the colorizer everything went ok. anyway, as long as we follow
what the c# plugin does i think we are ok. at least i took the code from
there

On Sun, 18 Oct 2015 at 11:19 Günter Wirth [email protected] wrote:

[image: 👍] PR looks good to me. My only question is if this interface
is the most up to date one?


Reply to this email directly or view it on GitHub
#644 (comment).

guwirth added a commit that referenced this pull request Oct 18, 2015
@guwirth guwirth merged commit b95fd57 into SonarOpenCommunity:master Oct 18, 2015
@guwirth guwirth mentioned this pull request Oct 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants