Skip to content

Merge pull request #24 from nano-interactive/feat/add-nullable-mongoi… #143

Merge pull request #24 from nano-interactive/feat/add-nullable-mongoi…

Merge pull request #24 from nano-interactive/feat/add-nullable-mongoi… #143

GitHub Actions / golangci succeeded Jul 29, 2024 in 0s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (159)

auth/type.go|3 col 6| exported: type name will be used as auth.AuthType by other packages, and that stutters; consider calling this Type (revive)
config/config.go|51 col 39| fmt.Sprintf can be replaced with string concatenation (perfsprint)
config/config_test.go|1 col 9| package should be config_test instead of config (testpackage)
config/config_test.go|63 col 12| Error return value of encoding/json.Marshal is not checked (errchkjson)
config/config_test.go|91 col 12| Error return value of encoding/json.Marshal is not checked (errchkjson)
config/type_test.go|1 col 9| package should be config_test instead of config (testpackage)
config/type_test.go|9 col 6| TestParseConfigType's subtests should call t.Parallel (tparallel)
config/type_test.go|23 col 2| Range statement for test TestParseConfigType missing the call to method parallel in test Run (paralleltest)
config/type_test.go|24 col 50| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
decode.go|50 col 2| assigned to writer, but reassigned without using the value (wastedassign)
decode_test.go|16 col 6| TestDecodeQuery's subtests should call t.Parallel (tparallel)
decode_test.go|43 col 2| Range statement for test TestDecodeQuery missing the call to method parallel in test Run (paralleltest)
decode_test.go|54 col 6| TestDecodeQuery_WithOverlappingMemory's subtests should call t.Parallel (tparallel)
decode_test.go|80 col 2| Range statement for test TestDecodeQuery_WithOverlappingMemory missing the call to method parallel in test Run (paralleltest)
decode_test.go|90 col 6| TestDecodeQueryUnsafeString's subtests should call t.Parallel (tparallel)
decode_test.go|93 col 11| seperate is a misspelling of separate (misspell)
decode_test.go|118 col 2| Range statement for test TestDecodeQueryUnsafeString missing the call to method parallel in test Run (paralleltest)
decode_test.go|127 col 6| TestDecodeQueryUnsafe's subtests should call t.Parallel (tparallel)
decode_test.go|131 col 11| seperate is a misspelling of separate (misspell)
decode_test.go|155 col 2| Range statement for test TestDecodeQueryUnsafe missing the call to method parallel in test Run (paralleltest)
environment/env_test.go|1 col 9| package should be environment_test instead of environment (testpackage)
environment/env_test.go|10 col 6| TestParse's subtests should call t.Parallel (tparallel)
environment/env_test.go|29 col 2| Range statement for test TestParse missing the call to method parallel in test Run (paralleltest)
environment/env_test.go|30 col 9| fmt.Sprintf can be replaced with string concatenation (perfsprint)
environment/env_test.go|39 col 6| TestParseEnvironment_Error's subtests should call t.Parallel (tparallel)
environment/env_test.go|51 col 2| Range statement for test TestParseEnvironment_Error missing the call to method parallel in test Run (paralleltest)
environment/env_test.go|52 col 9| fmt.Sprintf can be replaced with string concatenation (perfsprint)
grpc/resolvers/dns_resolver.go|69 col 6| var-naming: func WithDnsAuthority should be WithDNSAuthority (revive)
grpc/resolvers/dns_resolver_test.go|46 col 38| unused-parameter: parameter 'p0' seems to be unused, consider removing or renaming it as _ (revive)
grpc/resolvers/dns_resolver_test.go|52 col 40| unused-parameter: parameter 'p0' seems to be unused, consider removing or renaming it as _ (revive)
grpc/resolvers/dns_resolver_test.go|58 col 37| unused-parameter: parameter 'p0' seems to be unused, consider removing or renaming it as _ (revive)
ip.go|12 col 2| var-naming: var onceIp should be onceIP (revive)
ip.go|17 col 2| var-naming: const UnknownIp should be UnknownIP (revive)
ip.go|74 col 6| var-naming: func AnonymizeIp should be AnonymizeIP (revive)
ip.go|91 col 54| seperated is a misspelling of separated (misspell)
ip.go|93 col 6| var-naming: func RealIp should be RealIP (revive)
ip_test.go|30 col 2| var-naming: var localIp should be localIP (revive)
ip_test.go|72 col 2| var-naming: var expectedIp should be expectedIP (revive)
logging/logging_test.go|1 col 9| package should be logging_test instead of logging (testpackage)
randint/randint.go|31 col 14| unnecessary conversion (unconvert)
randint/randint_test.go|1 col 9| package should be randint_test instead of randint (testpackage)
request_id.go|10 col 2| var-naming: const RequestIdLength should be RequestIDLength (revive)
request_id.go|17 col 6| var-naming: func GetRequestId should be GetRequestID (revive)
request_id_test.go|1 col 9| package should be utils_test instead of utils (testpackage)
request_id_test.go|20 col 2| var-naming: var requestId should be requestID (revive)
request_id_test.go|27 col 1| Function TestGetRequestId_ReturnError_On_Crypto_Read_Call missing the call to method parallel (paralleltest)
request_id_test.go|40 col 49| do not define dynamic errors, use wrapped static errors instead: "errors.New("failed to read enough bytes")" (err113)
request_id_test.go|42 col 2| var-naming: var requestId should be requestID (revive)
signals/signals.go|12 col 15| do not define dynamic errors, use wrapped static errors instead: "errors.New("Cannot find signal " + s)" (err113)
signals/signals_test.go|1 col 9| package should be signals_test instead of signals (testpackage)
signals/signals_test.go|25 col 1| Function TestGetSignalSuccess missing the call to method parallel (paralleltest)
testing/cmd/cmd.go|43 col 33| context-as-argument: context.Context should be the first parameter of a function (revive)
testing/cmd/cmd.go|86 col 9| context-keys-type: should not use basic type string as key in context.WithValue (revive)
testing/cmd/cmd.go|158 col 34| context-as-argument: context.Context should be the first parameter of a function (revive)
testing/fasthttp/fasthttp.go|22 col 6| parameter testing.TB should have name tb (thelper)
testing/fasthttp/fasthttp.go|43 col 6| parameter testing.TB should have name tb (thelper)
testing/fasthttp/fasthttp.go|89 col 23| response body must be closed (bodyclose)
testing/fasthttp/fasthttp.go|106 col 6| parameter testing.TB should have name tb (thelper)
testing/fiber/fiber.go|15 col 4| Sturcture is a misspelling of Structure (misspell)
testing/fiber/fiber.go|57 col 24| response body must be closed (bodyclose)
testing/file/logger.go|75 col 6| var-naming: func ReadJsonLine should be ReadJSONLine (revive)
testing/file/logger.go|105 col 6| var-naming: func ReadJsonData should be ReadJSONData (revive)
testing/file/logger.go|160 col 6| var-naming: func TempJsonLogFile should be TempJSONLogFile (revive)
testing/file/logger_test.go|1 col 9| package should be file_test instead of file (testpackage)
testing/file/logger_test.go|26 col 10| avoid allocations with (*os.File).WriteString (mirror)
testing/file/logger_test.go|27 col 10| avoid allocations with (*os.File).WriteString (mirror)
testing/file/logger_test.go|54 col 14| Error return value of encoding/json.Marshal is not checked: unsafe type float64 found (errchkjson)
testing/file/logger_test.go|56 col 9| avoid allocations with (*os.File).WriteString (mirror)
testing/file/logger_test.go|85 col 15| Error return value of encoding/json.Marshal is not checked: unsafe type float64 found (errchkjson)
testing/http/modifier.go|44 col 33| should rewrite http.NewRequestWithContext or add (*Request).WithContext (noctx)
testing/http/modifier_test.go|1 col 9| package should be http_test instead of http (testpackage)
testing/http/modifier_test.go|33 col 27| should rewrite http.NewRequestWithContext or add (*Request).WithContext (noctx)
testing/http/modifier_test.go|49 col 27| should rewrite http.NewRequestWithContext or add (*Request).WithContext (noctx)
testing/testing.go|26 col 67| creater is a misspelling of creature (misspell)
testing/testing.go|27 col 51| creater is a misspelling of creature (misspell)
testing/testing.go|30 col 63| creater is a misspelling of creature (misspell)
testing/testing_test.go|1 col 9| package should be testing_test instead of testing (testpackage)
testing/timescaledb.go|14 col 2| blank-imports: a blank import should be only in a main or test package, or have a comment justifying it (revive)
testing/timescaledb.go|45 col 37| host:port in url should be constructed with net.JoinHostPort and not directly with fmt.Sprintf (nosprintfhostport)
testing/timescaledb.go|81 col 32| host:port in url should be constructed with net.JoinHostPort and not directly with fmt.Sprintf (nosprintfhostport)
types/objectid.go|74 col 10| do not define dynamic errors, use wrapped static errors instead: "errors.New("not a object ID")" (err113)
types/types.go|24 col 2| SA1019: bson.DefaultRegistry is deprecated: Use [NewRegistry] to construct a new default registry. To use a custom registry when marshaling or unmarshaling, use the "SetRegistry" method on an [Encoder] or [Decoder] instead: (staticcheck)
types/types.go|110 col 10| do not define dynamic errors, use wrapped static errors instead: "errors.New("invalid bool data")" (err113)
types/types.go|135 col 23| ST1016: methods on the same type should have the same receiver name (seen 2x "n", 4x "o") (stylecheck)
types/types.go|279 col 21| ST1016: methods on the same type should have the same receiver name (seen 2x "n", 4x "o") (stylecheck)
types/types.go|303 col 21| ST1016: methods on the same type should have the same receiver name (seen 2x "n", 4x "o") (stylecheck)
types/types.go|615 col 1| receiver-naming: receiver name n should be consistent with previous receiver name o for NullFloat32 (revive)
types/types.go|624 col 1| receiver-naming: receiver name n should be consistent with previous receiver name o for NullFloat32 (revive)
types/types.go|635 col 1| receiver-naming: receiver name n should be consistent with previous receiver name o for NullUint16 (revive)
types/types.go|644 col 1| receiver-naming: receiver name n should be consistent with previous receiver name o for NullUint16 (revive)
types/types.go|655 col 1| receiver-naming: receiver name n should be consistent with previous receiver name o for NullUint32 (revive)
types/types.go|664 col 1| receiver-naming: receiver name n should be consistent with previous receiver name o for NullUint32 (revive)
types/types_test.go|1 col 9| package should be types_test instead of types (testpackage)
types/types_test.go|14 col 1| Function TestNullBool_UnmarshalJSON missing the call to method parallel (paralleltest)
types/types_test.go|23 col 1| Function TestNullBool_UnmarshalJSONActiveNull missing the call to method parallel (paralleltest)
types/uuid.go|23 col 10| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid JSON CQLUUID %s", str)" (err113)
types/uuid.go|76 col 1| named return "err" with type "error" found (nonamedreturns)
types/uuid.go|90 col 1| named return "err" with type "error" found (nonamedreturns)
types/uuid.go|97 col 3| naked return in func DecodeMsg with 34 lines of code (nakedret)
types/uuid.go|104 col 4| naked return in func DecodeMsg with 34 lines of code (nakedret)
types/uuid.go|112 col 5| naked return in func DecodeMsg with 34 lines of code (nakedret)
types/uuid.go|127 col 1| named return "o" with type "[]byte" found (nonamedreturns)
types/uuid.go|134 col 1| named return "o" with type "[]byte" found (nonamedreturns)
types/uuid.go|141 col 3| naked return in func UnmarshalMsg with 41 lines of code (nakedret)
types/uuid.go|148 col 4| naked return in func UnmarshalMsg with 41 lines of code (nakedret)
types/uuid.go|168 col 5| naked return in func UnmarshalMsg with 41 lines of code (nakedret)
types/uuid.go|179 col 20| directive // nolint:gomnd should be written without leading space as //nolint:gomnd (nolintlint)
types/uuid.go|182 col 83| directive // nolint:all should be written without leading space as //nolint:all (nolintlint)
types/uuid.go|217 col 15| unnecessary conversion (unconvert)
types/uuid_test.go|1 col 9| package should be types_test instead of types (testpackage)
types/uuid_test.go|16 col 2| var-naming: var newUuid should be newUUID (revive)
types/uuid_test.go|27 col 2| var-naming: var newUuid should be newUUID (revive)
types/uuid_test.go|41 col 2| var-naming: var newUuid should be newUUID (revive)
url.go|19 col 2| var-naming: var ErrInvalidUrl should be ErrInvalidURL (revive)
url.go|22 col 6| var-naming: func TrimUrlForScylla should be TrimURLForScylla (revive)
url.go|23 col 2| var-naming: var trimmedUrl should be trimmedURL (revive)
url.go|37 col 3| assignOp: replace trimmedUrl = trimmedUrl + "/" with trimmedUrl += "/" (gocritic)
url.go|57 col 6| var-naming: func TrimUrlForScyllaOld should be TrimURLForScyllaOld (revive)
url.go|59 col 2| var-naming: var trimmedUrl should be trimmedURL (revive)
url.go|93 col 6| var-naming: func GetDomainFromUrl should be GetDomainFromURL (revive)
url.go|94 col 2| var-naming: var fullUrlObject should be fullURLObject (revive)
url.go|102 col 6| var-naming: func TruncateUrl should be TruncateURL (revive)
url_test.go|1 col 9| package should be utils_test instead of utils (testpackage)
url_test.go|37 col 100| wierd is a misspelling of weird (misspell)
url_test.go|38 col 97| wierd is a misspelling of weird (misspell)
url_test.go|101 col 1| Function TestTrimUrlForScylla missing the call to method parallel (paralleltest)
url_test.go|104 col 3| var-naming: struct field fullUrl should be fullURL (revive)
url_test.go|105 col 3| var-naming: struct field wantUrl should be wantURL (revive)
url_test.go|240 col 2| Range statement for test TestTrimUrlForScylla missing the call to method parallel in test Run (paralleltest)
url_test.go|242 col 4| var-naming: var resultUrl should be resultURL (revive)
url_test.go|263 col 1| Function TestGetDomainFromUrl missing the call to method parallel (paralleltest)
url_test.go|266 col 3| var-naming: struct field fullUrl should be fullURL (revive)
url_test.go|280 col 1| Function TestUrl missing the call to method parallel (paralleltest)
utils.go|14 col 1| directive //nolint:gosec is unused for linter "gosec" (nolintlint)
utils.go|20 col 1| directive //nolint:gosec is unused for linter "gosec" (nolintlint)
utils.go|105 col 1| named return "file" with type "*os.File" found (nonamedreturns)
utils.go|138 col 1| named return "file" with type "*os.File" found (nonamedreturns)
utils.go|176 col 20| var-declaration: should drop = nil from declaration of var pixel; it is the zero value (revive)
utils_test.go|1 col 9| package should be utils_test instead of utils (testpackage)
utils_test.go|93 col 6| test helper function should start from b.Helper() (thelper)
utils_test.go|160 col 6| TestGetenv's subtests should call t.Parallel (tparallel)
utils_test.go|164 col 2| Function TestGetenv missing the call to method parallel in the test run (paralleltest)
utils_test.go|174 col 2| Function TestGetenv missing the call to method parallel in the test run (paralleltest)
utils_test.go|175 col 3| os.Setenv() can be replaced by _.Setenv() in anonymous function (tenv)
utils_test.go|187 col 6| TestIsInt's subtests should call t.Parallel (tparallel)
utils_test.go|191 col 2| Function TestIsInt missing the call to method parallel in the test run (paralleltest)
utils_test.go|195 col 2| Function TestIsInt missing the call to method parallel in the test run (paralleltest)
utils_test.go|199 col 2| Function TestIsInt missing the call to method parallel in the test run (paralleltest)
validators/mongoid.go|17 col 2| var-naming: type ObjectIdRule should be ObjectIDRule (revive)
validators/mongoid.go|18 col 2| var-naming: type NullableObjectIdRule should be NullableObjectIDRule (revive)
validators/mongoid.go|25| File is not gofumpt-ed (gofumpt)
validators/mongoid.go|85| File is not gofumpt-ed (gofumpt)
validators/mongoid_test.go|1 col 9| package should be validators_test instead of validators (testpackage)
validators/mongoid_test.go|14 col 6| type nullableRequest is unused (unused)
validators/mongoid_test.go|21| File is not gofumpt-ed (gofumpt)
validators/mongoid_test.go|22 col 26| func nullableRequest.Validate is unused (unused)
validators/mongoid_test.go|45 col 2| var-naming: var objectId should be objectID (revive)
validators/mongoid_test.go|67 col 3| var-naming: var objectId should be objectID (revive)
validators/mongoid_test.go|75 col 3| var-naming: var objectId should be objectID (revive)