Skip to content

Question about detected function length #8

@jdhitsolutions

Description

@jdhitsolutions

I also have a question on how you determine what a proper function length is. From your blog post I appreciate the notion that sometimes you need to refactor. But sometimes a function is long by design. For example, in a function I tested I get 78 lines of code. But if you don't count commented lines or my lines of Write-Verbose (or someone might use Write-Debug), then I'd get a line count of 60 which your analyzer would report as "better". For that matter if don't count white space, my function gets down to 46 lines of actual code that does something.

I completely understand where you are going with this metric but I'm trying to figure out how it is being determined and if that is the "best" way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions