Skip to content

Commit

Permalink
lint: allow overlap of solution and test files for d and plsql tr…
Browse files Browse the repository at this point in the history
…acks

This commit allows the `d` and `plsql` tracks to have the values in their
`files.solution` and `files.test` keys in the `config.json` to overlap.
  • Loading branch information
ErikSchierboom committed Feb 24, 2022
1 parent fea7bcc commit aa22e35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lint/track_config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ proc checkExerciseSlugsAndForegone(exercises: Exercises; b: var bool;

proc checkFilePatternsOverlap(filePatterns: FilePatterns; trackSlug: string,
b: var bool; path: Path) =
const overlappingSolutionTestTrackSlugs = ["d", "plsql"]
const uniqueFilePatternCombinations = [
("solution", "test"),
("solution", "example"),
Expand All @@ -683,6 +684,9 @@ proc checkFilePatternsOverlap(filePatterns: FilePatterns; trackSlug: string,
seenFilePatterns[key] = patterns.toHashSet

for (key1, key2) in uniqueFilePatternCombinations:
if key1 == "solution" and key2 == "test" and trackSlug in overlappingSolutionTestTrackSlugs:
continue

let duplicatePatterns = seenFilePatterns[key1] * seenFilePatterns[key2]
for duplicatePattern in duplicatePatterns:
let msg =
Expand Down

0 comments on commit aa22e35

Please sign in to comment.