-
Couldn't load subscription status.
- Fork 195
Closed
Labels
featurea feature request or enhancementa feature request or enhancement
Description
When a linter returns a Lint with an invalid (NA) column_number, as has recently happened in some regex-based linters, the error message is extremely confusing:
Error in rep.int(character, length) : invalid 'times' value
Calls: <Anonymous> ... print.lint -> cat -> highlight_string -> fill_with -> paste0
Execution halted
IMO Lint() should do some mild verification during construction so that invalid Lint()s can't be created successfully.
Here are a bunch of checks we could add:
- No
NAs are allowed anywhere. 1L <= column_number <= nchar(line) + 1L.line_number >= 1L.rangesis a list of length 2 integer(ish) vectors, orNULL.1L <= ranges[[i]][1L] <= ranges[[i]][2L] <= nchar(line) + 1Lfor alli.
WDYT?
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement