fsprojects / fsprojects/FSharpLint

feat: ExplicitPrecedenceViaParentheses rule

Open
#700 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
327
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Even if F# follows strict precedence rules, programmers are not infallible and might not know them.

Therefore, for code like this:

let it = 1 |> (fun a b -> a) <| 2

It would be better to recommend parentheses:

let it = (1 |> (fun a b -> a)) <| 2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating existing precedence-related lint rules and their tests in FSharpLint. Compare the two expressions in the issue and determine how the rule should identify the unparenthesized form. Done means the unparenthesized example is reported and the parenthesized form is accepted, with tests covering both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.