Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: enable var-naming from revive #2960

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmorel-35
Copy link
Contributor

@mmorel-35 mmorel-35 commented Feb 1, 2025

What does this PR do?

enable var-naming rule from revive

This also moves output configuration from Makefile to golangci-lint config

BREAKING CHANGES

⚠️ There are naming changes for constants and functions

Copy link

netlify bot commented Feb 1, 2025

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 3f5ac46
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/67a3ce8740706f000822952b
😎 Deploy Preview https://deploy-preview-2960--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mmorel-35 mmorel-35 marked this pull request as ready for review February 1, 2025 12:05
@mmorel-35 mmorel-35 requested a review from a team as a code owner February 1, 2025 12:05
Copy link
Contributor

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

Quite a few breaking changes here @mdelapenya due to public method renaming, thoughts?

arguments:
- ["ID"] # AllowList
- ["VM"] # DenyList
- - upperCaseConst: true # Extra parameter (upperCaseConst|skipPackageNameChecks)
Copy link
Contributor

Choose a reason for hiding this comment

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

question: is the second dash required, looks like a typo?

Copy link
Contributor Author

@mmorel-35 mmorel-35 Feb 2, 2025

Choose a reason for hiding this comment

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

No it’s not a typo, see this https://golangci-lint.run/usage/linters/#revive

func (c *ConsulContainer) ApiEndpoint(ctx context.Context) (string, error) {
mappedPort, err := c.MappedPort(ctx, defaultHttpApiPort)
// APIEndpoint returns host:port for the HTTP API endpoint.
func (c *ConsulContainer) APIEndpoint(ctx context.Context) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: this is breaking change so needs ! added to the title and "BREAKING CHANGE" to the description, see conventional commits for details

@mmorel-35 mmorel-35 changed the title chore: enable var-naming from revive chore: enable var-naming from revive !!! BREAKING CHANGES !!! Feb 3, 2025
@mdelapenya mdelapenya changed the title chore: enable var-naming from revive !!! BREAKING CHANGES !!! chore!: enable var-naming from revive Feb 3, 2025
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

I'm tempted to block this PR until we release a v1. Almost all the modules will be affected, impacting lots of potential users of the library.

We already have some BC in the current release, some more in the previous one, but they were very narrowed. Here we are not offering a deprecation path for the renamed methods.

Wdyt?

@mmorel-35
Copy link
Contributor Author

I can understand,
Maybe we can narrow the changes to private fields and methods first

@mdelapenya
Copy link
Member

Thanks for understanding, and your work!, @mmorel-35, it's a pleasure working with engineers like you.

If we can do that, first tackling the private fields, then we can move on with an another round of changes for the public API.

We can keep this PR as reference, in draft, and send different chunks. Thoughts?

@mmorel-35
Copy link
Contributor Author

Of course, I'll provide another branch to fit what we agree on.

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.

3 participants