Skip to content

fix

fix #2557

GitHub Actions / golangci succeeded Aug 21, 2024 in 0s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (125)

migrator/migrator.go|336 col 16| Error return value of m.RunWithValue is not checked (errcheck)
migrator/migrator.go|430 col 16| Error return value of m.RunWithValue is not checked (errcheck)
migrator/migrator.go|772 col 16| Error return value of m.RunWithValue is not checked (errcheck)
migrator/migrator.go|895 col 42| Error return value of (*database/sql.Row).Scan is not checked (errcheck)
migrator/migrator.go|537 col 3| ifElseChain: rewrite if-else to switch statement (gocritic)
migrator/migrator.go|129 col 70| unnecessary leading newline (whitespace)
migrator/migrator.go|218 col 75| unnecessary leading newline (whitespace)
migrator/migrator.go|421 col 4| unnecessary trailing newline (whitespace)
migrator/migrator.go|121 col 1| calculated cyclomatic complexity for function AutoMigrate is 27, max is 10 (cyclop)
migrator/migrator.go|215 col 1| calculated cyclomatic complexity for function CreateTable is 25, max is 10 (cyclop)
migrator/migrator.go|469 col 1| calculated cyclomatic complexity for function MigrateColumn is 41, max is 10 (cyclop)
migrator/migrator.go|900 col 1| calculated cyclomatic complexity for function ReorderModels is 22, max is 10 (cyclop)
schema/field.go|837 col 16| Error return value is not checked (errcheck)
schema/field.go|293 col 3| ifElseChain: rewrite if-else to switch statement (gocritic)
schema/field.go|305 col 3| ifElseChain: rewrite if-else to switch statement (gocritic)
schema/field.go|14| File is not goimports-ed with -local gorm.io/gorm (goimports)
schema/naming.go|4 col 2| G505: Blocklisted import crypto/sha1: weak cryptographic primitive (gosec)
schema/naming.go|108 col 8| G401: Use of weak cryptographic primitive (gosec)
schema/field.go|647 col 50| G115: integer overflow conversion uint -> int64 (gosec)
schema/field.go|649 col 50| G115: integer overflow conversion uint8 -> int64 (gosec)
schema/field.go|655 col 50| G115: integer overflow conversion uint64 -> int64 (gosec)
schema/relationship.go|269 col 2| Consider pre-allocating joinTableFields (prealloc)
schema/field.go|106 col 1| calculated cyclomatic complexity for function ParseField is 122, max is 10 (cyclop)
schema/field.go|450 col 1| calculated cyclomatic complexity for function setupValuerAndSetter is 199, max is 10 (cyclop)
schema/index.go|30 col 1| calculated cyclomatic complexity for function ParseIndexes is 14, max is 10 (cyclop)
schema/index.go|95 col 1| calculated cyclomatic complexity for function parseFieldIndexes is 14, max is 10 (cyclop)
schema/naming.go|131 col 1| calculated cyclomatic complexity for function toDBName is 19, max is 10 (cyclop)
schema/relationship.go|62 col 1| calculated cyclomatic complexity for function parseRelation is 19, max is 10 (cyclop)
schema/relationship.go|190 col 1| calculated cyclomatic complexity for function buildPolymorphicRelation is 13, max is 10 (cyclop)
schema/relationship.go|266 col 1| calculated cyclomatic complexity for function buildMany2ManyRelation is 27, max is 10 (cyclop)
schema/relationship.go|451 col 1| calculated cyclomatic complexity for function guessRelation is 46, max is 10 (cyclop)
schema/relationship.go|648 col 1| calculated cyclomatic complexity for function ParseConstraint is 19, max is 10 (cyclop)
schema/schema.go|122 col 1| calculated cyclomatic complexity for function ParseWithSpecialTableName is 77, max is 10 (cyclop)
schema/schema.go|381 col 1| calculated cyclomatic complexity for function callBackToMethodValue is 11, max is 10 (cyclop)
schema/utils.go|110 col 1| calculated cyclomatic complexity for function GetIdentityFieldValuesMap is 16, max is 10 (cyclop)
schema/field.go|999 col 40| SA1019: reflect.PtrTo has been deprecated since Go 1.22 and an alternative has been available since Go 1.18: Superseded by [PointerTo]. (staticcheck)
schema/utils.go|74 col 54| SA1019: reflect.PtrTo has been deprecated since Go 1.22 and an alternative has been available since Go 1.18: Superseded by [PointerTo]. (staticcheck)
logger/sql.go|51 col 1| calculated cyclomatic complexity for function ExplainSQL is 50, max is 10 (cyclop)
callbacks.go|107 col 16| Error return value of db.AddError is not checked (errcheck)
callbacks.go|109 col 16| Error return value of db.AddError is not checked (errcheck)
callbacks.go|125 col 15| Error return value of db.AddError is not checked (errcheck)
chainable_api.go|126 col 16| Error return value of tx.AddError is not checked (errcheck)
chainable_api.go|170 col 14| Error return value of tx.AddError is not checked (errcheck)
finisher_api.go|58 col 15| Error return value of tx.AddError is not checked (errcheck)
finisher_api.go|535 col 15| Error return value of tx.ScanRows is not checked (errcheck)
statement.go|85 col 22| Error return value of writer.WriteString is not checked (errcheck)
statement.go|104 col 20| Error return value of writer.WriteByte is not checked (errcheck)
statement.go|114 col 20| Error return value of writer.WriteByte is not checked (errcheck)
statement.go|119 col 21| Error return value of stmt.DB.AddError is not checked (errcheck)
statement.go|132 col 22| Error return value of writer.WriteString is not checked (errcheck)
statement.go|136 col 19| Error return value of writer.WriteByte is not checked (errcheck)
statement.go|206 col 23| Error return value of writer.WriteString is not checked (errcheck)
statement.go|437 col 18| Error return value of stmt.AddError is not checked (errcheck)
statement.go|475 col 19| Error return value of stmt.WriteByte is not checked (errcheck)
statement.go|586 col 19| Error return value of stmt.AddError is not checked (errcheck)
statement.go|588 col 19| Error return value of stmt.AddError is not checked (errcheck)
finisher_api.go|273 col 5| singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
chainable_api.go|451| File is not goimports-ed with -local gorm.io/gorm (goimports)
soft_delete.go|9| File is not goimports-ed with -local gorm.io/gorm (goimports)
callbacks.go|256 col 2| Consider pre-allocating names (prealloc)
association.go|75 col 1| calculated cyclomatic complexity for function Replace is 30, max is 10 (cyclop)
association.go|197 col 1| calculated cyclomatic complexity for function Delete is 35, max is 10 (cyclop)
association.go|380 col 1| calculated cyclomatic complexity for function saveAssociation is 55, max is 10 (cyclop)
callbacks.go|75 col 1| calculated cyclomatic complexity for function Execute is 25, max is 10 (cyclop)
callbacks.go|255 col 1| calculated cyclomatic complexity for function sortCallbacks is 34, max is 10 (cyclop)
chainable_api.go|112 col 1| calculated cyclomatic complexity for function Select is 18, max is 10 (cyclop)
finisher_api.go|73 col 1| calculated cyclomatic complexity for function Save is 16, max is 10 (cyclop)
finisher_api.go|174 col 1| calculated cyclomatic complexity for function FindInBatches is 17, max is 10 (cyclop)
finisher_api.go|246 col 1| calculated cyclomatic complexity for function assignInterfacesToValue is 21, max is 10 (cyclop)
finisher_api.go|346 col 1| calculated cyclomatic complexity for function FirstOrCreate is 13, max is 10 (cyclop)
finisher_api.go|442 col 1| calculated cyclomatic complexity for function Count is 18, max is 10 (cyclop)
finisher_api.go|620 col 1| calculated cyclomatic complexity for function Transaction is 11, max is 10 (cyclop)
gorm.go|124 col 1| calculated cyclomatic complexity for function Open is 23, max is 10 (cyclop)
gorm.go|221 col 1| calculated cyclomatic complexity for function Session is 22, max is 10 (cyclop)
gorm.go|383 col 1| calculated cyclomatic complexity for function DB is 11, max is 10 (cyclop)
scan.go|53 col 1| calculated cyclomatic complexity for function scanIntoStruct is 15, max is 10 (cyclop)
scan.go|125 col 1| calculated cyclomatic complexity for function Scan is 71, max is 10 (cyclop)
statement.go|82 col 1| calculated cyclomatic complexity for function QuoteTo is 23, max is 10 (cyclop)
statement.go|170 col 1| calculated cyclomatic complexity for function AddVar is 25, max is 10 (cyclop)
statement.go|285 col 1| calculated cyclomatic complexity for function BuildCondition is 70, max is 10 (cyclop)
statement.go|562 col 1| calculated cyclomatic complexity for function SetColumn is 16, max is 10 (cyclop)
statement.go|618 col 1| calculated cyclomatic complexity for function Changed is 18, max is 10 (cyclop)
statement.go|687 col 1| calculated cyclomatic complexity for function SelectAndOmitColumns is 23, max is 10 (cyclop)
scan.go|18 col 31| SA1019: reflect.PtrTo has been deprecated since Go 1.22 and an alternative has been available since Go 1.18: Superseded by [PointerTo]. (staticcheck)
logger/sql_test.go|33 col 23| format - escaper always receives " ("\"") (unparam)
utils/utils.go|125 col 1| calculated cyclomatic complexity for function ToString is 12, max is 10 (cyclop)
clause/clause.go|43 col 21| Error return value of builder.WriteByte is not checked (errcheck)
clause/clause.go|47 col 23| Error return value of builder.WriteString is not checked (errcheck)
clause/clause.go|48 col 21| Error return value of builder.WriteByte is not checked (errcheck)
clause/clause.go|53 col 21| Error return value of builder.WriteByte is not checked (errcheck)
clause/delete.go|12 col 21| Error return value of builder.WriteString is not checked (errcheck)
clause/delete.go|16 col 22| Error return value of builder.WriteString is not checked (errcheck)
clause/expression.go|105 col 5| singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
clause/expression.go|28 col 1| calculated cyclomatic complexity for function Build is 15, max is 10 (cyclop)
clause/expression.go|85 col 1| calculated cyclomatic complexity for function Build is 37, max is 10 (cyclop)
clause/where.go|43 col 1| calculated cyclomatic complexity for function buildExprs is 19, max is 10 (cyclop)
clause/where.go|168 col 1| calculated cyclomatic complexity for function Build is 23, max is 10 (cyclop)
callbacks/associations.go|164 col 23| Error return value is not checked (errcheck)
callbacks/associations.go|184 col 23| Error return value is not checked (errcheck)
callbacks/callbacks.go|41 col 50| Error return value of (*gorm.io/gorm.callback).Register is not checked (errcheck)
callbacks/callbacks.go|42 col 25| Error return value of createCallback.Register is not checked (errcheck)
callbacks/callbacks.go|43 col 25| Error return value of createCallback.Register is not checked (errcheck)
callbacks/callbacks.go|44 col 25| Error return value of createCallback.Register is not checked (errcheck)
callbacks/callbacks.go|47 col 50| Error return value of (*gorm.io/gorm.callback).Register is not checked (errcheck)
callbacks/callbacks.go|51 col 24| Error return value of queryCallback.Register is not checked (errcheck)
callbacks/callbacks.go|52 col 24| Error return value of queryCallback.Register is not checked (errcheck)
callbacks/callbacks.go|53 col 24| Error return value of queryCallback.Register is not checked (errcheck)
callbacks/callbacks.go|57 col 50| Error return value of (*gorm.io/gorm.callback).Register is not checked (errcheck)
callbacks/callbacks.go|58 col 25| Error return value of deleteCallback.Register is not checked (errcheck)
callbacks/callbacks.go|59 col 25| Error return value of deleteCallback.Register is not checked (errcheck)
callbacks/callbacks.go|60 col 25| Error return value of deleteCallback.Register is not checked (errcheck)
callbacks/callbacks.go|67 col 25| Error return value of updateCallback.Register is not checked (errcheck)
callbacks/callbacks.go|68 col 25| Error return value of updateCallback.Register is not checked (errcheck)
callbacks/callbacks.go|69 col 25| Error return value of updateCallback.Register is not checked (errcheck)
callbacks/callbacks.go|77 col 22| Error return value of rowCallback.Register is not checked (errcheck)
callbacks/callbacks.go|81 col 22| Error return value of rawCallback.Register is not checked (errcheck)
schema/schema_test.go|194 col 36| G601: Implicit memory aliasing in for loop. (gosec)
schema/schema_test.go|235 col 35| G601: Implicit memory aliasing in for loop. (gosec)
schema/schema_test.go|303 col 35| G601: Implicit memory aliasing in for loop. (gosec)
callbacks/associations.go|322 col 7| unnecessary trailing newline (whitespace)
callbacks/delete.go|110 col 2| unnecessary trailing newline (whitespace)
utils/tests/dummy_dialecter.go|42 col 1| calculated cyclomatic complexity for function QuoteTo is 14, max is 10 (cyclop)
utils/tests/utils.go|30 col 1| calculated cyclomatic complexity for function AssertEqual is 25, max is 10 (cyclop)
callbacks/associations.go|13 col 1| calculated cyclomatic complexity for function SaveBeforeAssociations is 30, max is 10 (cyclop)
callbacks/associations.go|110 col 1| calculated cyclomatic complexity for function SaveAfterAssociations is 74, max is 10 (cyclop)