Skip to content

Add code quality tooling (Makefile, golangci-lint)#26

Merged
renecannao merged 2 commits intomasterfrom
issue19-code-quality-tooling
Mar 23, 2026
Merged

Add code quality tooling (Makefile, golangci-lint)#26
renecannao merged 2 commits intomasterfrom
issue19-code-quality-tooling

Conversation

@renecannao
Copy link
Copy Markdown

Summary

  • Add a root-level Makefile with targets: build, test, lint, fmt, check-fmt, clean
  • Add .golangci.yml configuration with conservative linter set: govet, staticcheck, errcheck, ineffassign, unused, gosimple
  • Linter timeout set to 5 minutes; vendor directory excluded

Contributors can now use make build, make test, make lint, and make fmt instead of remembering individual commands.

No lint fixes are included — this PR only sets up the tooling. Lint fixes will follow in separate PRs.

Closes #19

Test plan

  • make build compiles bin/orchestrator successfully
  • make test runs the test suite
  • make fmt formats Go source files
  • make check-fmt exits cleanly when code is formatted
  • make clean removes build artifacts

Copilot AI review requested due to automatic review settings March 23, 2026 22:43
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 23, 2026

Warning

Rate limit exceeded

@renecannao has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 27 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3439068b-61d3-472f-9bd9-ac04939de9cd

📥 Commits

Reviewing files that changed from the base of the PR and between 5d2170b and 9febebe.

📒 Files selected for processing (3)
  • .golangci.yml
  • CONTRIBUTING.md
  • Makefile
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue19-code-quality-tooling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces foundational code quality and developer experience improvements by integrating golangci-lint and a Makefile. The changes standardize common development operations like building, testing, linting, and formatting, making it easier for contributors to maintain consistent code quality and streamline their workflow. This initial setup provides the necessary tooling without applying any immediate code changes based on linting results.

Highlights

  • New Makefile: A root-level Makefile was added, providing standardized targets for common development tasks such as build, test, lint, fmt, check-fmt, and clean.
  • Code Quality Tooling: Integrated golangci-lint with a .golangci.yml configuration. This setup includes a conservative set of linters: govet, staticcheck, errcheck, ineffassign, unused, and gosimple.
  • Linter Configuration: The linter configuration sets a timeout of 5 minutes and explicitly excludes the vendor directory from linting and issue reporting.
  • Developer Experience: Contributors can now use simple make commands (e.g., make build, make lint) to perform actions, streamlining the development workflow.
  • Scope: This pull request focuses solely on setting up the code quality tooling; no lint fixes are included at this stage.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces code quality tooling with a Makefile and golangci-lint configuration, which is a great step for the project. My review focuses on modernizing the linter configuration and slightly improving the Makefile for clarity. I've suggested using the current, non-deprecated keys in .golangci.yml and simplifying a build command in the Makefile. These changes will improve the maintainability of the new tooling.

Comment thread .golangci.yml Outdated
Comment on lines +2 to +4
timeout: 5m
skip-dirs:
- vendor
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The run.skip-dirs option is deprecated in golangci-lint. It's recommended to handle all exclusions under the issues section for consistency. Since issues.exclude-dirs is also used, this is redundant.

  timeout: 5m

Comment thread .golangci.yml Outdated
Comment on lines +17 to +18
exclude-dirs:
- vendor
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The issues.exclude-dirs option is deprecated. Please use issues.exclude-rules with a path filter instead. This is the modern way to configure exclusions in golangci-lint.

  exclude-rules:
    - path: vendor/

Comment thread Makefile Outdated
# Build orchestrator binary
build:
@mkdir -p bin
go build -o bin/orchestrator ./go/cmd/orchestrator/main.go
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

You can simplify the go build command by providing the package path instead of the path to the main.go file. go build will automatically find the main package within that directory.

	go build -o bin/orchestrator ./go/cmd/orchestrator

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds contributor-facing code quality tooling at the repo root to standardize common dev workflows (build/test/format/lint) and to introduce a baseline golangci-lint configuration consistent with existing Go formatting guidance in the repo.

Changes:

  • Add a root Makefile with common targets (build, test, lint, fmt, check-fmt, clean).
  • Add .golangci.yml enabling a conservative set of linters with a 5-minute timeout and vendor exclusion.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
Makefile Provides standardized local commands for building, testing, linting, and formatting.
.golangci.yml Configures golangci-lint with a limited linter set and vendor exclusions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
Comment on lines +3 to +10
# Build orchestrator binary
build:
@mkdir -p bin
go build -o bin/orchestrator ./go/cmd/orchestrator/main.go

# Run all unit tests
test:
go test ./go/...
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

PR description says this change "Closes #19", but the linked issue’s acceptance criteria includes documenting the new Makefile targets in CONTRIBUTING.md. CONTRIBUTING.md currently only documents ./script/build and go test commands, with no mention of make build/test/lint/fmt. Either add a short Makefile section to CONTRIBUTING.md (preferred) or avoid closing the issue in this PR.

Copilot uses AI. Check for mistakes.
Comment thread .golangci.yml
Comment on lines +1 to +5
run:
timeout: 5m
skip-dirs:
- vendor

Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The vendor directory is excluded twice: via run.skip-dirs and also under issues.exclude-dirs. This is redundant and can make it harder to reason about what is being skipped vs just excluded from reporting. Consider keeping only one mechanism (typically run-level skipping for vendor) or add a brief comment explaining why both are needed.

Copilot uses AI. Check for mistakes.
Comment thread .golangci.yml Outdated
Comment on lines +15 to +18

issues:
exclude-dirs:
- vendor
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

This issues.exclude-dirs: vendor duplicates the run.skip-dirs: vendor setting above. Consider removing one of them to avoid configuration drift and reduce confusion about whether vendor is skipped entirely or just excluded from issue reporting.

Suggested change
issues:
exclude-dirs:
- vendor

Copilot uses AI. Check for mistakes.
@renecannao renecannao merged commit 7e15c8b into master Mar 23, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code quality tooling (linters, Makefile)

2 participants