]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Remove level attribute from Rules in the SARIF report
authorViljar Indus <indus@adacore.com>
Thu, 28 Nov 2024 10:44:37 +0000 (12:44 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 6 Jan 2025 09:14:47 +0000 (10:14 +0100)
commitb4c9ba204b6c9fd59ef25e810431a3fc2027e4ef
tree857e29011008f789944af73a462056e15b969e02
parent92d50b9d6478d58a99012f3c05bd144b7fcd8937
ada: Remove level attribute from Rules in the SARIF report

A Rule object in the SARIF report does not have a level
attribute. Result objects are the elements in the SARIF
reprot that have a level attribute that ultimately determines
the level of each diagnostic object.

Rules can have a defaultConfiguration attribute which has a level
attribute that can be overridden in multiple ways. This can make
the overall report more complex than it needs to be. It is simpler
to remove the attribute from rules where it does not really matter
and add it back in under the defaultConfiguration when there is an
explicit need for it.

gcc/ada/ChangeLog:

* diagnostics-sarif_emitter.adb (Print_Rule): Remove printing
of the level attribute since it does not match the SARIF schema.
gcc/ada/diagnostics-sarif_emitter.adb