Skip to content
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

Upgrade JSON Toolkit to 3ef19daf7ca042544239111c701a51232f3f5576 #164

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
CXX: ${{ matrix.platform.cxx }}
steps:
- name: Install ClangFormat
run: pip install clang-format==18.1.5
run: pip install clang-format==19.1.0

- uses: actions/checkout@v4
- name: Install dependencies (macOS)
Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vendorpull https://github.com/sourcemeta/vendorpull dea311b5bfb53b6926a4140267959ae334d3ecf4
noa https://github.com/sourcemeta/noa 7e26abce7a4e31e86a16ef2851702a56773ca527
jsontoolkit https://github.com/sourcemeta/jsontoolkit e86ad1e333c11b6fc2659a0f32ae883ef1040e20
jsontoolkit https://github.com/sourcemeta/jsontoolkit 3ef19daf7ca042544239111c701a51232f3f5576
hydra https://github.com/sourcemeta/hydra 3c53d3fdef79e9ba603d48470a508cc45472a0dc
alterschema https://github.com/sourcemeta/alterschema a31722f04ae2d7e57f2fe5bbb0613670866c0840
5 changes: 3 additions & 2 deletions src/command_frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
#include "command.h"
#include "utils.h"

static auto enum_to_string(
const sourcemeta::jsontoolkit::ReferenceEntryType type) -> std::string {
static auto
enum_to_string(const sourcemeta::jsontoolkit::ReferenceEntryType type)
-> std::string {
switch (type) {
case sourcemeta::jsontoolkit::ReferenceEntryType::Resource:
return "resource";
Expand Down
4 changes: 2 additions & 2 deletions src/command_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ get_schema_object(const sourcemeta::jsontoolkit::URI &identifier,
}

static auto get_data(const sourcemeta::jsontoolkit::JSON &test_case,
const std::filesystem::path &base,
const bool verbose) -> sourcemeta::jsontoolkit::JSON {
const std::filesystem::path &base, const bool verbose)
-> sourcemeta::jsontoolkit::JSON {
assert(base.is_absolute());
assert(test_case.is_object());
assert(test_case.defines("data") || test_case.defines("dataPath"));
Expand Down
10 changes: 6 additions & 4 deletions src/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,9 @@ auto log_verbose(const std::map<std::string, std::vector<std::string>> &options)
return null_stream;
}

auto parse_extensions(const std::map<std::string, std::vector<std::string>>
&options) -> std::set<std::string> {
auto parse_extensions(
const std::map<std::string, std::vector<std::string>> &options)
-> std::set<std::string> {
std::set<std::string> result;

if (options.contains("extension")) {
Expand All @@ -296,8 +297,9 @@ auto parse_extensions(const std::map<std::string, std::vector<std::string>>
return result;
}

auto parse_ignore(const std::map<std::string, std::vector<std::string>>
&options) -> std::set<std::filesystem::path> {
auto parse_ignore(
const std::map<std::string, std::vector<std::string>> &options)
-> std::set<std::filesystem::path> {
std::set<std::filesystem::path> result;

if (options.contains("ignore")) {
Expand Down
10 changes: 6 additions & 4 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ auto resolver(const std::map<std::string, std::vector<std::string>> &options,
auto log_verbose(const std::map<std::string, std::vector<std::string>> &options)
-> std::ostream &;

auto parse_extensions(const std::map<std::string, std::vector<std::string>>
&options) -> std::set<std::string>;
auto parse_extensions(
const std::map<std::string, std::vector<std::string>> &options)
-> std::set<std::string>;

auto parse_ignore(const std::map<std::string, std::vector<std::string>>
&options) -> std::set<std::filesystem::path>;
auto parse_ignore(
const std::map<std::string, std::vector<std::string>> &options)
-> std::set<std::filesystem::path>;

} // namespace sourcemeta::jsonschema::cli

Expand Down
2 changes: 1 addition & 1 deletion test/metaschema/fail_directory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ error: Schema validation failure
The string value "object" was expected to equal one of the following values: "array", "boolean", "integer", "null", "number", "object", and "string"
at instance location "/type"
at evaluate path "/properties/type/anyOf/0/\$ref/enum"
The value was expected to be of type array but it was of type string
The value was expected to consist of an array of at least 1 item
at instance location "/type"
at evaluate path "/properties/type/anyOf/1/type"
The string value was expected to validate against at least one of the 2 given subschemas
Expand Down
2 changes: 1 addition & 1 deletion test/metaschema/fail_single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ error: Schema validation failure
The string value "object" was expected to equal one of the following values: "array", "boolean", "integer", "null", "number", "object", and "string"
at instance location "/type"
at evaluate path "/properties/type/anyOf/0/\$ref/enum"
The value was expected to be of type array but it was of type string
The value was expected to consist of an array of at least 1 item
at instance location "/type"
at evaluate path "/properties/type/anyOf/1/type"
The string value was expected to validate against at least one of the 2 given subschemas
Expand Down
19 changes: 17 additions & 2 deletions vendor/jsontoolkit/CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions vendor/jsontoolkit/config.cmake.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/jsontoolkit/src/evaluator/CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading