gcc/contrib
David Malcolm ea1506adbe libdiagnostics: add a "sarif-replay" command-line tool [PR96032]
This patch adds a new "sarif-replay" command-line tool for
viewing .sarif files.  It uses libdiagnostics to "replay"
any diagnostics found in the .sarif files in text form as if
they were GCC diagnostics.

contrib/ChangeLog:
	PR other/96032
	* regenerate-sarif-spec-index.py: New file.

gcc/ChangeLog:
	PR other/96032
	* Makefile.in (lang_checks): If libdiagnostics is enabled, add
	check-sarif-replay.
	(SARIF_REPLAY_OBJS): New.
	(ALL_HOST_OBJS): If libdiagnostics is enabled, add
	$(SARIF_REPLAY_OBJS).
	(sarif-replay): New.
	(install-libdiagnostics): Add sarif-replay to deps, and install
	it.
	* configure: Regenerate.
	* configure.ac (check_languages): If libdiagnostics is enabled,
	add check-sarif-replay.
	(LIBDIAGNOSTICS): If libdiagnostics is enabled, add sarif-replay.
	* doc/install.texi (--enable-libdiagnostics): Note that it also
	enables sarif-replay.
	* libsarifreplay.cc: New file.
	* libsarifreplay.h: New file.
	* sarif-replay.cc: New file.
	* sarif-spec-urls.def: New file.

gcc/testsuite/ChangeLog:
	PR other/96032
	* lib/gcc-dg.exp (gcc-dg-test-1): Add "replay-sarif".
	* lib/sarif-replay-dg.exp: New file.
	* lib/sarif-replay.exp: New file.
	* sarif-replay.dg/2.1.0-invalid/3.1-not-an-object.sarif: New test.
	* sarif-replay.dg/2.1.0-invalid/3.11.11-malformed-placeholder.sarif:
	New test.
	* sarif-replay.dg/2.1.0-invalid/3.11.11-missing-arguments-for-placeholders.sarif:
	New test.
	* sarif-replay.dg/2.1.0-invalid/3.11.11-not-enough-arguments-for-placeholders.sarif:
	New test.
	* sarif-replay.dg/2.1.0-invalid/3.13.2-no-version.sarif: New test.
	* sarif-replay.dg/2.1.0-invalid/3.13.2-version-not-a-string.sarif:
	New test.
	* sarif-replay.dg/2.1.0-invalid/3.13.4-bad-runs.sarif: New test.
	* sarif-replay.dg/2.1.0-invalid/3.13.4-no-runs.sarif: New test.
	* sarif-replay.dg/2.1.0-invalid/3.13.4-non-object-in-runs.sarif:
	New test.
	* sarif-replay.dg/2.1.0-invalid/3.27.10-bad-level.sarif: New test.
	* sarif-replay.dg/2.1.0-unhandled/3.27.10-none-level.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/error-with-note.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/escaped-braces.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/null-runs.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/signal-1.c.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/spec-example-1.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/spec-example-2.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/spec-example-3.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/spec-example-4.sarif: New test.
	* sarif-replay.dg/2.1.0-valid/tutorial-example.sarif: New test.
	* sarif-replay.dg/dg.exp: New script.
	* sarif-replay.dg/malformed-json/array-missing-comma.sarif: New test.
	* sarif-replay.dg/malformed-json/array-with-trailing-comma.sarif:
	New test.
	* sarif-replay.dg/malformed-json/bad-token.sarif: New test.
	* sarif-replay.dg/malformed-json/object-missing-comma.sarif: New test.
	* sarif-replay.dg/malformed-json/object-with-trailing-comma.sarif:
	New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2024-11-18 17:08:37 -05:00
..
gcc-changelog contrib: Add another ignored commit 2024-11-14 10:14:53 -07:00
header-tools Daily bump. 2024-06-06 00:16:43 +00:00
legacy Update copyright years. 2024-01-03 12:19:35 +01:00
mdcompact contrib: add mdcompact 2023-10-05 17:41:54 +02:00
reghunt Update copyright years. 2024-01-03 12:19:35 +01:00
regression Update copyright years. 2024-01-03 12:19:35 +01:00
testsuite-management Update copyright years. 2024-01-03 12:19:35 +01:00
unicode contrib, libcpp, libstdc++: Update to Unicode 16.0 2024-10-08 10:01:47 +02:00
vim-gcc-dev Update copyright years. 2024-01-03 12:19:35 +01:00
analyze_brprob_spec.py contrib: Remove C-style comments from Python files 2024-01-05 13:57:05 +00:00
analyze_brprob.py contrib: Remove C-style comments from Python files 2024-01-05 13:57:05 +00:00
bench-stringop Update copyright years. 2024-01-03 12:19:35 +01:00
ChangeLog Daily bump. 2024-11-18 00:17:28 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
check_GNU_style_lib.py check_GNU_style: Use raw strings. 2024-06-05 21:32:45 +02:00
check_GNU_style.py contrib: Remove C-style comments from Python files 2024-01-05 13:57:05 +00:00
check_GNU_style.sh Update copyright years. 2024-01-03 12:19:35 +01:00
check_makefile_deps.sh Update copyright years. 2024-01-03 12:19:35 +01:00
check_warning_flags.sh Update copyright years. 2024-01-03 12:19:35 +01:00
check-internal-format-escaping.py
check-MAINTAINERS.py Add gcc.gnu.org account names to MAINTAINERS 2024-07-13 16:22:58 +01:00
check-params-in-docs.py contrib: Set check-params-in-docs.py to skip tables of values of a param 2024-09-18 16:38:30 +02:00
clang-format Update copyright years. 2024-01-03 12:19:35 +01:00
compare_tests compare_tests: distinguish c-c++-common results by tool 2023-12-21 01:02:41 -03:00
compare_two_ftime_report_sets Update copyright years. 2024-01-03 12:19:35 +01:00
compare-all-tests Update copyright years. 2024-01-03 12:19:35 +01:00
compare-debug Update copyright years. 2024-01-03 12:19:35 +01:00
compare-lto Update copyright years. 2024-01-03 12:19:35 +01:00
compareSumTests3 Update copyright years. 2024-01-03 12:19:35 +01:00
config-list.mk Remove ia64*-*-linux from the list of obsolete targets 2024-10-09 11:28:20 +02:00
dg-cmp-results.sh Update copyright years. 2024-01-03 12:19:35 +01:00
dg-extract-results.py dg-extract-results.py: Ignore case in header line 2024-01-11 17:46:12 +01:00
dg-extract-results.sh contrib: Improve dg-extract-results.sh's Python detection [PR109668] 2024-03-08 15:24:20 +01:00
dg-out-generator.pl Update copyright years. 2024-01-03 12:19:35 +01:00
dglib.pm Update copyright years. 2024-01-03 12:19:35 +01:00
download_prerequisites Update copyright years. 2024-01-03 12:19:35 +01:00
filter_gcc_for_doxygen contrib: port doxygen script to Python3 2023-04-28 16:42:17 +02:00
filter_knr2ansi.pl
filter_params.py contrib: port doxygen script to Python3 2023-04-28 16:42:17 +02:00
filter-clang-warnings.py contrib: Remove C-style comments from Python files 2024-01-05 13:57:05 +00:00
gcc_build Update copyright years. 2024-01-03 12:19:35 +01:00
gcc_update Rust: Move 'libformat_parser' build into libgrust 2024-08-01 13:11:28 +02:00
gcc-git-customization.sh contrib: add git gcc-style alias 2023-12-20 18:08:16 -05:00
gcc.doxy
gen_autofdo_event.py Update gcc-auto-profile / gen_autofdo_event.py 2024-11-08 20:42:43 -08:00
gennews Update gennews for GCC 14. 2024-05-07 08:48:19 +02:00
git-add-user-branch.sh
git-add-vendor-branch.sh
git-backport.py Update copyright years. 2024-01-03 12:19:35 +01:00
git-commit-mklog.py Update copyright years. 2024-01-03 12:19:35 +01:00
git-descr.sh
git-fetch-vendor.sh
git-fix-changelog.py Update copyright years. 2024-01-03 12:19:35 +01:00
git-undescr.sh
gthr_supp_vxw_5x.c
index-prop
jit-coverage-report.py Update copyright years. 2024-01-03 12:19:35 +01:00
make_sunver.pl build: Derive object names in make_sunver.pl 2024-05-07 13:14:05 +02:00
make-obstacks-texi.pl
mark_spam.py contrib: Remove C-style comments from Python files 2024-01-05 13:57:05 +00:00
mklog.py contrib: mklog: Use present tense in ChangeLog 2024-03-01 16:21:46 +01:00
paranoia.cc
patch_tester.sh Update copyright years. 2024-01-03 12:19:35 +01:00
prepare_patch.sh Update copyright years. 2024-01-03 12:19:35 +01:00
prepare-commit-msg Update copyright years. 2024-01-03 12:19:35 +01:00
prerequisites.md5 *: add modern gettext 2023-11-14 00:47:11 +01:00
prerequisites.sha512 *: add modern gettext 2023-11-14 00:47:11 +01:00
regenerate-sarif-spec-index.py libdiagnostics: add a "sarif-replay" command-line tool [PR96032] 2024-11-18 17:08:37 -05:00
relpath.sh libstdc++: add module std [PR106852] 2024-11-17 16:23:21 +01:00
repro_fail contrib: Fix nonportable shell syntax in "test" and "[" commands [PR105831] 2023-05-18 14:01:40 +01:00
test_installed contrib: Fill in HOST{CC,CFLAGS,CXX,CXXFLAGS} in test_installed 2024-02-05 18:57:45 +01:00
test_mklog.py contrib: Update test_mklog to correspond to mklog 2024-03-07 13:23:49 +01:00
test_recheck
test_summary
texi2pod.pl Update copyright years. 2024-01-03 12:19:35 +01:00
uninclude
unused_functions.py Update copyright years. 2024-01-03 12:19:35 +01:00
update-copyright.py Small tweaks for update-copyright.py 2024-01-03 12:11:32 +01:00
vimrc Update copyright years. 2024-01-03 12:19:35 +01:00
warn_summary