-
Notifications
You must be signed in to change notification settings - Fork 647
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
False-positive #861
base: master
Are you sure you want to change the base?
False-positive #861
Conversation
@pedrofurtado Interesting. It seems that you are invoking also with Feel free to update the RuboCop config threshold to allow the Travis-CI builds to pass. |
@unixmonkey Thanks for feedback! My code is the following: render raise_on_all_errors: true, page_size: 'A4', orientation: 'Portrait', pdf: "my_file", encoding: 'UTF-8', template: "path/to/the/template" The failure in TravisCI is not related to the PR code 😕 It's about the existing code in gem |
@unixmonkey Was it possible to simulate the error? The false-positive 🤝 |
This is stated as by design here (because it can output the PDF on stdout): wkhtmltopdf/wkhtmltopdf#1980 You can change this by specifying the This should change it so that it only outputs to stderr on actual errors. I wonder if this should be the default since we always output a tempfile in this project. Can you please check against that combination and see if it helps? |
@unixmonkey Thanks for sharing this issue in wkhtmltopdf 🤝 The workaround suggested by you works well. The following code (with render log_level: 'error', raise_on_all_errors: true, page_size: 'A4', orientation: 'Portrait', pdf: "my_file", encoding: 'UTF-8', template: "path/to/the/template" But another users that will get the gem inside projects, will get in trouble with this false-positive, if they forget the use of |
@unixmonkey @mileszs With the option:
raise_on_all_errors: true
, even if pdf is generated successfully, is throwed an exception, becauseerr
contains the progress of process, with "Done" in the end 👍False-positive output: