influxdata / influxdata/kapacitor
More precise error on not defining the retention policy in a TICKscript
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
When writing a TICKscript, not defining the dbrp signals a
`must specify dbrp`
However, not specifying the retention policy when defining the dbrp leads to a syntax error on the line right after.
`invalid TICKscript: parser: unexpected var line 4 char 1 in "var m1 = s". expected: "."`
Would it be possible to have a clearer message pointing out that the retention policy should be specified instead of a syntax error in the line after?
Contributor guide
Research direction
Start by reproducing the reported TICKscript parser error with a dbrp declaration that omits the retention policy, followed by the shown var statement. Trace how the parser reports the later syntax error and make the resulting diagnostic identify the missing retention policy. Done means this input produces a clear error pointing to the incomplete dbrp declaration rather than the following line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100