Skip to content

Commit

Permalink
remove trailing whitespace (#533)
Browse files Browse the repository at this point in the history
With this commit, the below command produces no output when run in the
repo's root directory:

    git grep -r '[[:blank:]]$'

The commits that added the whitespace:
- a71637f lint: add annotation for key features in config.json
- fea7bcc lint: allow overlap of `files.example` and `files.exemplar` values
- d0cd08c lint: error on missing concept/exercise files
- 3a55f57 lint: support error annotations

In the future, we'll probably add whitespace-checking to CI.
  • Loading branch information
ee7 authored Apr 6, 2022
1 parent 34a1299 commit 4ab7a53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lint/track_config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ proc isValidKeyFeature(data: JsonNode; context: string; path: Path): bool =
For more information on key features see:
https://exercism.org/docs/building/tracks/config-json#h-key-features""".unindent()

if isObject(data, context, path):
let checks = [
hasString(data, "icon", path, context, allowed = keyFeatureIcons,
Expand Down Expand Up @@ -717,7 +717,7 @@ proc checkFilePatternsOverlap(filePatterns: FilePatterns; trackSlug: string,
("test", "exemplar"),
("test", "editor"),
("editor", "example"),
("editor", "exemplar"),
("editor", "exemplar"),
]

var seenFilePatterns = initTable[string, HashSet[string]](250)
Expand Down Expand Up @@ -790,7 +790,7 @@ proc checkExerciseDirsAndTrackConfigAreInSync(trackDir: Path; data: JsonNode;
## Sets `b` to `false` if there is an exercise directory that is
## not an exercise `slug` in `data` and vice versa.
for exerciseKind in ["concept", "practice"]:
let exerciseSlugs = getExerciseSlugs(data, exerciseKind)
let exerciseSlugs = getExerciseSlugs(data, exerciseKind)
let exercisesDir = trackDir / "exercises" / exerciseKind
var exerciseDirSlugs = initHashSet[string]()

Expand Down
2 changes: 1 addition & 1 deletion src/lint/validators.nim
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ proc hasArrayOfFiles*(data: JsonNode;
key: string;
path: Path;
context = "";
relativeToPath: Path;
relativeToPath: Path;
errorAnnotation = ""): bool =
if hasArrayOfStrings(data, key, path, context):
result = true
Expand Down

0 comments on commit 4ab7a53

Please sign in to comment.