Skip to content

Conversation

@janishorsts
Copy link
Collaborator

No description provided.

@janishorsts janishorsts self-assigned this Jan 29, 2026
@janishorsts janishorsts requested a review from a team as a code owner January 29, 2026 16:17
@janishorsts janishorsts requested review from kmannislands and removed request for a team January 29, 2026 16:17
@github-actions
Copy link

➖ Are we earthbuild yet?

No change in "earthly" occurrences

📈 Overall Progress

Branch Total Count
main 5704
This PR 5704
Difference +0

Keep up the great work migrating from Earthly to Earthbuild! 🚀

💡 Tips for finding more occurrences

Run locally to see detailed breakdown:

./.github/scripts/count-earthly.sh

Note that the goal is not to reach 0.
There is anticipated to be at least some occurences of earthly in the source code due to backwards compatibility with config files and language constructs.

@gemini-code-assist
Copy link

Summary of Changes

Hello @janishorsts, 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 focuses on refactoring error naming conventions across the codebase to comply with the errname linter's guidelines. It involves renaming specific error types and variables to follow the Error suffix for types and err prefix for variables. Additionally, documentation comments have been added to Error() methods for better clarity. While the pull request title indicates an intent to "enable errname", the linter's configuration in .golangci.yaml shows it being removed, suggesting either a temporary disablement during the fix process or a discrepancy between the title's intent and the configuration change.

Highlights

  • Error Naming Convention Refactoring: Renamed error types (e.g., "ErrEarthfileNotExist" to "EarthfileNotExistError") and error variables (e.g., "earthlyDirCreateErr" to "errEarthlyDirCreate") to align with Go's errname linter rules.
  • Error Interface Documentation: Added // Error implements [error] interface. comments to Error() methods in several custom error types for improved clarity and documentation.
  • Linter Configuration Adjustment: The errname linter has been removed from the .golangci.yaml configuration. This action contradicts the pull request title "enable errname", but the code changes themselves address violations that the errname linter would identify, suggesting a preparation phase for its eventual re-enablement.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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

@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 enables the errname linter and applies the necessary fixes across the codebase. The changes correctly rename error types to end with Error and error variables to start with err. The updated comments on Error() methods are also a good improvement for code clarity. I've found one minor issue related to an error type check that I've commented on. Overall, this is a good cleanup PR.

if err != nil {
switch err := errors.Cause(err).(type) {
case *buildcontext.ErrEarthfileNotExist:
case *buildcontext.EarthfileNotExistError:

Choose a reason for hiding this comment

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

medium

The EarthfileNotExistError is returned as a value, not a pointer, in buildcontext/detectbuildfile.go. This type switch should therefore check for the value type buildcontext.EarthfileNotExistError instead of the pointer type *buildcontext.EarthfileNotExistError to correctly handle the error.

Suggested change
case *buildcontext.EarthfileNotExistError:
case buildcontext.EarthfileNotExistError:

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.

2 participants