Exclude logging sinks

Those sinks are too coarse grained to be exposed as sinks on any model.
This commit is contained in:
Benjamin Muskalla
2022-01-19 16:10:43 +01:00
parent 25d251c24f
commit 52406dc8df
2 changed files with 7 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ string captureSink(TargetAPI api) {
config.hasFlow(src, sink) and
sinkNode(sink, kind) and
api = src.getEnclosingCallable() and
not kind = "logging" and
result = asSinkModel(api, asInputArgument(src), kind)
)
}

View File

@@ -7,6 +7,7 @@ import java.nio.file.CopyOption;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.logging.Logger;
public class Sinks {
@@ -25,4 +26,9 @@ public class Sinks {
String foo = new Sinks().readUrl(new URL(args[0]), Charset.defaultCharset());
}
public void propagate(String s) {
Logger logger = Logger.getLogger(Sinks.class.getSimpleName());
logger.warning(s);
}
}