Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rubocop: Cap method length at 50 lines + disable module length
Remi pointed out in #666 that we basically just have to keep adding more more onto the `Max` exception for both these rules every time we add a new API resource. Here I suggest that we modify the check on method length in two ways: 1. Permanently disable the cop on `Util.object_classes`. This is just going to keep growing until we change are approach to it. 2. Choose a more reasonable maximum of 50 lines for elsewhere (IMO, the default of 10 is just too short). Most of our methods already come in below this, but there's a couple outliers like `#execute_request` in `StripeClient`. If we knock over some of those, we could lower this number again, but I suspect that we'd probably want somewhere closer to 30 (instead of 10) event then. I also disable the check on module length completely. I'm not convinced this is a very good heuristic for code quality.
- Loading branch information