-
-
Notifications
You must be signed in to change notification settings - Fork 5
style(clang-tidy): fix include headers clang-tidy errors #1688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,11 +1,21 @@ | ||||||
#include <sourcemeta/core/json_value.h> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
#include <sourcemeta/core/jsonpointer.h> | ||||||
#include <sourcemeta/core/jsonschema.h> | ||||||
#include <sourcemeta/core/jsonschema_error.h> | ||||||
#include <sourcemeta/core/jsonschema_frame.h> | ||||||
#include <sourcemeta/core/jsonschema_types.h> | ||||||
#include <sourcemeta/core/uri.h> | ||||||
|
||||||
#include <cassert> // assert | ||||||
#include <cstdint> // std::uint64_t | ||||||
#include <functional> // std::less | ||||||
#include <limits> // std::numeric_limits | ||||||
#include <map> // std::map | ||||||
#include <numeric> // std::accumulate | ||||||
#include <optional> // std::optional | ||||||
#include <sstream> // std::ostringstream | ||||||
#include <string> // std::string | ||||||
#include <string_view> // std::string_view | ||||||
#include <type_traits> // std::remove_reference_t | ||||||
#include <utility> // std::move | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
#include <sourcemeta/core/json.h> | ||
#include <sourcemeta/core/json_value.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't include |
||
#include <sourcemeta/core/jsonschema.h> | ||
|
||
#include <optional> // std::optional | ||
#include <string_view> // std::string_view | ||
|
||
auto sourcemeta::core::schema_official_resolver(std::string_view identifier) | ||
-> std::optional<sourcemeta::core::JSON> { | ||
// JSON Schema 2020-12 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#include <sourcemeta/core/jsonschema.h> | ||
#include <sourcemeta/core/jsonschema_types.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't include |
||
|
||
#include <optional> // std::nullopt | ||
#include <string_view> // std::string_view | ||
|
||
auto sourcemeta::core::schema_official_walker( | ||
std::string_view keyword, | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,9 +1,21 @@ | ||||||
#include <sourcemeta/core/json_value.h> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
#include <sourcemeta/core/jsonpointer.h> | ||||||
#include <sourcemeta/core/jsonschema.h> | ||||||
|
||||||
#include <algorithm> // std::transform | ||||||
#include <cassert> // assert | ||||||
#include <cctype> // std::tolower | ||||||
#include <sstream> // std::ostringstream | ||||||
#include <sourcemeta/core/jsonschema_error.h> | ||||||
#include <sourcemeta/core/jsonschema_frame.h> | ||||||
#include <sourcemeta/core/jsonschema_resolver.h> | ||||||
#include <sourcemeta/core/jsonschema_types.h> | ||||||
|
||||||
#include <algorithm> // std::transform | ||||||
#include <cassert> // assert | ||||||
#include <cctype> // std::tolower | ||||||
#include <filesystem> // std::filesystem::path | ||||||
#include <functional> // std::function | ||||||
#include <optional> // std::optional | ||||||
#include <sstream> // std::ostringstream | ||||||
#include <string> // std::string | ||||||
#include <string_view> // std::string_view | ||||||
#include <utility> // std::move | ||||||
|
||||||
namespace sourcemeta::core { | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,10 +1,19 @@ | ||||||
#include <sourcemeta/core/json_value.h> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
#include <sourcemeta/core/jsonpointer.h> | ||||||
#include <sourcemeta/core/jsonschema.h> | ||||||
#include <sourcemeta/core/jsonschema_error.h> | ||||||
#include <sourcemeta/core/jsonschema_frame.h> | ||||||
#include <sourcemeta/core/jsonschema_transform.h> | ||||||
#include <sourcemeta/core/jsonschema_types.h> | ||||||
|
||||||
#include <cassert> // assert | ||||||
#include <optional> // std::optional | ||||||
#include <set> // std::set | ||||||
#include <sstream> // std::ostringstream | ||||||
#include <stdexcept> // std::runtime_error | ||||||
#include <string> // std::string | ||||||
#include <utility> // std::move, std::pair | ||||||
#include <variant> // std::get_if, std::holds_alternative | ||||||
|
||||||
namespace { | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,17 @@ | ||||||
#include <sourcemeta/core/json_value.h> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
#include <sourcemeta/core/jsonpointer.h> | ||||||
#include <sourcemeta/core/jsonschema.h> | ||||||
#include <sourcemeta/core/jsonschema_types.h> | ||||||
#include <sourcemeta/core/jsonschema_walker.h> | ||||||
|
||||||
#include <algorithm> // std::max, std::sort | ||||||
#include <cassert> // assert | ||||||
#include <cstddef> // std::size_t | ||||||
#include <cstdint> // std::uint8_t | ||||||
#include <optional> // std::optional | ||||||
#include <string> // std::string | ||||||
#include <utility> // std::move | ||||||
#include <vector> // std::vector | ||||||
|
||||||
namespace { | ||||||
enum class SchemaWalkerType_t : std::uint8_t { Deep, Flat }; | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// See https://pyyaml.org/wiki/LibYAML for basic documentation | ||
#include <yaml.h> | ||
|
||
#include <sourcemeta/core/json.h> | ||
#include <sourcemeta/core/json_error.h> | ||
#include <sourcemeta/core/json_value.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't include |
||
#include <sourcemeta/core/yaml.h> | ||
#include <sourcemeta/core/yaml_error.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we shouldn't include |
||
|
||
#include <filesystem> // std::filesystem::path | ||
#include <istream> // std::basic_istream | ||
#include <sstream> // std::ostringstream, std::istringstream | ||
#include <string> // std::string | ||
#include <string_view> // std::string_view | ||
|
||
// TODO: Perform parsing token by token using `yaml_parser_parse`, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#include <sourcemeta/core/alterschema.h> | ||
|
||
#include <cassert> // assert | ||
#include <sourcemeta/core/jsonschema_transform.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file should only be including |
||
#include <sourcemeta/core/jsonschema_types.h> | ||
|
||
// For built-in rules | ||
#include <algorithm> | ||
#include <cmath> | ||
#include <iterator> | ||
#include <algorithm> // std::any_of, std::all_of | ||
#include <cassert> // assert | ||
#include <cmath> // std::floor | ||
#include <iterator> // std::cbegin, std::cend | ||
#include <set> // std::set | ||
|
||
namespace sourcemeta::core { | ||
auto contains_any(const Vocabularies &container, | ||
const std::set<typename Vocabularies::key_type> &values) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make modules only include public headers of other modules
The idea is that only
src/json
can be internally aware that there is ajson_value.h
header, and every consumer should just require the public one