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

Fix malformed error happened #362

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

rytkmt
Copy link

@rytkmt rytkmt commented Aug 25, 2021

malformed format string error happened l of local variables in format method.

ex;
l = t.column("consumption_tax_rate", :"integer", **{:default=>10, :null=>false, :comment=>"消費税率; 0: 0%\n 5: 5%\n 8: 8%\n 10: 10%"})

bundle exec ridgepole

[ERROR] malformed format string - %\
        /home/vagrant/workspace/xxx/vendor/bundle/ruby/2.6.0/gems/ridgepole-0.9.5/lib/ridgepole/delta.rb:195:in `format'

I'm sorry for my bad English.
thanks.

@@ -191,7 +191,7 @@ def raise_exception(script, org)
errmsg = lines.with_index.map do |l, i|
line_num = i + 1
prefix = line_num == err_num ? '* ' : ' '
format("#{prefix}%<line_num>#{digit_number}d: #{l}", line_num: line_num)
format("#{prefix}%<line_num>#{digit_number}d: ", line_num: line_num) + l
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since using the format function, how about writing the following?

Suggested change
format("#{prefix}%<line_num>#{digit_number}d: ", line_num: line_num) + l
format("#{prefix}%<line_num>#{digit_number}d: %<line>s", line_num: line_num, line: l)

Copy link
Author

Choose a reason for hiding this comment

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

thank you for your advice.
changed 7ca22d4

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1165307878

  • 0 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-19.3%) to 77.983%

Totals Coverage Status
Change from base Build 1059232381: -19.3%
Covered Lines: 928
Relevant Lines: 1190

💛 - Coveralls

@coveralls
Copy link

coveralls commented Aug 25, 2021

Pull Request Test Coverage Report for Build 1165351453

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.236%

Totals Coverage Status
Change from base Build 1059232381: 0.0%
Covered Lines: 1161
Relevant Lines: 1194

💛 - Coveralls

@winebarrel
Copy link
Collaborator

Thank you!

@winebarrel winebarrel merged commit 86fcbd5 into ridgepole:0.9 Aug 25, 2021
@rytkmt rytkmt deleted the fix_delta_error_message branch August 25, 2021 06:25
@winebarrel
Copy link
Collaborator

v0.9.6 has been released.

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.

None yet

3 participants