Skip to content

Commit 5fbfa7d

Browse files
authored
style(clang-tidy): Supress cppcoreguidelines-avoid-non-const-global-variables false positives (#1743)
fixes #1662 Signed-off-by: Balakrishna Avulapati <[email protected]>
1 parent 5ad7de4 commit 5fbfa7d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/core/json/json.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
namespace sourcemeta::core {
1717

18+
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
1819
auto parse_json(std::basic_istream<JSON::Char, JSON::CharTraits> &stream,
1920
std::uint64_t &line, std::uint64_t &column,
2021
const JSON::ParseCallback &callback) -> JSON {
@@ -27,6 +28,7 @@ auto parse_json(const std::basic_string<JSON::Char, JSON::CharTraits> &input,
2728
return internal_parse_json(input, line, column, callback);
2829
}
2930

31+
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
3032
auto parse_json(std::basic_istream<JSON::Char, JSON::CharTraits> &stream,
3133
const JSON::ParseCallback &callback) -> JSON {
3234
std::uint64_t line{1};

src/core/yaml/yaml.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ auto internal_parse_json(yaml_parser_t *parser) -> sourcemeta::core::JSON {
109109

110110
namespace sourcemeta::core {
111111

112+
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
112113
auto parse_yaml(std::basic_istream<JSON::Char, JSON::CharTraits> &stream)
113114
-> JSON {
114115
std::basic_ostringstream<JSON::Char, JSON::CharTraits> buffer;

0 commit comments

Comments
 (0)