Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Oct 6, 2023
1 parent 30c7389 commit 084484d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/helpers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func w*(s: string; start: int): int =
## A matcher for `scanf`. Similar to `$w`, but only skips (does not bind).
s.skipWhile(IdentChars, start)

proc setFalseAndPrint*(b: var bool; description: string; path: Path; annotation = "") =
proc setFalseAndPrint*(b: var bool; description: string; path: Path, annotation = "") =
## Sets `b` to `false` and writes a message to stdout containing `description`
## and `path`.
b = false
Expand Down
6 changes: 2 additions & 4 deletions src/lint/validators.nim
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,11 @@ proc isArrayOfStrings*(data: JsonNode;
result.setFalseAndPrint(msgStart & msgEnd, path, annotation = errorAnnotation)
elif isRequired:
if 0 notin allowedArrayLen:
result.setFalseAndPrint(&"The {q context} array is empty", path,
annotation = errorAnnotation)
result.setFalseAndPrint(&"The {q context} array is empty", path, annotation = errorAnnotation)
of JNull:
if isRequired:
result.setFalseAndPrint(&"The value of {q context} is " &
&"{qNull}, but it must be an array", path,
annotation = errorAnnotation)
&"{qNull}, but it must be an array", path, annotation = errorAnnotation)
else:
result.setFalseAndPrint(&"The value of {q context} is " &
"not an array", path, annotation = errorAnnotation)
Expand Down

0 comments on commit 084484d

Please sign in to comment.