dotnet / dotnet/fsharp

FS0058 repeats for every let and member

Open
#2,948 3 comments 0 reactions 0 assignees View on GitHub
Area-Diagnostics Feature Improvement Theme-Simple-F#
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

I have found one specific way to provoke repetitive warnings FS0058 "Possible incorrect indentation" in what I would say is an excessive and unnecessary amount, since they all point to just one single issue really.

When placing an identifier after the egual sign at the end of a line with a class or module declaration, then warning FS0058 will be repeated for (almost?) every field and member of the class, or declaration in the module.

I have tried to find other ways to provoke these repetitions, but have not succeeded. I didn't try hard.

Picture:

![image](https://cloud.githubusercontent.com/assets/15068882/25550932/24021e78-2c7e-11e7-9042-9c0d271613a3.png)

I believe that if only a single warning - the first - was given, it would be sufficient. Somebody might then fix only that single case, and miss the rest, but would soon enough catch on and fix all in one go.

I did not add "Improve warning" to the title, since it's not necessarily a matter of improving the warning text.

#### Expected behavior

I believe one warning is enough in this case. In the picture shown, you can see that 3 errors are pushed out of sight, and also other warnings are pushed out of sight.

* Indications of severity
Not much of a practical problem.
Very low priority.
Maybe not to be fixed.
Reported mostly in case it is of interest in ways I don't see.

VS 2017 15.1 (26403.7), Visual F# Tools, nightly build 15.4.1.17042803.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.