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

ci: Add golangci-lint configuration and fix initial linting errors #32

Merged
merged 3 commits into from
Jun 29, 2024

Conversation

ccoVeille
Copy link
Contributor

@ccoVeille ccoVeille commented Jun 28, 2024

This pull request lays the groundwork for improving code quality by integrating golangci-lint, a powerful Go linter. Here's what this PR accomplishes:

  1. Configuration Setup:

    • Adds the .golangci.yml configuration file.
    • This configuration ensures consistent code style and helps identify potential issues.
  2. Initial Code Cleanup:

    • Fixes linting errors detected by golangci-lint in our existing codebase.
    • These corrections address stylistic inconsistencies and minor code smells.

Next Steps (Not Included in This PR):

  • CI Integration: The next step is to integrate golangci-lint into our CI pipeline. This will enable automated linting on each pull request.
  • Additional Rules: As we gain experience with golangci-lint, we can gradually enable more rules to enhance our code quality further.

Review Checklist:

  • Verify that golangci-lint configuration is appropriate for our project.
  • All initial linting errors have been adequately addressed.
  • Confirm that the changes do not introduce regressions or unexpected behavior.

Fixes #20

@supitsdu supitsdu changed the title add more rules to golangci-lint ci: Add golangci-lint configuration and fix initial linting errors Jun 29, 2024
@supitsdu supitsdu added cleanup Minor changes to remove dead code, fix inconsistencies, etc. ci Issues or PRs related to continuous integration (CI) pipelines. labels Jun 29, 2024
Copy link
Owner

@supitsdu supitsdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. Thanks for the contribution. Later I'll have to make a workflow to run the linter. I'll do some research and tests.

See: https://golangci-lint.run/welcome/install/#github-actions
See: https://github.com/golangci/golangci-lint-action

@supitsdu supitsdu merged commit eda2677 into supitsdu:main Jun 29, 2024
1 check passed
@ccoVeille ccoVeille deleted the golangci branch June 29, 2024 04:39
@ccoVeille
Copy link
Contributor Author

Yes, it can be added very easily.

Have fun with golangci-lint and revive. It's a sane journey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues or PRs related to continuous integration (CI) pipelines. cleanup Minor changes to remove dead code, fix inconsistencies, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add golangci-lint to project
2 participants