Skip to content

Conversation

@cristaloleg
Copy link
Member

In release notes we will mention that we've changed gocritic in path to go-critic. And after 1-2 releases we will drop it.

Fixes #1481

CC: @quasilyte @mcandre

@cristaloleg cristaloleg self-assigned this Apr 1, 2025
@cristaloleg cristaloleg mentioned this pull request Apr 1, 2025
@quasilyte
Copy link
Member

CC @ldez

@cristaloleg cristaloleg requested a review from Copilot April 1, 2025 19:38
Copy link

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

This PR renames all occurrences of "gocritic" to "go-critic" to align with the new naming convention for the project's binary and documentation. The changes include updating inline comments, configuration flags, documentation files, test references, and release script filenames.

  • Update inline comments and configuration options in linter/linter.go and cmd/gocritic/* files.
  • Introduce new files in cmd/go-critic/* and update tests, documentation, and release scripts accordingly.

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
linter/linter.go Updated comments to reference go-critic instead of gocritic.
docs/manifest.md Updated manifest text for go-critic naming.
cmd/gocritic/main.go Updated executable name from gocritic to go-critic.
cmd/gocritic/doc.go Updated flag set name to go-critic.
cmd/gocritic/check.go Updated flag set name to go-critic.
cmd/go-critic/main.go New main package implementation for go-critic.
cmd/go-critic/doc.go New documentation command implementation for go-critic.
cmd/go-critic/check_test.go Updated integration test to build the renamed executable.
cmd/go-critic-analysis/go-critic-analysis.go New analysis command file for go-critic.
checkers/checkers_test.go Updated test references from cmd/gocritic to cmd/go-critic.
checkers/checkers.go Updated package documentation comment for go-critic.
checkers/analyzer/analyzer.go Updated debug initialization message for go-critic.
_scripts/release.go Updated release script to use go-critic filenames and archive names.
README.md Updated usage instructions and installation commands for go-critic.
Files not reviewed (1)
  • Makefile: Language not supported

@ldez
Copy link
Contributor

ldez commented Apr 1, 2025

Thank you for the CC.

Inside golangci-lint, the name will continue to be gocritic because it's our convention to only use alphabetical lowercase names.

@cristaloleg
Copy link
Member Author

From what I know golangci-lint doesn't use cmd/* paths at all, so it's also safe.

@ldez
Copy link
Contributor

ldez commented Apr 1, 2025

yes it's safe

@ldez
Copy link
Contributor

ldez commented Apr 1, 2025

Have you thought of a different file structure: move the main to the root of the project?

go install -v github.com/go-critic/go-critic@latest

instead of

go install -v github.com/go-critic/go-critic/cmd/go-critic@latest

@cristaloleg cristaloleg merged commit 0ca7635 into master Apr 3, 2025
2 checks passed
@cristaloleg cristaloleg deleted the rename-gocritic-to-go-critic branch April 3, 2025 18:24
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Oct 19, 2025
TekWizely added a commit to TekWizely/pre-commit-golang that referenced this pull request Nov 10, 2025
Update invocations and docs to use/reference `go-critic` to match upstream rename.

* go-critic/go-critic#1482
TekWizely added a commit to TekWizely/pre-commit-golang that referenced this pull request Nov 10, 2025
Update invocations and docs to use/reference `go-critic` to match upstream rename.

* go-critic/go-critic#1482
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.

all: confusing names

4 participants