Skip to content

chore!: enable var-naming from revive#2960

Closed
mmorel-35 wants to merge 1 commit intotestcontainers:mainfrom
mmorel-35:revive/var-naming
Closed

chore!: enable var-naming from revive#2960
mmorel-35 wants to merge 1 commit intotestcontainers:mainfrom
mmorel-35:revive/var-naming

Conversation

@mmorel-35
Copy link
Copy Markdown
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

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 1, 2025

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 747e597
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/67b7b6b99d353b0008c1bd5c
😎 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
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
@mmorel-35 mmorel-35 force-pushed the revive/var-naming branch 2 times, most recently from ff493de to 3f5ac46 Compare February 5, 2025 20:48
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@mdelapenya
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@mmorel-35 mmorel-35 closed this May 11, 2025
@mmorel-35 mmorel-35 deleted the revive/var-naming branch May 11, 2025 07:52
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