Skip to content

feat: detect String.formatted() in LogLevels reformat method - #361

Merged
kahgoh merged 2 commits into
exercism:mainfrom
Thakurji890:fix-loglevel-formatted-feedback
Sep 17, 2026
Merged

kahgoh merged 2 commits into
exercism:mainfrom
Thakurji890:fix-loglevel-formatted-feedback

Conversation

@Thakurji890

@Thakurji890 Thakurji890 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor
  • Rename FORMAT constant to STRING_FORMAT/STRING_FORMATTED for clarity
  • Update detection to explicitly catch both String.format() and String.formatted() instance method (Java 15+)
  • Add UsingStringFormatted test scenario and approved output

Fixes #355

- Rename FORMAT constant to STRING_FORMAT/STRING_FORMATTED for clarity
- Update detection to explicitly catch both String.format() and
  String.formatted() instance method (Java 15+)
- Add UsingStringFormatted test scenario and approved output
@Thakurji890
Thakurji890 requested a review from a team as a code owner September 10, 2026 12:47
@Thakurji890

Copy link
Copy Markdown
Contributor Author

Thanks for the approval, @kotp! I noticed there are two workflows awaiting approval to run. Could a maintainer please approve them when you get a chance?

@kahgoh kahgoh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the changes here look ok, but the corresponding comment should also be updated.

@Thakurji890

Copy link
Copy Markdown
Contributor Author

@kahgoh Thanks for the review! I have updated the analyzer comment to include String.formatted() as requested.

You can view the updated text in my website-copy commit. Let me know if you need anything else before merging!

@Thakurji890
Thakurji890 requested review from kahgoh and kotp September 12, 2026 13:08
@kotp

kotp commented Sep 12, 2026

Copy link
Copy Markdown
Member

You can view the updated text in my website-copy commit. Let me know if you need anything else before merging!

Can you link the relevant pull request for these changes, making the linking more effective, less having to look for the work that should be reviewed, and potentially approved as well?

@Thakurji890

Copy link
Copy Markdown
Contributor Author

@kotp Here is the Pull Request for the website-copy changes: exercism/website-copy#2408

@IsaacG IsaacG left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Guardian approval, leaving this for maintainers to merge.

@kahgoh
kahgoh merged commit bafd318 into exercism:main Sep 17, 2026
4 checks passed
@Thakurji890
Thakurji890 deleted the fix-loglevel-formatted-feedback branch September 17, 2026 11:57
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.

Analyzer feedback for reformat method in LogLevels flags .formatted() specifically as String.format

4 participants