Skip to content

Add 'mirror' to the enabled linters in .golangci.yml - #124

Merged
YoshihitoAso merged 3 commits into
dev-2.6from
lint-mirror
Sep 22, 2025
Merged

Add 'mirror' to the enabled linters in .golangci.yml#124
YoshihitoAso merged 3 commits into
dev-2.6from
lint-mirror

Conversation

@YoshihitoAso

@YoshihitoAso YoshihitoAso commented Sep 22, 2025

Copy link
Copy Markdown
Member

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:

  • Updated accounts/abi/bind/bind.go to use regexp.MatchString instead of regexp.Match, simplifying the regular expression call and making the code more idiomatic.

Testing improvements:

  • Updated three test functions in cmd/geth/accountcmd_plugin_test.go to use WriteString instead of Write([]byte(...)) when writing test data to temporary files, improving code readability and intent. [1] [2] [3]

Linting configuration:

  • Added the mirror linter to the .golangci.yml configuration to enhance static analysis coverage.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.Match with regexp.MatchString for more idiomatic string pattern matching
  • Update test code to use WriteString instead of Write([]byte(...)) for better readability
  • Enable the mirror linter 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.

Base automatically changed from feature/#122 to dev-2.6 September 22, 2025 01:29
Moved the 'misspell' linter after 'mirror' in the linters list for improved organization.
@YoshihitoAso
YoshihitoAso marked this pull request as ready for review September 22, 2025 01:34
@YoshihitoAso YoshihitoAso moved this to In Progress in ibet-Network v2.6 Sep 22, 2025
@YoshihitoAso YoshihitoAso self-assigned this Sep 22, 2025
@YoshihitoAso
YoshihitoAso merged commit ca27ba0 into dev-2.6 Sep 22, 2025
5 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in ibet-Network v2.6 Sep 22, 2025
@YoshihitoAso
YoshihitoAso deleted the lint-mirror branch September 22, 2025 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants