Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes issue #577 #581

Merged
merged 1 commit into from Sep 30, 2021
Merged

fixes issue #577 #581

merged 1 commit into from Sep 30, 2021

Conversation

chavacava
Copy link
Collaborator

Closes #577
Adds tests for configuration loading

@rustysys-dev
Copy link

I can confirm this fixes my issue!

using the same config as mentioned in #577

dx-admin-backend on  HEAD (99da7bb) [?] via 🐹 v1.16.3 via 4GiB/31GiB took 7ms
•100% at 12:03:20 ❯ ../revive/revive -config revive.toml -formatter stylish ./...
internal/utils/utils.go
  (17, 3)   https://revive.run/r#deep-exit     calls to log.Fatalln only in main() or init() functions
  (26, 28)  https://revive.run/r#add-constant  avoid magic numbers like '1', create a named constant for it

internal/adapter/server/server.go
  (57, 7)  https://revive.run/r#unused-receiver  method receiver 's' is not referenced in method's body, consider removing or renaming it as _
  (61, 4)  https://revive.run/r#defer            return in a defer function has no effect
  (66, 3)  https://revive.run/r#defer            return in a defer function has no effect

internal/adapter/middleware/auth/auth.go
  (37, 18)  https://revive.run/r#add-constant  avoid magic numbers like '2', create a named constant for it
  (37, 28)  https://revive.run/r#add-constant  avoid magic numbers like '0', create a named constant for it
  (42, 34)  https://revive.run/r#add-constant  avoid magic numbers like '1', create a named constant for it
  (46, 45)  https://revive.run/r#add-constant  avoid magic numbers like '1', create a named constant for it
  (69, 23)  https://revive.run/r#add-constant  avoid magic numbers like '200', create a named constant for it
  (16, 2)   https://revive.run/r#exported      exported const TokenRawKey should have comment (or a comment on this block) or be unexported
  (21, 1)   https://revive.run/r#exported      exported function AccessController should have comment or be unexported

internal/usecase/usecase.go
  (11, 7)  https://revive.run/r#unused-receiver  method receiver 'u' is not referenced in method's body, consider removing or renaming it as _
  (5, 6)   https://revive.run/r#exported         exported type Usecase should have comment or be unexported
  (7, 1)   https://revive.run/r#exported         exported function New should have comment or be unexported
  (11, 1)  https://revive.run/r#exported         exported method Usecase.Private should have comment or be unexported

internal/utils/log/log.go
  (76, 23)  https://revive.run/r#add-constant  string literal "ERROR" appears, at least, 3 times, create a named constant for it
  (11, 7)   https://revive.run/r#exported      exported const TraceKey should have comment or be unexported

internal/entity/token.go
  (44, 27)  https://revive.run/r#add-constant  avoid magic numbers like '0', create a named constant for it
  (44, 58)  https://revive.run/r#add-constant  avoid magic numbers like '0', create a named constant for it
  (90, 86)  https://revive.run/r#add-constant  avoid magic numbers like '0', create a named constant for it
  (12, 1)   https://revive.run/r#exported      comment on exported type Auth0AccessToken should be of the form "Auth0AccessToken ..." (with optional leading article)
  (40, 1)   https://revive.run/r#exported      exported method Auth0AccessToken.Valid should have comment or be unexported
  (89, 1)   https://revive.run/r#exported      exported method Auth0AccessToken.VerifyIssuer should have comment or be unexported
  (93, 1)   https://revive.run/r#exported      comment on exported method Auth0AccessToken.ValidateLoad should be of the form "ValidateLoad ..."

internal/utils/config/config.go
  (15, 2)  https://revive.run/r#exported  comment on exported var Auth0Audiences should be of the form "Auth0Audiences ..."

internal/utils/version.go
  (5, 1)   https://revive.run/r#exported  exported function Version should have comment or be unexported
  (11, 1)  https://revive.run/r#exported  exported function GetVersion should have comment or be unexported


 ✖ 28 problems (28 errors) (0 warnings)

dx-admin-backend on  HEAD (99da7bb) [?] via 🐹 v1.16.3 via 4GiB/31GiB took 67ms
•100% at 12:03:44 ❯ echo $?
1

Copy link

@rustysys-dev rustysys-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chavacava chavacava requested review from mgechev and removed request for mgechev September 29, 2021 07:43
@mgechev mgechev merged commit e545098 into master Sep 30, 2021
@chavacava chavacava deleted the fix-577 branch October 15, 2021 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global severity setting has no effect if enableAllRules is true
3 participants