* Fix linting errors
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(linters): add ineffassign linter
This commit adds the `ineffassign` linter to the project's `.golangci.yml` configuration file. The `ineffassign` linter helps identify and flag assignments to variables that are never used, helping to improve code quality and maintainability.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* Add extra linters
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(golangci): Add header check
- Added goheader check to ensure all files have license headers
- Added build tags for "nats" in the .golangci.yml file to include the necessary dependencies for the "nats" package during the build process.
- Also, increased the maximum number of issues per linter and the maximum number of same issues reported by the linter to improve the code quality analysis.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* feat(.golangci.yml): Add new linters
Add the following new linters to the .golangci.yml configuration file:
- asasalint
- asciicheck
- bidichk
- contextcheck
- decorder
- dogsled
- errchkjson
- errname
- execinquery
- exportloopref
- ginkgolinter
- gocheckcompilerdirectives
These linters will help improve code quality and catch potential issues during the code review process.
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
---------
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
* MF-1348 - Add go-kit transport level logging
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix merge
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remark
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix go test flags
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in things and http service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix SDK tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in certs and provision service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in consumers service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* General renaming and add ErrMissingToken
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename httputil -> apiutil and use errors in users servive
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use apiutil errors in auth, bootstrap, readers, things and twins
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Replace errors.Contain by comparison
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateID
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateID
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify and rename ExtractAuthToken -> ExtractBearerToken
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix readers
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix auth key test and remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Improve comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateUUID check
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* MF-1368 - Add internal http api package for query params reading
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comments
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comments
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use internal/http and internalhttp alias
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv errors types to pkg
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil/query.go and remove aliases
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add blank lines after error definitions
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add ReadBoolValueQuery
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv readBoolValueQuery
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* User ErrNotFoundParam instead of pointer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert ReadUintQuery to use default values
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use default values for all query readers
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add provision service
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix Provision service initial version
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>