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): check concept directory names are in config #437

Merged
merged 5 commits into from
Oct 13, 2021

Conversation

ErikSchierboom
Copy link
Member

@ErikSchierboom ErikSchierboom commented Oct 12, 2021

With this PR, configlet lint now produces an error if there is a subdirectory in the concepts directory of a track that does not have a corresponding entry in the track-level config.json file.

The implementation is similar to the exercise-based check.

See exercism/rust#1363 (comment) CC @coriolinus

With this commit, `configlet lint` now produces an error if there is
    a subdirectory in the `concepts` directory of a track that does
    not have a corresponding entry in the track-level `config.json`
    file.
ee7 added 4 commits October 13, 2021 08:56
This is the style we used elsewhere.
We've omitted these elsewhere, because otherwise, the resulting ".:"
looks weird in the current error message format:

    `./concepts` contains a directory named `booleans`, which is not a
    `slug` in the concepts array. Please add the concept to that array.:
We've used one blank line between procs elsewhere.
@ee7
Copy link
Member

ee7 commented Oct 13, 2021

Currently, this PR produces the below diff to the output of configlet lint, per-track:

csharp

+`./concepts` contains a directory named `enumerables`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `lambdas`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `math-operators`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./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

+`./concepts` contains a directory named `anonymous-functions`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `application-timing`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `bytes`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `channels`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `conditionals`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `context`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `defer`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `duration`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `empty-interface`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `errors-handling`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `goroutines`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `mutex`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `panic`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `recover`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `reflection`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `select`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `variables`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./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

+`./concepts` contains a directory named `arithmetic-operators`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `boolean-expressions`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `integer-equality`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `iterator-protocol`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `nothingness`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `pairs`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+
+`./concepts` contains a directory named `vectors`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+

kotlin

+`./concepts` contains a directory named `booleans`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./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

rust

+`./concepts` contains a directory named `string-vs-str`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./config.json
+

swift

+`./concepts` contains a directory named `constants-and-variables`, which is not a `slug` in the concepts array. Please add the concept to that array:
+./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

Copy link
Member

@ee7 ee7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

I'd have merged already, but there's an unusual long delay in the Windows build. I already tried restarting once.

Approved merging with this commit message body:

With this commit, `configlet lint` now produces an error if there is
a subdirectory in the `concepts` directory of a track that does not have
a corresponding entry in the track-level `config.json` file.

which is just the body of 7be9163 with whitespace changes.

@ErikSchierboom
Copy link
Member Author

Done. Thanks for the review.

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