GCC Middle and Back End API Reference
libsarifreplay.h
Go to the documentation of this file.
1/* A pure C API for replaying SARIF as diagnostics.
2 Copyright (C) 2023-2025 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it
7under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef LIBSARIFREPLAY_H
21#define LIBSARIFREPLAY_H
22
23#include "libgdiagnostics.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif /* __cplusplus */
28
36
37/* Attempt to load a .sarif file from SARIF_FILE, and
38 replay the diagnostics to OUTPUT_MANAGER.
39 Report any problems to CONTROL_MANAGER (such as
40 file-not-found, malformed .sarif, etc).
41 If ALLOW_JSON_COMMENTS is true, then allow C/C++ style comments
42 in the file.
43 If ECHO_FILE, then dump the filename and contents to stderr. */
44
45extern int
46sarif_replay_path (const char *sarif_file,
47 diagnostic_manager *output_manager,
48 diagnostic_manager *control_manager,
54
55#ifdef __cplusplus
56}
57#endif /* __cplusplus */
58
59#endif /* LIBSARIFREPLAY_H */
#define LIBGDIAGNOSTICS_PARAM_MUST_BE_NON_NULL(ARG_NUM)
Definition libgdiagnostics.h:47
diagnostic_colorize
Definition libgdiagnostics.h:81
int sarif_replay_path(const char *sarif_file, diagnostic_manager *output_manager, diagnostic_manager *control_manager, const replay_options *options) LIBGDIAGNOSTICS_PARAM_MUST_BE_NON_NULL(4)
Definition libsarifreplay.cc:1897
Definition libgdiagnostics.cc:365
Definition gengtype.h:179
Definition libsarifreplay.h:30
bool m_json_comments
Definition libsarifreplay.h:32
enum diagnostic_colorize m_diagnostics_colorize
Definition libsarifreplay.h:34
bool m_echo_file
Definition libsarifreplay.h:31
bool m_verbose
Definition libsarifreplay.h:33