fsprojects / fsprojects/FSharpLint
feat: ExplicitPrecedenceViaParentheses rule
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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