Skip to content

Method name snake_case (ARCH6002)

Key ruby.naming.method-name-snakecase · Severity warning · Category naming

Flags method names that do not use snake_case. Ruby convention requires methods to be lowercase with underscores.

class Cart
def CalculateTotal
@items.sum
end
end
class Cart
def calculate_total
@items.sum
end
end

Rename the method to lowercase words separated by underscores (snake_case). This rule can be disabled per project/workspace in the panel.