-
-
Notifications
You must be signed in to change notification settings - Fork 14
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: add initial checks for approaches and articles #704
Commits on Nov 4, 2022
-
lint: check approaches and articles
There is not yet a formal spec for an approach `config.json` file or an article `config.json` file, but I've tried to implement linting them from the docs for approaches [1][2] and a commit [3] on the csharp track. [1] https://github.com/exercism/docs/blob/5509b2f12fac/building/tracks/concept-exercises.md#file-approachesconfigjson [2] https://github.com/exercism/docs/blob/5509b2f12fac/building/tracks/practice-exercises.md#file-approachesconfigjson [3] exercism/csharp@4069cca97782
Configuration menu - View commit details
-
Copy full SHA for d8a8c7d - Browse repository at this point
Copy the full SHA d8a8c7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e70d2b - Browse repository at this point
Copy the full SHA 0e70d2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d79953b - Browse repository at this point
Copy the full SHA d79953bView commit details
Commits on Nov 9, 2022
-
lint(approaches_and_articles): error for 8 newlines then non-newline
Make `configlet lint` produce an error for a snippet with 8 newline characters then non-newline content on the 9th line, e.g.: 1\n2\n3\n4\n5\n6\n7\n8\n9 Note that this means we do not count lines like `wc`: $ printf '1\n2\n3\n4\n5\n6\n7\n8' | wc -l 7 $ printf '1\n2\n3\n4\n5\n6\n7\n8\n' | wc -l 8 $ printf '1\n2\n3\n4\n5\n6\n7\n8\n9' | wc -l 8 $ printf '1\n2\n3\n4\n5\n6\n7\n8\n9\n' | wc -l 9
Configuration menu - View commit details
-
Copy full SHA for 6cc4380 - Browse repository at this point
Copy the full SHA 6cc4380View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3adba39 - Browse repository at this point
Copy the full SHA 3adba39View commit details
Commits on Nov 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a260510 - Browse repository at this point
Copy the full SHA a260510View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6747ce1 - Browse repository at this point
Copy the full SHA 6747ce1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c5ee39e - Browse repository at this point
Copy the full SHA c5ee39eView commit details
Commits on Nov 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0300ae6 - Browse repository at this point
Copy the full SHA 0300ae6View commit details -
lint(approaches_and_articles): error for missing intro/content/snippet
Try to implement these checks for `.approaches/config.json` - If the `introduction.authors` array is non-empty, there must be a non-empty `introduction.md` file - Any `approaches.slug` value must have a corresponding non-empty `<slug>/content.md` file - Any `approaches.slug` value must have a corresponding non-empty `<slug>/snippet.txt` file And these checks for `.articles/config.json` - Any `articles.slug` value must have a corresponding non-empty `<slug>/content.md` file - Any `articles.slug` value must have a corresponding non-empty `<slug>/snippet.md` file Some output: $ configlet lint [...] The config.json 'introduction' object is present, but there is no corresponding introduction file at the below location: ./exercises/practice/bob/.approaches/introduction.md A config.json 'approaches.slug' value is 'if', but there is no corresponding content file at the below location: ./exercises/practice/bob/.approaches/if/content.md A config.json 'approaches.slug' value is 'answer-array', but there is no corresponding snippet file at the below location: ./exercises/practice/bob/.approaches/answer-array/snippet.txt A config.json 'articles.slug' value is 'performance', but there is no corresponding content file at the below location: ./exercises/practice/bob/.articles/performance/content.md A config.json 'articles.slug' value is 'performance', but there is no corresponding snippet file at the below location: ./exercises/practice/bob/.articles/performance/snippet.md
Configuration menu - View commit details
-
Copy full SHA for fe94cf2 - Browse repository at this point
Copy the full SHA fe94cf2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e710b2 - Browse repository at this point
Copy the full SHA 5e710b2View commit details -
lint(approaches_and_articles): error for dir not in config slugs
Example output: $ configlet lint [...] There is no 'approaches.slug' key with the value 'performance', but a sibling directory exists with that name: ../exercism-tracks/csharp/exercises/practice/reverse-string/.approaches/config.json
Configuration menu - View commit details
-
Copy full SHA for abe6d59 - Browse repository at this point
Copy the full SHA abe6d59View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe35e86 - Browse repository at this point
Copy the full SHA fe35e86View commit details