Skip to main content

Identify long functions to refactor with this function analyser

Project description

function-analyser

TL;DR;

pip install function-analyser

There is much debate about the ideal length of a function or method.

E.g.

The first rule of functions is that they should be small.
The second rule of functions is that they should be smaller than that.
Functions should not be 100 lines long.
Functions should hardly ever be 20 lines long.

Robert (Bob) Martin, Clean Code: A Handbook of Agile Software Craftsmanship (2008) as cited in https://softwareengineering.stackexchange.com/questions/133404/what-is-the-ideal-length-of-a-method-for-you

Common sense, therefore, offers one solution.

However, I have taken a different approach in running analysis on many codebases and using this to calibrate a functional analysis tool to run on your own codebase.

The results are encapsulated in this useful function analysis tool.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

function-analyser-0.0.15.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

function_analyser-0.0.15-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page