Skip to content

canonical-data.json: Compliance with JSON Schema #625

Closed
@rbasso

Description

@rbasso

Now that #602 was merged, it would be great to have all the canonical-data.json files compliant with the JSON Schema, so that we could automatically check them for errors in the future.

At the moment, we have 74 canonical-data.json files, but only 3 are compliant.

When porting the files, I guess it would be nice to follow a few guidelines to make reviewing easier:

  • Distinct commits with the following:
    1. exercise-name: Make canonical-data.json compliant, containing the minimal changes to make the test suite compliant.
    2. exercise-name: Fix canonical-data.json formatting, with the changes needed to make it readable again.
  • pull-request's title: exercise-name: Make exercise schema-compliant
  • pull-request's body: at least a line containing Related to #625.
  • version should start at 1.0.0 and follow the exercise property.

Unless there is already a standard in place that I don't know, I suggest formatting with 2-spaces indentation in the second commit, for consistency, which is already the default when running jq '.' canonical-data.json.

Of course, most of the exercises will demand additional changes to a standard formatting, to make them more compact and readable.

Edit: Just to be clear, this issue is not about style in designing the test suite. Changes that go beyond fixing the test suite to be compliant and fix it to be consistently formatted after that should be avoided here!


canonical-data.json compliance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions