Skip to content

Fix error when column comments contain %#322

Merged
OdenTakashi merged 1 commit intodrwl:mainfrom
willnet:fix-error-on-comement-include-percent
Mar 16, 2026
Merged

Fix error when column comments contain %#322
OdenTakashi merged 1 commit intodrwl:mainfrom
willnet:fix-error-on-comement-include-percent

Conversation

@willnet
Copy link
Contributor

@willnet willnet commented Mar 16, 2026

The error occurs because sprintf is used when outputting column information in YARD format. If a column comment contains a % character, running annotate raises an ArgumentError. Since there is no clear reason to use sprintf in this part, replace it with simple string interpolation so that % in column comments no longer causes an error.

The error occurs because `sprintf` is used when outputting column information in YARD format. If a column comment contains a `%` character, running `annotate` raises an `ArgumentError`. Since there is no clear reason to use `sprintf` in this part, replace it with simple string interpolation so that `%` in column comments no longer causes an error.
Copy link
Collaborator

@OdenTakashi OdenTakashi left a comment

Choose a reason for hiding this comment

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

Looks great to me!
Thanks for the fix and adding the test coverage.

@OdenTakashi OdenTakashi merged commit b9554dd into drwl:main Mar 16, 2026
26 checks passed
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