mirror of
https://github.com/grafana/grafana.git
synced 2024-12-26 00:41:20 -06:00
Chore: Define promlib depguard rules (#85082)
* define promlib depguard rules * add comment * test: break linting on purpose * fix linting * simple change to trigger backend linting/build in CI pipeline
This commit is contained in:
parent
15dca45514
commit
92f5a0305c
@ -67,6 +67,19 @@ files = [
|
||||
"**/pkg/tsdb/cloudwatch/**/*",
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.promlib]
|
||||
list-mode = "lax" # allow unless explicitely denied
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg", desc = "promlib is not allowed to import grafana core" }
|
||||
]
|
||||
allow = [
|
||||
"github.com/grafana/grafana/pkg/promlib"
|
||||
]
|
||||
files = [
|
||||
"**/pkg/promlib/*",
|
||||
"**/pkg/promlib/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.gocritic]
|
||||
enabled-checks = ["ruleguard"]
|
||||
[linters-settings.gocritic.settings.ruleguard]
|
||||
|
@ -36,7 +36,7 @@ func (rt *healthCheckSuccessRoundTripper) RoundTrip(req *http.Request) (*http.Re
|
||||
"resultType": "scalar",
|
||||
"result": [
|
||||
1692969348.331,
|
||||
"2"
|
||||
"3"
|
||||
]
|
||||
}
|
||||
}`)),
|
||||
|
Loading…
Reference in New Issue
Block a user