FSharpLint icon indicating copy to clipboard operation
FSharpLint copied to clipboard

Enable #nowarn to disable FSharpLint warnings

Open Happypig375 opened this issue 3 years ago • 1 comments

Description

Enable #nowarn to disable FSharpLint warnings

Repro steps

#nowarn "FL0038"
type lowercase = class end

Expected behavior

Lint warning is disabled for file.

Actual behavior

Lint warning continues to exist.

Known workarounds

Use the provided json settings - Not standard and not local to the file.

Related information

  • Operating system Windows
  • Branch master
  • .NET Runtime, CoreCLR or Mono Version 5.0.400
  • Performance information, links to performance testing scripts None

Happypig375 avatar Sep 19 '21 17:09 Happypig375

Thank you for the suggestion, does seem worth implementing as StyleCop supports similar on the C# side via #pragma warning disable SA1401.

In terms of the workarounds we do support similar syntax in comments: https://fsprojects.github.io/FSharpLint/how-tos/rule-suppression.html

duckmatt avatar Sep 20 '21 18:09 duckmatt