Skip to content

Commit

Permalink
lint(track_config): check blurb length (#238)
Browse files Browse the repository at this point in the history
Previously the success message was inaccurate, since it contained
> - config.json has these valid fields: [...], blurb, [...]

But the spec says:
- The "blurb" value must be a non-empty, non-blank string with
  length <= 400
  • Loading branch information
ee7 authored Mar 25, 2021
1 parent ec49005 commit f9aacb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lint/track_config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ proc isValidTrackConfig(data: JsonNode, path: string): bool =
result = false
if not checkBoolean(data, "active", path):
result = false
if not checkString(data, "blurb", path):
if not checkString(data, "blurb", path, maxLen = 400):
result = false

if checkInteger(data, "version", path):
Expand Down

0 comments on commit f9aacb6

Please sign in to comment.