Skip to content

add user and password to uri if the uri does not contain user password #20

add user and password to uri if the uri does not contain user password

add user and password to uri if the uri does not contain user password #20

Triggered via pull request September 2, 2023 12:40
Status Success
Total duration 3m 17s
Artifacts

lint.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

5 errors
Lint Check: main_test.go#L43
[golangci-lint] reported by reviewdog 🐶 Function 'TestBuildURI' is too long (71 > 60) (funlen) Raw Output: main_test.go:43: Function 'TestBuildURI' is too long (71 > 60) (funlen) func TestBuildURI(t *testing.T) {
Lint Check: main_test.go#L109
[golangci-lint] reported by reviewdog 🐶 var-naming: var newUri should be newURI (revive) Raw Output: main_test.go:109:3: var-naming: var newUri should be newURI (revive) newUri := buildURI(tc.origin, tc.newUser, tc.newPassword) ^
Lint Check: main.go#L37
[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: env:"MONGODB_USER" help:"monitor user, need clusterMonitor role in admin db and read role in local db" name:"mongodb.user" placeholder:"monitorUser" (tagalign) Raw Output: main.go:37:31: tag is not aligned, should be: env:"MONGODB_USER" help:"monitor user, need clusterMonitor role in admin db and read role in local db" name:"mongodb.user" placeholder:"monitorUser" (tagalign) User string `name:"mongodb.user" help:"monitor user, need clusterMonitor role in admin db and read role in local db" env:"MONGODB_USER" placeholder:"monitorUser"` ^
Lint Check: main.go#L38
[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: env:"MONGODB_PASSWORD" help:"monitor user password" name:"mongodb.password" placeholder:"monitorPassword" (tagalign) Raw Output: main.go:38:31: tag is not aligned, should be: env:"MONGODB_PASSWORD" help:"monitor user password" name:"mongodb.password" placeholder:"monitorPassword" (tagalign) Password string `name:"mongodb.password" help:"monitor user password" env:"MONGODB_PASSWORD" placeholder:"monitorPassword"` ^
Lint Check: main.go#L106
[golangci-lint] reported by reviewdog 🐶 return with no blank line before (nlreturn) Raw Output: main.go:106:2: return with no blank line before (nlreturn) return uri ^