Skip to content

Conversation

@ldez
Copy link
Member

@ldez ldez commented Feb 17, 2025

Add golines as formatter.

golines is designed as a CLI, so I created a fork with minimal changes to be usable as a library.

https://github.com/golangci/golines

The readme of the repository explains all the changes.

Fixes #1914

Related to #5296 (comment)
Related to #3983

@ldez ldez added the linter: new Support new linter label Feb 17, 2025
@ldez ldez added this to the v2-unreleased milestone Feb 17, 2025
@ldez ldez requested a review from bombsimon February 17, 2025 13:55
@bombsimon
Copy link
Member

Nice! Given the fork it doesn't look like there's any plans to sync with the maintainers if they would be interested to do or accept changes to make the original repo compatible with golangci-lint? And maybe you're not either if you can reduce dependency scope? Not that I think that matters at this point given the number of linters.

Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

Should .golangci.next.reference.yml be updated?

@ldez
Copy link
Member Author

ldez commented Feb 17, 2025

Should .golangci.next.reference.yml be updated?

I will just update the json schema, the documentation will be rewritten because the 1st PR on formatters was just a compatibility layer, I will drop this layer and write the doc for all the formatters.

All the references will be updated but I don't want to do the job twice.

@ldez
Copy link
Member Author

ldez commented Feb 17, 2025

Nice! Given the fork it doesn't look like there's any plans to sync with the maintainers if they would be interested to do or accept changes to make the original repo compatible with golangci-lint? And maybe you're not either if you can reduce dependency scope? Not that I think that matters at this point given the number of linters.

In fact, it is not really possible because some elements inside the core of golines cannot be removed.
The isolation of the code inside a package will not solve the core of the problem.
Also, it will not reduce dependencies unless the code is moved inside a dedicated module and all the code related to debug/graph is removed.

As you can think, before forking I evaluated the other possibilities, but there are no trivial and non-highly invasive modifications.

@ccoVeille

This comment was marked as outdated.

@ldez ldez merged commit feddadf into golangci:main Feb 18, 2025
18 checks passed
@ldez ldez deleted the feat/golines branch February 18, 2025 13:04
@busser busser mentioned this pull request Mar 14, 2025
Closed
@ldez ldez modified the milestones: v2-unreleased, v2 Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce the https://github.com/segmentio/golines linter

3 participants