function-analyser


Namefunction-analyser JSON
Version 0.0.15 PyPI version JSON
download
home_page
SummaryIdentify long functions to refactor with this function analyser
upload_time2023-06-22 22:19:02
maintainer
docs_urlNone
author
requires_python>=3.7
licenseCopyright 2023, Nicholas Hemley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords analysis static refactoring code smells
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # function-analyser

TL;DR;
```commandline
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.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "function-analyser",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Nicholas Hemley <nicholas.oliver.hemley@gmail.com>",
    "keywords": "analysis,static,refactoring,code,smells",
    "author": "",
    "author_email": "Nicholas Hemley <nicholas.oliver.hemley@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/9d/79/25882f9cc4510d095fd10bc5687a0c84e46d8a064d25d7dbad4b73e0bc4e/function-analyser-0.0.15.tar.gz",
    "platform": null,
    "description": "# function-analyser\n\nTL;DR;\n```commandline\npip install function-analyser\n\n```\nThere is much debate about the ideal length of a function or method.\n\nE.g.\n```\nThe first rule of functions is that they should be small.\nThe second rule of functions is that they should be smaller than that.\nFunctions should not be 100 lines long.\nFunctions should hardly ever be 20 lines long.\n```\nRobert (Bob) Martin, Clean Code: A Handbook of Agile Software Craftsmanship (2008)\nas cited in https://softwareengineering.stackexchange.com/questions/133404/what-is-the-ideal-length-of-a-method-for-you\n\nCommon sense, therefore, offers one solution.\n\nHowever, I have taken a different approach in running\nanalysis on many codebases and using this to calibrate\na functional analysis tool to run on your *own* codebase.\n\nThe results are encapsulated in this useful function analysis\ntool.\n",
    "bugtrack_url": null,
    "license": "Copyright 2023, Nicholas Hemley  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Identify long functions to refactor with this function analyser",
    "version": "0.0.15",
    "project_urls": null,
    "split_keywords": [
        "analysis",
        "static",
        "refactoring",
        "code",
        "smells"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7095b590090723302ec1137bbe60783e5ea12a85f316a1314e2b22070c5cc13f",
                "md5": "f7c8fd178a88f6421925c94916f713e5",
                "sha256": "c8d531565b59ef2fce67a6959e19497d7e9cae4066c24535c3438a557f7bf692"
            },
            "downloads": -1,
            "filename": "function_analyser-0.0.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f7c8fd178a88f6421925c94916f713e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7828,
            "upload_time": "2023-06-22T22:19:00",
            "upload_time_iso_8601": "2023-06-22T22:19:00.723354Z",
            "url": "https://files.pythonhosted.org/packages/70/95/b590090723302ec1137bbe60783e5ea12a85f316a1314e2b22070c5cc13f/function_analyser-0.0.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d7925882f9cc4510d095fd10bc5687a0c84e46d8a064d25d7dbad4b73e0bc4e",
                "md5": "d1ad9a198e6e765cd8c0da2b9ce3a7ab",
                "sha256": "87bd2910ef16bfa0bf4fda119ced41b02d6bf43a2b20f46cf02e9fe16c174af6"
            },
            "downloads": -1,
            "filename": "function-analyser-0.0.15.tar.gz",
            "has_sig": false,
            "md5_digest": "d1ad9a198e6e765cd8c0da2b9ce3a7ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 10623,
            "upload_time": "2023-06-22T22:19:02",
            "upload_time_iso_8601": "2023-06-22T22:19:02.262517Z",
            "url": "https://files.pythonhosted.org/packages/9d/79/25882f9cc4510d095fd10bc5687a0c84e46d8a064d25d7dbad4b73e0bc4e/function-analyser-0.0.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-22 22:19:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "function-analyser"
}
        
Elapsed time: 0.27252s