dotnet / dotnet/fsharp

Tracking: Issues & suggestions solvable with Analyzers SDK

Open
#16,219 17 comments 0 reactions 0 assignees View on GitHub
Analyzers Tracking
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

This issue exists to collect existing painpoints which would be solved if an F# Analyzer solution existed.

## Warn on unoptimal APIs:
*All below could likely be a single analyzer with a project-defined .txt file listing the APIs to warn on*
Ban Assert.AreEqual(obj,obj) https://github.com/dotnet/fsharp/issues/14598
Warn non-generic collections https://github.com/dotnet/fsharp/issues/16259

## Warn on combination of API + type arguments
*Should be also doable with a single analyzer driven by a text file*
Ban `ignore` https://github.com/dotnet/fsharp/issues/15880
Warning for equality on structs because of boxing https://github.com/dotnet/fsharp/issues/526

## Warn specific language constructs
*Likely an easy generalization is not possible, those will need their own logic for traversing the (un)typed tree.*
*The constructs to target are well specifiable, analyzer could register for kinds of nodes to prune irrelevant code*
Ban early return from CEs https://github.com/dotnet/fsharp/issues/15759
Ban unnamed DU fields https://github.com/dotnet/fsharp/issues/15665

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.