Cloudwatch: Add linting to restrict imports from core (#82538)

---------

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
This commit is contained in:
Ida Štambuk 2024-02-20 14:52:11 +01:00 committed by GitHub
parent f18b9ddac6
commit 5431c51490
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -115,7 +115,9 @@
"public/app/plugins/datasource/loki/*.{ts,tsx}", "public/app/plugins/datasource/loki/*.{ts,tsx}",
"public/app/plugins/datasource/loki/**/*.{ts,tsx}", "public/app/plugins/datasource/loki/**/*.{ts,tsx}",
"public/app/plugins/datasource/elasticsearch/*.{ts,tsx}", "public/app/plugins/datasource/elasticsearch/*.{ts,tsx}",
"public/app/plugins/datasource/elasticsearch/**/*.{ts,tsx}" "public/app/plugins/datasource/elasticsearch/**/*.{ts,tsx}",
"public/app/plugins/datasource/cloudwatch/*.{ts,tsx}",
"public/app/plugins/datasource/cloudwatch/**/*.{ts,tsx}"
], ],
"settings": { "settings": {
"import/resolver": { "import/resolver": {

View File

@ -67,6 +67,8 @@ files = [
"**/pkg/tsdb/parca/**/*", "**/pkg/tsdb/parca/**/*",
"**/pkg/tsdb/tempo/*", "**/pkg/tsdb/tempo/*",
"**/pkg/tsdb/tempo/**/*", "**/pkg/tsdb/tempo/**/*",
"**/pkg/tsdb/cloudwatch/*",
"**/pkg/tsdb/cloudwatch/**/*",
] ]
[linters-settings.gocritic] [linters-settings.gocritic]

View File

@ -122,7 +122,7 @@ func NewInstanceSettings(httpClientProvider *httpclient.Provider) datasource.Ins
} }
} }
// cloudWatchExecutor executes CloudWatch requests. // cloudWatchExecutor executes CloudWatch requests
type cloudWatchExecutor struct { type cloudWatchExecutor struct {
im instancemgmt.InstanceManager im instancemgmt.InstanceManager
sessions SessionCache sessions SessionCache