-
Notifications
You must be signed in to change notification settings - Fork 332
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
Fix Report Viewer #573
Fix Report Viewer #573
Conversation
Thank you for your fast reaction, I will review the PR tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nestabentum @tsaglam Also, not related to this issue, but also broken: Didn't an earlier version of the report viewer highlight plagiarized code snippets in the viewer? At least in my tests today, this feature was not visible. Or did I miss something? |
0046892
to
ae8868c
Compare
@sebinside Oh, I forgot to push the corresponding commit. It should work now. |
@sebinside both this issue and the weird looking side panel stem from a bug in the match computation in the report generation. It happens in The match computation was dependent on I don't really get why a differentiation based on |
Careful here, basically What does that mean for you? If the frontend has So change this: JPlag/jplag/src/main/java/de/jplag/reporting/reportobject/mapper/ComparisonReportMapper.java Line 36 in 8d28e95
to !result.getOptions().getLanguage().supportsColumns() (meaning ¬ supportsColumns() )
EDIT: As you are confused by the continuous index, it could mean the report viewer does not really support the continuous index and just uses it as a line index? We can check this by using the char frontend and checking if the report displays it correctly (after fixing the line above of course). |
@tsaglam thanks for the explanation, now I get it. I changed the code accordingly. The ComparisonView should now be back to its old beauty
Yes, currently, the report viewer only supports line-wise highlighting. |
Kudos, SonarCloud Quality Gate passed! |
Great to hear!
@sebinside we should not address this, we should just remove the char frontend. |
@nestabentum Thank you for the fast work. Really appreciated! |
Concerning issue #571 :
I falsely assumed that the submission file name would always have the same index when splitting its path, as this was always the case when I tested the viewer. The submission files in my zip always had the path
result/submissions/<submission-file>
, therefore I extracted the submission file name from splitting the path at / and accessing index 2.The submission files in the zip you provided have the path
submission/<submission-file>
and therefore the filenames are not extracted correctly.Consequently, I changed the file name extraction to locate the index of the submission folder and find the submission files by a accessing the the found index+1.
Additionally, I changed the way how empty submissions are displayed: Instead of showing one empty line, the text "Empty File" is displayed.