Closed Mersho closed 9 months ago
The AvoidTooShortNames rule doesn't give warning on a short name function argument.
• 1. The following files should be included in an example project:
ConsoleApp.fsproj
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net5.0</TargetFramework> <WarnOn>3390;$(WarnOn)</WarnOn> </PropertyGroup> <ItemGroup> <Compile Include="Program.fs" /> </ItemGroup> </Project>
Program.fs
open System type Foo() = member this.BarMethod(x: int) = x.ToString()
• 2. dotnet fsharplint lint ..\ConsoleApp\ConsoleApp\ConsoleApp.fsproj
dotnet fsharplint lint ..\ConsoleApp\ConsoleApp\ConsoleApp.fsproj
========== 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 ========== ========== Finished: 0 warnings ========== ========== Summary: 0 warnings ==========
The rule should warn about using short identifiers.
Description
The AvoidTooShortNames rule doesn't give warning on a short name function argument.
Steps To Reproduce
• 1. The following files should be included in an example project:
ConsoleApp.fsproj
Program.fs
• 2.
dotnet fsharplint lint ..\ConsoleApp\ConsoleApp\ConsoleApp.fsproj
Current Results
Expected behavior
The rule should warn about using short identifiers.
Related information