Ada SARIF output now goes to current directory.
The Ada compiler now generates SARIF output files in the current working directory instead of next to the source file.
The Ada compiler’s SARIF (Static Analysis Results Interchange Format) output file generation has been modified. Previously, the SARIF file was created in the same directory as the source file. Now, the SARIF file is always created in the current working directory, mirroring the behavior of GCC’s SARIF output. This change simplifies locating and managing SARIF output files.
In Details
This change modifies errout.adb (Output_Messages) to generate SARIF files in the current working directory. The Strip_Directory function in osint.adb is used to strip the directory path from the source file name when constructing the SARIF file name. This brings Ada SARIF output in line with GCC's behavior.
For Context
SARIF is a standardized JSON-based format for reporting the results of static analysis tools. Static analysis tools examine source code for potential bugs and security vulnerabilities without actually running the code. This commit changes the location where the Ada compiler's SARIF output files are created. Instead of placing them alongside the source code, the compiler now puts them in the current working directory facilitating easier access.