test/with_option_test.rb
Assignment Branch Condition size for test_set_bool is too high. [23.02/15] Open
Open
def test_set_bool
o = TestWithOption.new
assert_nil(o.option(:bool))
assert(!o.saved)
assert_raise { o.set_option(:bool, 'true') }
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Method has too many lines. [11/10] Open
Open
def test_set_bool
o = TestWithOption.new
assert_nil(o.option(:bool))
assert(!o.saved)
assert_raise { o.set_option(:bool, 'true') }
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Use snake_case for method names. Wontfix
Wontfix
def self.OPTIONS
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.
Example: EnforcedStyle: snake_case (default)
# bad
def fooBar; end
# good
def foo_bar; end
Example: EnforcedStyle: camelCase
# bad
def foo_bar; end
# good
def fooBar; end