Skip to content

Commit

Permalink
lint(practice_exercises): prefer if false to commenting out (#242)
Browse files Browse the repository at this point in the history
Let's prefer `if false` over commenting out (or using `when false`).
This ensures that the code still compiles.

This commit also adds a TODO so that we can grep in the codebase for the
disabled checks.

This change also resolves the following compilation hint:
> src/lint/practice_exercises.nim(5, 6) Hint: 'checkFiles' is declared
> but not used [XDeclaredButNotUsed]
  • Loading branch information
ee7 authored Mar 26, 2021
1 parent 0087541 commit a303465
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lint/practice_exercises.nim
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ proc isValidPracticeExerciseConfig(data: JsonNode, path: string): bool =
result = false
if not hasArrayOfStrings(data, "", "contributors", path, isRequired = false):
result = false
# Temporarily disable the checking of the files to give tracks the chance
# to update this manually
# if not checkFiles(data, "files", path):
# result = false
# TODO: Enable the `files` checks after the tracks have had some time to update.
if false:
if not checkFiles(data, "files", path):
result = false
if not checkString(data, "language_versions", path, isRequired = false):
result = false

Expand Down

0 comments on commit a303465

Please sign in to comment.