Skip to content

add golangci-lint - #5533

Open
pfi79 wants to merge 1 commit into
hyperledger:mainfrom
pfi79:add-golangci-lint1
Open

add golangci-lint#5533
pfi79 wants to merge 1 commit into
hyperledger:mainfrom
pfi79:add-golangci-lint1

Conversation

@pfi79

@pfi79 pfi79 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

The main idea is to replace outdated checks.

Аfter accepting the pr, I will include other checks

  • first those that will remove the old checks: misspell staticcheck gofumpt,
  • then I will add new checks, it is now commented out in .golangci.yml

@pfi79
pfi79 requested review from a team as code owners July 29, 2026 10:42
@tock-ibm
tock-ibm requested a review from Copilot August 3, 2026 08:19

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 PR integrates golangci-lint into Fabric’s Go linting/tooling flow, aiming to replace older standalone checks and provide a configurable lint pipeline via a new .golangci.yml.

Changes:

  • Adds golangci-lint as a managed Go tool and wires it into make linter / scripts/golinter.sh.
  • Removes the standalone goimports and go vet steps from the custom linter script and updates the Go style guide accordingly.
  • Introduces a new repository-level .golangci.yml with an initial set of enabled linters and settings.

Reviewed changes

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

Show a summary per file
File Description
tools/go.mod Adds golangci-lint to the tools module and updates indirect requirements accordingly.
tools/go.sum Records the expanded dependency graph pulled in by golangci-lint and related linters.
scripts/golinter.sh Removes goimports/go vet checks; adds golangci-lint run invocation.
Makefile Updates linter target to build/install golangci-lint instead of goimports.
gotools.mk Registers golangci-lint in the gotools list and tool path mapping.
docs/source/style-guides/go-style.md Updates documented required tooling to include golangci-lint and remove goimports/go vet.
.golangci.yml Adds new golangci-lint v2 configuration for enabled linters and settings.

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

Comment thread .golangci.yml
Comment thread scripts/golinter.sh
@pfi79
pfi79 force-pushed the add-golangci-lint1 branch from 5ed5ffd to 13d1f06 Compare August 5, 2026 16:18
Signed-off-by: Fedor Partanskiy <fredprtnsk@gmail.com>
@pfi79
pfi79 force-pushed the add-golangci-lint1 branch from 13d1f06 to 6e85c57 Compare August 20, 2026 10:22
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