Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Although I explored pre-commit hooks and unrelated standalone tools for Python, I was unable to find a static analysis package that emits a warning when the number of lines of a method/function is higher than a give threshold. For example, in Ruby, RuboCop gives this kind of warning. I think it's odd because it is a basic metric and while there are many other metrics covered by other analyzers, I didn't find one doing this job.
Although I explored pre-commit hooks and unrelated standalone tools for Python, I was unable to find a static analysis package that emits a warning when the number of lines of a method/function is higher than a give threshold. For example, in Ruby, RuboCop gives this kind of warning. I think it's odd because it is a basic metric and while there are many other metrics covered by other analyzers, I didn't find one doing this job.
Related posts
- Am I the only one who doesn't put parentheses around the parameters in Ruby method definitions?
- Standardrb: Ruby's bikeshed-proof linter and formatter
- Implementing Quality Checks In Your Git Workflow With Hooks and pre-commit
- "Useless Ruby sugar": Endless (one-line) methods
- Mastering Linters : A Code Quality Assurance Comprehensive Guide using Ruby on Rails