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 more checks of exercise concepts #412

Merged
merged 7 commits into from
Sep 5, 2021

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Sep 5, 2021

With this commit, configlet lint now checks that a track-level
config.json file follows the below rules:

  • The exercises.concept[].concepts values must not be in any other
    concept exercise's concepts property
  • The exercises.concept[].concepts values must match the
    concepts.slug property of one of the concepts
  • The exercises.concept[].prerequisites values must match the
    concepts.slug property of one of the concepts

These rules currently apply to user-facing Concept Exercises only, which
are those with status of active or beta.

Refs: #386


Ping @iHiD - would you like another fast release for this one? Please sanity-check the below diff.

At the time of writing (2021-09-05T18:14:00Z), this PR produces the below diff to the output of configlet lint, per track:

go

https://github.com/exercism/go/blob/a167c7853aed/config.json

+The Concept Exercise `chessboard` has `range-iteration` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `elons-toys` has `pointers` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `zero-zilch-nada` has `types` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+

java

https://github.com/exercism/java/blob/30ff7755c73e/config.json

+The Concept Exercise `bird-watcher` has `foreach-loops` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `bird-watcher` has `for-loops` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `football-match-reports` has `switch-statement` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `football-match-reports` has `variables` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `football-match-reports` has `methods` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+

rust

https://github.com/exercism/rust/blob/60147eb56efd/config.json

+The Concept Exercise `low-power-embedded-game` has `tuples` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `short-fibonacci` has `vec-macro` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `rpn-calculator` has `vec-stack` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `csv-builder` has `string-vs-str` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `magazine-cutout` has `hashmaps` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `magazine-cutout` has `intro-types` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `health-statistics` has `string-use` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `short-fibonacci` has `numbers` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `rpn-calculator` has `numbers` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `rpn-calculator` has `match-basics` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `rpn-calculator` has `mutability` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `rpn-calculator` has `loops` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `csv-builder` has `string` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+

swift

https://github.com/exercism/swift/blob/e476a4a070dd/config.json

+The Concept Exercise `bomb-defuser` has `shorthand-arguments` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `bomb-defuser` has `closures` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `bomb-defuser` has `trailing-closures` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `bomb-defuser` has `capturing` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `high-score-board` has `dictionaries` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `master-mixologist` has `while-loops` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `master-mixologist` has `control-transfer` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `master-mixologist` has `repeat-while` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `master-mixologist` has `loops` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `master-mixologist` has `for-loops` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `secret-agent` has `escaping-functions` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `vehicle-purchase` has `ternary-operator` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `windowing-system` has `value-and-reference-types` in its `concepts`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+
+The Concept Exercise `bomb-defuser` has `loops` in its `prerequisites`, which is not a `slug` in the top-level `concepts` array:
+./config.json
+

ee7 added 7 commits September 5, 2021 20:09
With this commit, `configlet lint` checks that a track-level
`config.json` file follows the below rule:

- The `exercises.concept[].concepts` values must not be in any other
  concept exercise's `concepts` property
With this commit, `configlet lint` checks that a track-level
`config.json` file follows the below rule:

- The `exercises.concept[].prerequisites` values must match the
  `concepts.slug` property of one of the concepts
With this commit, `configlet lint` checks that a track-level
`config.json` file follows the below rule:

- The `exercises.concept[].concepts` values must match the
  `concepts.slug` property of one of the concepts
@ee7 ee7 force-pushed the lint-track-config-concepts branch from 91c1a17 to 0a25e86 Compare September 5, 2021 18:09
@ee7 ee7 marked this pull request as ready for review September 5, 2021 18:15
@ee7 ee7 requested a review from ErikSchierboom as a code owner September 5, 2021 18:15
@ee7 ee7 requested a review from iHiD September 5, 2021 18:31
@ee7 ee7 changed the title lint(track_config): improve concepts check lint(track_config): further check exercise concepts Sep 5, 2021
@iHiD
Copy link
Member

iHiD commented Sep 5, 2021

Yes please!

@ee7 ee7 merged commit e86c234 into exercism:main Sep 5, 2021
@ee7 ee7 deleted the lint-track-config-concepts branch September 5, 2021 20:15
@ee7 ee7 changed the title lint(track_config): further check exercise concepts lint(track_config): dd more checks of exercise concepts Sep 5, 2021
@ee7 ee7 changed the title lint(track_config): dd more checks of exercise concepts lint(track_config): add more checks of exercise concepts Sep 5, 2021
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