We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
maybeparse
1 parent 8a06e24 commit 008b496Copy full SHA for 008b496
tools/vast-detect-parsers/ParserCategoryDetector.cpp
@@ -64,6 +64,25 @@ namespace vast {
64
}
65
results.push_back(result);
66
});
67
+
68
+ getOperation().walk([&](pr::MaybeParse op) {
69
+ gap::sarif::result result{
70
+ .ruleId{ "pr-maybeparse" },
71
+ .ruleIndex = 0,
72
+ .kind = gap::sarif::kind::kInformational,
73
+ .level = gap::sarif::level::kNote,
74
+ .message{
75
+ .text{ { "Potential parsing operation detected" } },
76
+ },
77
+ .locations{},
78
+ };
79
+ if (auto loc = cc::sarif::mk_location(op.getLoc());
80
+ loc.physicalLocation.has_value())
81
+ {
82
+ result.locations.push_back(std::move(loc));
83
+ }
84
+ results.push_back(result);
85
+ });
86
87
} // namespace vast
88
#endif
0 commit comments