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

lint(track_config): add initial exercises checks #260

Merged
merged 1 commit into from
Apr 2, 2021

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Apr 1, 2021

This is still a WIP - just showing one of the things that's in the pipeline.

Before merging this PR I need to:

For a future PR:

  • Improve the error messages, and especially the context
  • Implement checks for e.g. kebab-case, uniqueness, and matching

As of https://github.com/exercism/configlet/pull/260/commits/3716cf51811efd01107eb88676d6a41299681a85c, this PR currently produces the below diff to the configlet lint output. As I said, the error messages should be improved later.

bash

+Missing key: 'practices':
+./config.json
+

clojure

+Array is empty: 'prerequisites':
+./config.json
+

common-lisp

+Array is empty: 'prerequisites':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

cpp

+Missing key: 'name':
+./config.json
+
+The 'prerequisites' array contains a zero-length string:
+./config.json
+

csharp

+Array is empty: 'prerequisites':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

dart

+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Array is empty: 'prerequisites':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'prerequisites':
+./config.json
+

elixir

+Array is empty: 'prerequisites':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

elm

+Array is empty: 'prerequisites':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

fsharp

+Array is empty: 'prerequisites':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

go

+Array is empty: 'prerequisites':
+./config.json
+

j

+Missing key: 'difficulty':
+./config.json
+
+Missing key: 'difficulty':
+./config.json
+
+Missing key: 'difficulty':
+./config.json
+
+Missing key: 'difficulty':
+./config.json
+
+Missing key: 'difficulty':
+./config.json
+
+Missing key: 'difficulty':
+./config.json
+
+Missing key: 'difficulty':
+./config.json
+

java

+Array is empty: 'prerequisites':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

javascript

+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Array is empty: 'prerequisites':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

julia

+Array is empty: 'prerequisites':
+./config.json
+
+Missing key: 'name':
+./config.json
+

kotlin

+Missing key: 'name':
+./config.json
+
+Array is empty: 'prerequisites':
+./config.json
+

purescript

+Missing key: 'name':
+./config.json
+
+Array is empty: 'prerequisites':
+./config.json
+

python

+Array is empty: 'prerequisites':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

research_experiment_1

+Not an object: 'exercises':
+./config.json
+

ruby

+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Array is empty: 'concepts':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Array is empty: 'concepts':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Array is empty: 'prerequisites':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+
+Missing key: 'name':
+./config.json
+

rust

+Array is empty: 'prerequisites':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

swift

+Array is empty: 'prerequisites':
+./config.json
+

x86-64-assembly

+Missing key: 'name':
+./config.json
+
+Array is empty: 'prerequisites':
+./config.json
+

zig

+Missing key: 'practices':
+./config.json
+
+Configlet detected at least one problem.
+For more information on resolving the problems, please see the documentation:
+https://github.com/exercism/docs/blob/main/building/configlet/lint.md

src/lint/track_config.nim Outdated Show resolved Hide resolved
@ee7 ee7 force-pushed the lint-track-config-exercises-initial branch from 7bbd2a3 to 3716cf5 Compare April 2, 2021 11:36
@ee7 ee7 marked this pull request as ready for review April 2, 2021 11:51
@ee7 ee7 merged commit c30215e into exercism:main Apr 2, 2021
@ee7 ee7 deleted the lint-track-config-exercises-initial branch April 2, 2021 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants