Rubocode (in VS Code's ruby-rubocode extension) insists that no method should be longer than 10 lines:
Metrics/MethodLength: Method has too many lines. [11/10] (convention:Metrics/MethodLength)
I think that this is a bit severe, and would like to change it to 20.
Is it possible to edit this value via VS Code's settings.json?
Update
B) Is it also possible to increase the Metrics/LineLength from 80 to 120?
Metrics/LineLength: Line is too long. [108/80] (convention:Metrics/LineLength)
You can edit rubocop config/default.yml to do what you are looking for.
Look at the Metrics section and change Metrics/LineLength and Metrics/MethodLength values.
If you want to change these settings for your current project only then create .rubocop.yml file in the required project directory:
Metrics/LineLength:
Max: 120
Metrics/MethodLength:
Max: 20
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With