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

Support columns in annotations and expose path merging algorithm #167

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Luro02
Copy link
Collaborator

@Luro02 Luro02 commented Jan 29, 2025

Artemis seems to only support annotating an entire line. For grading, it is useful to support highlighting parts of a line.

For example, given this code and two annotations:

int three = 3;
//  ^ bad identifier
//          ^ magic number

intelligrade would highlight everything in that line, even though it could just highlight the identifier and the magic number. The autograder already exposes the column information.

This PR closes #158.

In addition to that, it closes #163.

The formatting of paths

I implemented this code in multiple codebases now, mainly intelligrade and this library share similar code. That is why I decided to write a more refined version in artemis4j that can then be used in intelligrade as well.

After about 20 hours of work later, we end up with the code in this pull request.

With this PR, I learned that lines are 0-indexed and not 1-indexed. That is confusing, and nobody even noticed that the annotation merging code assumed they were 1-indexed. The bug is now fixed, but this should be checked in intelligrade.

This PR takes care of #159 as well

This PR closes #159.

This is the before:
Screenshot 2025-02-09 110439

After this PR is merged:
Screenshot 2025-02-09 110243

@Luro02
Copy link
Collaborator Author

Luro02 commented Jan 29, 2025

image
Regarding that, not possible. Spotless breaks when you use that.

@kit-sdq kit-sdq deleted a comment from sonarqubecloud bot Feb 2, 2025
@Luro02 Luro02 marked this pull request as ready for review February 2, 2025 14:19
@Luro02 Luro02 requested a review from a team as a code owner February 2, 2025 14:19
Copy link

sonarqubecloud bot commented Feb 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
2 New issues

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
1 participant