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

errors replacements are labeled as faster #38

Closed

Conversation

mmorel-35
Copy link
Contributor

No description provided.

@mmorel-35 mmorel-35 force-pushed the replacement-diagnostics branch from e61e308 to 6ec2134 Compare November 21, 2024 20:42
analyzer/analyzer.go Outdated Show resolved Hide resolved
@mmorel-35 mmorel-35 force-pushed the replacement-diagnostics branch from 6ec2134 to 11df7ac Compare November 24, 2024 22:38
@mmorel-35 mmorel-35 changed the title chore: define newFasterFunctionReplacementDiagnostic and newFunctionReplacementDiagnostic chore: define newFasterFunctionReplacementDiagnostic Nov 24, 2024
@catenacyber
Copy link
Owner

Needs a rebase now

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@mmorel-35 mmorel-35 force-pushed the replacement-diagnostics branch from 11df7ac to 3f9d2a7 Compare November 27, 2024 06:51
@mmorel-35
Copy link
Contributor Author

@catenacyber ,
That's ready to go :) !

Comment on lines +32 to +40
fmt.Sprintf("%s", errSentinel) // want "fmt.Sprintf can be replaced with faster errSentinel.Error()"
fmt.Sprintf("%v", errSentinel) // want "fmt.Sprintf can be replaced with faster errSentinel.Error()"
fmt.Sprint(errSentinel) // want "fmt.Sprint can be replaced with faster errSentinel.Error()"
fmt.Sprintf("%s", io.EOF) // want "fmt.Sprintf can be replaced with faster io.EOF.Error()"
fmt.Sprintf("%v", io.EOF) // want "fmt.Sprintf can be replaced with faster io.EOF.Error()"
fmt.Sprint(io.EOF) // want "fmt.Sprint can be replaced with faster io.EOF.Error()"
fmt.Sprintf("%s", err) // want "fmt.Sprintf can be replaced with faster err.Error()"
fmt.Sprintf("%v", err) // want "fmt.Sprintf can be replaced with faster err.Error()"
fmt.Sprint(err) // want "fmt.Sprint can be replaced with faster err.Error()"
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing the report message constitutes a breaking change. However, the PR's title states "chore: define newFasterFunctionReplacementDiagnostic," which suggests it's a simple refactoring. I propose we either change the PR's title or avoid making breaking changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's related to this #38 (comment)

@mmorel-35 mmorel-35 changed the title chore: define newFasterFunctionReplacementDiagnostic errros.New is now labelled as faster replacement Nov 28, 2024
@mmorel-35 mmorel-35 changed the title errros.New is now labelled as faster replacement errrors replacements are labelled as faster Nov 28, 2024
@mmorel-35 mmorel-35 changed the title errrors replacements are labelled as faster errors replacements are labeled as faster Nov 29, 2024
@mmorel-35 mmorel-35 closed this by deleting the head repository Dec 7, 2024
@ccoVeille
Copy link

Why was it closed?

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.

4 participants