File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/api/messages Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 44import com .ibm .wala .cast .tree .CAstSourcePositionMap .Position ;
55import com .ibm .wala .util .collections .Pair ;
66import magpiebridge .core .AnalysisResult ;
7+ import org .thymeleaf .context .IContext ;
78
89import java .io .File ;
910import java .net .MalformedURLException ;
@@ -58,6 +59,11 @@ public interface MultiPiece {
5859 public static class Piece implements MultiPiece {
5960 private String text ;
6061 private GoblintLocation loc ;
62+ private context context ;
63+
64+ public static class context {
65+ private Integer tag ;
66+ }
6167
6268 /**
6369 * Converts the Single (Piece type of) Goblint messages from the
@@ -70,7 +76,8 @@ public static class Piece implements MultiPiece {
7076 */
7177 public List <AnalysisResult > convert (List <Tag > tags , String severity , boolean explode ) {
7278 GoblintPosition pos = getLocation (loc );
73- String msg = joinTags (tags ) + " " + text ;
79+ String ctx = context == null || context .tag == null ? "" : " in context " + context .tag ;
80+ String msg = joinTags (tags ) + " " + text + ctx ;
7481 GoblintMessagesAnalysisResult result = new GoblintMessagesAnalysisResult (pos , msg , severity );
7582 return List .of (result );
7683 }
You can’t perform that action at this time.
0 commit comments