Skip to content

Commit

Permalink
added three example quickfixes, untested
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Oct 31, 2024
1 parent 1e39c0a commit 9db5751
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import Set;
import String;

import util::Reflective;
import util::IDEServices;

// ---- Utilities -------------------------------------------------------------

Expand Down Expand Up @@ -320,7 +321,7 @@ void collect(current: (FunctionDeclaration) `<FunctionDeclaration decl>`, Collec
if(decl is abstract){
if("javaClass" in tagsMap){
if("java" notin modifiers){
c.report(warning(decl.signature, "Missing modifier `java`", fixes=addJavaModifier(decl)));
c.report(warning(decl.signature, "Missing modifier `java`", fixes=[addJavaModifier(decl)]));
}
if("test" in modifiers){
c.report(warning(decl.signature, "Modifier `test` cannot be used for Java functions"));
Expand All @@ -330,10 +331,10 @@ void collect(current: (FunctionDeclaration) `<FunctionDeclaration decl>`, Collec
}
} else {
if("javaClass" in tagsMap){
c.report(warning(decl.signature, "Redundant tag `javaClass`", fixes=removeJavaClass(decl)));
c.report(warning(decl.signature, "Redundant tag `javaClass`", fixes=[removeJavaClass(decl)]));
}
if("java" in modifiers){
c.report(warning(decl.signature, "Redundant modifier `java`", fixes=removeJavaModifier(decl)));
c.report(warning(decl.signature, "Redundant modifier `java`", fixes=[removeJavaModifier(decl)]));
}
}
Expand Down

0 comments on commit 9db5751

Please sign in to comment.