https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122657

            Bug ID: 122657
           Summary: Add option to set directory for SARIF files
           Product: gcc
           Version: 15.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: diagnostics
          Assignee: dmalcolm at redhat dot com
          Reporter: ross at burtonini dot com
  Target Milestone: ---

SARIF files are currently written into the current working directory, not
alongside the source not alongside the binary.  It seems like adding this as a
diagnostic option (defaulting to .) would be fairly clean.

For example, -fdiagnostics-set-output=sarif:directory=/some/dir would write
<source>.sarif files into /some/dir.

My use-case for this is so I can tell gcc once to write sarif files into an
empty directory, and then after the build I know that all of the diagnostics
are contained in that directory. This will then let me search for specific
warnings or show logs without having to search stdout.

Reply via email to