Skip to content

Commit

Permalink
Local variables starting with _ no longer reported as unused
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Mar 16, 2024
1 parent 10b7aac commit 4111742
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ bool rascalReportUnused(loc def, TModel tm){
case variableId(): { if(!config.warnUnusedVariables) return false;
container = definitions[findContainer(def, definitions, scopes)];
if(container.idRole == moduleId() && define.defInfo.vis == publicVis()) return false;
return isWildCard(define.id[0]) || define.id == "it";
return !(isWildCard(define.id[0]) || define.id == "it");
}
case moduleVariableId(): return false;
case annoId(): return false;
Expand Down

0 comments on commit 4111742

Please sign in to comment.