Skip to content

Conversation

@rcosta358
Copy link
Collaborator

@rcosta358 rcosta358 commented Nov 13, 2025

This PR is a follow-up of #110.
It refactors errors and warnings and also gives them a better look.

image image

Additional Improvements

  • Use annotation position when syntax error occurs, instead of the target
  • Exclude qualified names from error messages
  • Remove true && ... from found ghost states

Next Steps

Allow for multiple errors by instead of stopping verification when an error is found, throw the error and catch it on visitors (visitCtMethod, visitCtClass, visitCtField), add it to the collection and keep the verification going.

@rcosta358 rcosta358 self-assigned this Nov 13, 2025
Copy link
Collaborator

@CatarinaGamboa CatarinaGamboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

* Base class for all LiquidJava errors
*/
public abstract class LJError {
public abstract class LJError extends LJDiagnostic {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nicee

tc.getContext().addVarToContext(name, r, new Predicate(), e);
tc.getContext().addVarToContext(nameOld, r, new Predicate(), e);
// TODO REVIEW!!
// what is it for?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove these comments afterwards or actually give a comment for what we are doing here

@rcosta358 rcosta358 merged commit 9b14c3f into main Nov 14, 2025
1 check passed
@rcosta358 rcosta358 deleted the refactor-diagnostics branch November 15, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants