Suppress Warnings
15th, Sep. 2019�大阪Ruby会議02
pp self
Recently we released Kibela Web API
Goal of this talk
Introduce Warning
What is the warning?
Warning levels
How to enable all warnings
Enable warnings without CLI option
What can we do with warning?
With warning, we can:
Find bugs
Contribute to OSS easier
Why should we fix warnings?
Why should we fix warnings?
Warning examples
Warnings examples
Deprecated method
cookpad/rrrspec#76
Deprecated method
Let’s look the pull request!
Part of the patch
- unless Dir.exists?(packaging_dir)�+ unless Dir.exist?(packaging_dir)
Overview
It is one of the easiest warning!
Other deprecated methods
Method redefined
whitequark/parser#378
Method Redefined
Let’s look the pull request!
Patch
Overview
In another case
duplicated when clause
thoughtbot/capybara-webkit#1068
Duplicated when clause
Part of the patch
Character class has
duplicated range
rouge-ruby/rouge#1197
Character class has duplicated range
Part of the patch (1)
Part of the patch (2)
Part of the patch (3)
Overview
instance variable not initialized
mizzy/specinfra#685
Instance variable not initialized
Patch
Other solutions
Conclusion
Conclusion
Thank you for listening!