Add 'mirror' to the enabled linters in .golangci.yml - #124
Merged
Conversation
Added 'mirror' to the enabled linters in .golangci.yml. Replaced regexp.Match with regexp.MatchString in bind.go for clarity. Updated accountcmd_plugin_test.go to use WriteString instead of Write for writing test data to temp files.
There was a problem hiding this comment.
Pull Request Overview
This pull request improves code quality through idiomatic Go practices and enhances linting configuration. The changes focus on using more appropriate standard library functions and adding static analysis coverage.
- Replace
regexp.Matchwithregexp.MatchStringfor more idiomatic string pattern matching - Update test code to use
WriteStringinstead ofWrite([]byte(...))for better readability - Enable the
mirrorlinter in golangci configuration for additional static analysis
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/geth/accountcmd_plugin_test.go | Updates three test functions to use WriteString for writing test data to temporary files |
| accounts/abi/bind/bind.go | Replaces regexp.Match with regexp.MatchString for string pattern matching |
| .golangci.yml | Adds mirror linter to the enabled linters list |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Moved the 'misspell' linter after 'mirror' in the linters list for improved organization.
purplesmoke05
approved these changes
Sep 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces minor improvements to code quality and test clarity, as well as a small update to linting configuration. The main changes include switching to more idiomatic Go functions in tests, improving a regular expression usage, and enabling an additional linter.
Code quality and correctness:
accounts/abi/bind/bind.goto useregexp.MatchStringinstead ofregexp.Match, simplifying the regular expression call and making the code more idiomatic.Testing improvements:
cmd/geth/accountcmd_plugin_test.goto useWriteStringinstead ofWrite([]byte(...))when writing test data to temporary files, improving code readability and intent. [1] [2] [3]Linting configuration:
mirrorlinter to the.golangci.ymlconfiguration to enhance static analysis coverage.