Mainflux.mainflux/logger
b1ackd0t 5e060d5620
NOISSUE - Add More Linters (#1924)
* 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>
2023-10-16 11:43:33 +02:00
..
doc.go MF-788 - Remove date and minimize copyright comments (#876) 2019-10-07 16:14:47 +02:00
exit.go NOISSUE - Add More Linters (#1924) 2023-10-16 11:43:33 +02:00
level.go MF-1348 - Add transport errors logging (#1544) 2022-03-03 17:13:46 +01:00
level_test.go MF-1506 - Group-based Access Control (#1716) 2023-06-14 12:40:37 +02:00
logger.go MF-1718 - Use static code analysis in CI (#1729) 2023-04-22 17:14:35 +02:00
logger_test.go NOISSUE - Change import name aliases (#1868) 2023-08-11 11:30:25 +02:00
mock.go NOISSUE - Logger Fatal method returns no value (#1728) 2023-02-22 20:50:51 +01:00