Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip_local_functions is not respected when counting method lines #561

Closed
hankovich opened this issue Jul 19, 2023 · 2 comments · Fixed by #562
Closed

skip_local_functions is not respected when counting method lines #561

hankovich opened this issue Jul 19, 2023 · 2 comments · Fixed by #562

Comments

@hankovich
Copy link

Version of the Meziantou.Analyzer NuGet package

2.0.66

Rule Identifier

MA0051

Target Framework

net8.0

C# Language version

C# 12

Description

I receive a lot of MA0051: Method is too long for short methods with lots of local functions. skip_local_functions = true doesn't work. It looks like it's not respected

Reproduction Steps

Minimal code:

code to reproduce the error

Other information

No response

@meziantou
Copy link
Owner

The skip_local_functions options was only supported when counting statement, not lines. #562 adds support when counting lines.

@hankovich
Copy link
Author

Thank you for the ultra fast reply and fix. I use your package for two days, but already feel that it's pure gold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants