-
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 comparison view not working in local mode #1038
Conversation
…hub.com/jplag/JPlag into bug/report-viewer-local-comparison-view
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.
Other than the one comment, I think this looks good.
core/src/main/java/de/jplag/reporting/reportobject/ReportObjectFactory.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
return Path.of(submissionToIdFunction.apply(submission), submissionToIdFunction.apply(submission)).toString(); | ||
} | ||
return Path.of(submissionToIdFunction.apply(submission), submission.getRoot().toPath().relativize(file.toPath()).toString()).toString(); | ||
return new Match(FilePathUtil.getRelativeSubmissionPath(startOfFirst.getFile(), comparison.firstSubmission(), submissionToIdFunction), |
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.
This return
really isn't that readable, and neither was the original one.
That's the only thing I found in my static code review, I will perform some runtime tests later.
I successfully tested the following:
|
The comparison view of the report viewer was broken when using local mode.
To fix this I added the file
submissionFileIndex.json
file, which stores a map of submission IDs to all their submitted files, which now gets read when opening the comparison view.I also updated the wikis page about the report generation accordingly.