MSP-5186 Update lint

This commit is contained in:
Синельник Тимур Романович committed 2025-04-01 15:54:50 +03:00
1 parent ffa5e100db
commit 28cff347ab
5 files changed
+8 -11

No files matched your search

+2 -5
View File
@@ -13,26 +13,23 @@ linters:
disable:
- goimports #у нас собственные правила форматирования импортов
- wsl #расставление пробелов очень индивидуально
- exhaustivestruct #не имеет смысла
- varnamelen #очень индивидуально (db)
- exhaustruct #не имеет смысла
- golint #устарел
- contextcheck #не имеет смысла
- gci #у нас собственные правила форматирования импортов
- gofumpt #у нас собственные правила форматирования импортов
- nolintlint #Goland все равно форматирует с отступом
- nlreturn #не всегда имеет смысл
- godot #не актуально для свагера
- ifshort #приняли решение, что мы так не пишем if err := ...; err != nil {}
- godox #не позволяет оставлять todo
- maligned #аллокацией памяти для структур конфликтует с удобством их чтения
- nosnakecase #не позволяет заводить пакеты используя snake_case
- depguard #не всегда имеет смысл
- dupword #не имеет смысла
- tagalign #не всегда имеет смысл
- musttag #у нас собственные правило: не используем теги, если работаем с пакетом isp-kit/json и с внутренними структурами(между нашими сервисами), при этом теги обязательный для всех внених для нас структур
- perfsprint #мнимая производительность в угоду читаемости
- gomnd #устарел
- exportloopref #устарел
- execinquery #устарел
linters-settings:
funlen:
lines: 80
+1 -1
View File
@@ -12,7 +12,7 @@ type IAccessListAccessListRep interface {
GetAccessListByAppId(ctx context.Context, appId int) ([]entity.AccessList, error)
}
type IAccessListApplicationRep interface {
type IAccessListApplicationRep interface { // nolint:iface
GetApplicationById(ctx context.Context, id int) (*entity.Application, error)
}
+1 -1
View File
@@ -17,7 +17,7 @@ type IApplicationApplicationRep interface {
UpdateApplication(ctx context.Context, id int, name string, description string) (*entity.Application, error)
}
type IApplicationTokenRep interface {
type IApplicationTokenRep interface { // nolint:iface
GetTokenByAppIdList(ctx context.Context, appIdList []int) ([]entity.Token, error)
}
+1 -1
View File
@@ -18,7 +18,7 @@ type IServiceServiceRep interface {
DeleteService(ctx context.Context, idList []int) (int, error)
}
type IServiceDomainRep interface {
type IServiceDomainRep interface { // nolint:iface
GetDomainById(ctx context.Context, id int) (*entity.Domain, error)
}
+3 -3
View File
@@ -16,7 +16,7 @@ type ITokenAppEnrich interface {
EnrichWithTokens(ctx context.Context, apps []entity.Application) ([]*domain.ApplicationWithTokens, error)
}
type ITokenApplicationRep interface {
type ITokenApplicationRep interface { // nolint:iface
GetApplicationById(ctx context.Context, id int) (*entity.Application, error)
}
@@ -24,11 +24,11 @@ type ITokenServiceRep interface {
GetServiceById(ctx context.Context, id int) (*entity.Service, error)
}
type ITokenDomainRep interface {
type ITokenDomainRep interface { // nolint:iface
GetDomainById(ctx context.Context, id int) (*entity.Domain, error)
}
type ITokenTokenRep interface {
type ITokenTokenRep interface { // nolint:iface
GetTokenByAppIdList(ctx context.Context, appIdList []int) ([]entity.Token, error)
}