========== Linting C:\Users\PC\source\repos\ConsoleApp\ConsoleApp\obj\Debug\net5.0\ConsoleApp.AssemblyInfo.fs ==========
========== Finished: 0 warnings ==========
========== Linting C:\Users\PC\source\repos\ConsoleApp\ConsoleApp\Program.fs ==========
Function was 4 lines long, suggested to be less than 2 lines long.
Error on line 3 starting at column 4
let dog x =
^
--------------------------------------------------------------------------------
========== Finished: 1 warnings ==========
========== Summary: 1 warnings ==========
Description
MaxLinesInFunction also counts commented lines, which is incorrect.
Steps To Reproduce
• 1. Make sure MaxLinesInFunction is enabled in fsharplint.json and set the
maxLines
to 2.• 2. The following files should be included in an example project:
ConsoleApp.fsproj
Program.fs
• 3.
dotnet fsharplint lint ..\ConsoleApp\ConsoleApp\ConsoleApp.fsproj
Current Results
Expected behavior
The rule shouldn't counts commented lines.
Related information