Skip to content

Commit

Permalink
chore: edit mockery configuration, remove scattered go:generate annot…
Browse files Browse the repository at this point in the history
…ations, edited linter config
  • Loading branch information
Kirill Grigorev authored and kgrigorev committed Dec 12, 2024
1 parent a307b16 commit 482b900
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ linters:
- contextcheck
- cyclop
- durationcheck
- err113
- errcheck
- errname
- errorlint
Expand All @@ -44,9 +45,7 @@ linters:
- gocognit
- goconst
- gocritic
- goerr113
- gofmt
- gomnd
- gomoddirectives
- gosec
- gosimple
Expand All @@ -55,6 +54,7 @@ linters:
- ineffassign
- makezero
- misspell
- mnd
- nakedret
- nestif
- nilerr
Expand Down Expand Up @@ -90,12 +90,12 @@ issues:
- containedctx
- forcetypeassert
- goconst
- goerr113
- err113
- varnamelen
- wrapcheck

linters-settings:
gomnd:
mnd:
ignored-functions:
- context.WithTimeout
nolintlint:
Expand Down
29 changes: 24 additions & 5 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
inpackage: false
testonly: false
with-expecter: true
keeptree: true
disable-version-string: true
with-expecter: True
disable-version-string: True
dir: "{{.InterfaceDir}}/mocks"
outpkg: "mocks"
mockname: "{{.InterfaceName}}"
filename: "{{.InterfaceName | snakecase}}.go"
packages:
"flamingo.me/flamingo/v3/core/security/application":
interfaces:
SecurityService:
"flamingo.me/flamingo/v3/core/security/application/role":
interfaces:
Provider:
Service:
"flamingo.me/flamingo/v3/core/security/domain":
interfaces:
PermissionSet:
Role:
"flamingo.me/flamingo/v3/core/security/application/voter":
interfaces:
SecurityVoter:
"flamingo.me/flamingo/v3/core/security/interface/middleware":
interfaces:
RedirectURLMaker:
2 changes: 2 additions & 0 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (
"flamingo.me/flamingo/v3/framework/web"
)

//go:generate go run github.com/vektra/mockery/v2@v2.50.0

type (
// Application contains a main flamingo application
Application struct {
Expand Down
2 changes: 0 additions & 2 deletions core/security/application/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
package application

//go:generate go run github.com/vektra/mockery/v2@v2.49.1 --name=SecurityService --case=underscore
2 changes: 0 additions & 2 deletions core/security/application/role/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
package role

//go:generate go run github.com/vektra/mockery/v2@v2.49.1 --all --case=underscore
2 changes: 0 additions & 2 deletions core/security/application/voter/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
package voter

//go:generate go run github.com/vektra/mockery/v2@v2.49.1 --all --case=underscore
2 changes: 0 additions & 2 deletions core/security/domain/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
package domain

//go:generate go run github.com/vektra/mockery/v2@v2.49.1 --all --case=underscore
2 changes: 1 addition & 1 deletion core/security/domain/mocks/permission_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/security/domain/mocks/role.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions core/security/interface/middleware/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
package middleware

//go:generate go run github.com/vektra/mockery/v2@v2.49.1 --all --case=underscore

0 comments on commit 482b900

Please sign in to comment.