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

SA1006: flag more functions #1542

Closed
wants to merge 2 commits into from
Closed

SA1006: flag more functions #1542

wants to merge 2 commits into from

Conversation

arp242
Copy link
Contributor

@arp242 arp242 commented May 25, 2024

Flag all stdlib functions that have both a Printf() and Print() variant.

Found with:

% rg -g '!internal/' -g '!cmd/' '^func ([()*a-zA-Z0-9_ ]+)?[A-Z]\w+\(\w+ string, \w+ \.\.\.any\)'

(will need to filter out some false positives)

Fixes #1528

Flag all stdlib functions that have both a Printf() and Print() variant.

Found with:

        % rg -g '!internal/' -g '!cmd/' '^func ([()*a-zA-Z0-9_ ]+)?[A-Z]\w+\(\w+ string, \w+ \.\.\.any\)'

(will need to filter out some false positives)

Fixes dominikh#1528
@arp242
Copy link
Contributor Author

arp242 commented May 29, 2024

Added a second commit to special-case fixing fmt.Errorf() → errors.New(). Previously that would get "fixed" to fmt.Error(). Just adding a note since you already approved this PR.

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.

SA1006: flag more functions
2 participants