prometheus/promql/parser
beorn7 c3c7d44d84 lint: Adjust to the lint warnings raised by current versions of golint-ci
We haven't updated golint-ci in our CI yet, but this commit prepares
for that.

There are a lot of new warnings, and it is mostly because the "revive"
linter got updated. I agree with most of the new warnings, mostly
around not naming unused function parameters (although it is justified
in some cases for documentation purposes – while things like mocks are
a good example where not naming the parameter is clearer).

I'm pretty upset about the "empty block" warning to include `for`
loops. It's such a common pattern to do something in the head of the
`for` loop and then have an empty block. There is still an open issue
about this: https://github.com/mgechev/revive/issues/810 I have
disabled "revive" altogether in files where empty blocks are used
excessively, and I have made the effort to add individual
`// nolint:revive` where empty blocks are used just once or twice.
It's borderline noisy, though, but let's go with it for now.

I should mention that none of the "empty block" warnings for `for`
loop bodies were legitimate.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-04-19 17:10:10 +02:00
..
ast.go Update go to 1.19, set min version to 1.18 (#11279) 2022-09-07 11:30:48 +02:00
functions.go promql: Add histogram_count and histogram_sum 2022-06-28 18:16:48 +02:00
generated_parser.y labels: simplify call to get Labels from Builder 2023-03-22 17:05:20 +00:00
generated_parser.y.go labels: simplify call to get Labels from Builder 2023-03-22 17:05:20 +00:00
lex.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
lex_test.go Run gofumpt on all files (#10392) 2022-03-03 17:21:05 +01:00
parse.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
parse_test.go Update tests 2023-03-08 16:32:39 +01:00
prettier.go Adds support for prettifying PromQL expression (#10544) 2022-07-07 18:13:36 +05:30
prettier_rules.md Adds support for prettifying PromQL expression (#10544) 2022-07-07 18:13:36 +05:30
prettier_test.go Prettifier: Add spaces with non-callable keywords (#11005) 2022-07-15 00:09:56 +02:00
printer.go Prettifier: Add spaces with non-callable keywords (#11005) 2022-07-15 00:09:56 +02:00
printer_test.go Prettifier: Add spaces with non-callable keywords (#11005) 2022-07-15 00:09:56 +02:00
value.go promql: use explicit type declare instead of string. (#7716) 2020-08-02 09:57:38 +01:00