dbartol wrote:

@AaronBallman 

> are these stable IDs usually displayed to the user in tools consuming SARIF? 
> If so, are we sure these default IDs are reasonable for those cases? Or do we 
> have to worry about tools expecting stable IDs to be short (so our long 
> identifiers might get cut off such that the user only sees warn_foo_w and not 
> warn_foo_was_bad_because_bar?

The SARIF consumer I'm most familiar with is GitHub Advanced Security, which 
does display the rule ID, but not particularly prominently. Screenshot 
attached, with rule ID highlighted.

<img width="724" height="627" alt="GHAS Alert" 
src="https://github.com/user-attachments/assets/321fa0de-61c2-44e2-9a36-952ff77622a5";
 />

As far as ID length goes, MSVC keeps it short (e.g., `C4101`), but that's 
mostly because MSVC has had those stable 4-or-5-digit warning IDs since at 
least the mid-90's. However, CodeQL has significantly longer IDs, like 
`cpp/local-variable-hides-global-variable` or 
`cpp/comma-before-misleading-indentation`, which seem comparable to Clang's 
existing warning enum names. I think we're OK using the IDs we've already got.


https://github.com/llvm/llvm-project/pull/168153
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to