Skip to content

fix: Adjust argument index for Fprintf in fmtpercentv linter check - #4443

Merged
gmlewis merged 2 commits into
google:masterfrom
Not-Dhananjay-Mishra:fmtpercentv-fix
Aug 8, 2026
Merged

fix: Adjust argument index for Fprintf in fmtpercentv linter check#4443
gmlewis merged 2 commits into
google:masterfrom
Not-Dhananjay-Mishra:fmtpercentv-fix

Conversation

@Not-Dhananjay-Mishra

Copy link
Copy Markdown
Contributor

Fprintf has the following signature

func Fprintf(w io.Writer, format string, a ...any) (n int, err error)

Previously, the linter always assumed the format string was at expr.Args[0]

fmtStrBasicLit, ok := expr.Args[0].(*ast.BasicLit)

#4436 (comment)

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra changed the title fix: Adjust argument index for Fprintf in fmtpercentv linter checks fix: Adjust argument index for Fprintf in fmtpercentv linter check Aug 7, 2026

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @Not-Dhananjay-Mishra!
LGTM.
Merging.

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.55%. Comparing base (97ca12d) to head (cdb71e4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4443   +/-   ##
=======================================
  Coverage   97.55%   97.55%           
=======================================
  Files         194      194           
  Lines       19892    19892           
=======================================
  Hits        19406    19406           
  Misses        268      268           
  Partials      218      218           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis
gmlewis merged commit 848675f into google:master Aug 8, 2026
15 checks passed
@Not-Dhananjay-Mishra
Not-Dhananjay-Mishra deleted the fmtpercentv-fix branch August 8, 2026 03:07
@Not-Dhananjay-Mishra

Copy link
Copy Markdown
Contributor Author

Thank you, @Not-Dhananjay-Mishra!
LGTM.
Merging.

Thanks @gmlewis Btw, I recently completed one year contributing here. I have learned a lot along the way. ❤️

@gmlewis

gmlewis commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Thank you, @Not-Dhananjay-Mishra!
LGTM.
Merging.

Thanks @gmlewis Btw, I recently completed one year contributing here. I have learned a lot along the way. ❤️

Awesome! Congratulations, @Not-Dhananjay-Mishra and thank you very much for your contributions!
Your help is greatly appreciated!
I especially appreciate how carefully you check the JSON schemas and guide other contributors how to appropriately handled the required/optional distinctions (when all too frequently I just gloss over them). So special thanks go to you specifically for this!!!

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.

2 participants