Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add golangci-lint #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add golangci-lint #9

wants to merge 2 commits into from

Conversation

lucacome
Copy link
Member

@lucacome lucacome commented Dec 4, 2024

This pull request introduces several changes to improve the linting process, enhance code quality, and ensure consistency in the logging functions. The most important changes include the addition of a GitHub Actions workflow for linting, configuration of linters for Go, and minor code style enhancements in the logging functions.

Linting and CI improvements:

  • GitHub Actions workflow for linting: Added a new GitHub Actions workflow (.github/workflows/lint.yml) to run linting on push and pull request events to the master branch. This includes steps for setting up the Go environment and running Go lint and actionlint.

  • GolangCI configuration: Updated the .golangci.yml file to configure various linters and their settings, such as misspell, revive, govet, and enabling multiple linters like errcheck, staticcheck, and unused. This configuration ensures comprehensive linting coverage.

Code style enhancements:

  • Logging function comments: Standardized the comments for logging functions in log/log.go by adding periods at the end of each comment. This change improves the readability and consistency of the code documentation. [1] [2] [3] [4] [5] [6] [7] [8]

  • Code formatting: Removed unnecessary blank lines in utils/fields.go and utils/fields_test.go to maintain a clean and consistent code format. [1] [2] [3]

@github-actions github-actions bot added the chore label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant