fsprojects / fsprojects/FSharpLint
Pipe notation must be preserved when applying a fix
Open
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 327
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
Description
FL0065 does not preserve pipe notation
Repro steps
- Use code
let getAllRegistriTags (registriTagsContainers : Type seq) =
registriTagsContainers
|> Seq.map (fun r -> r.GetProperties())
|> Seq.concat
|> Seq.filter (fun r -> r.PropertyType = typeof<RegistriTag> )
|> Seq.map (fun r -> r.GetMethod.Invoke(null,[||]) :?> RegistriTag)
- Apply fix
- Get
let getAllRegistriTags (registriTagsContainers : Type seq) =
(Seq.collect (fun r -> r.GetProperties()) registriTagsContainers)
|> Seq.filter (fun r -> r.PropertyType = typeof<RegistriTag> )
|> Seq.map (fun r -> r.GetMethod.Invoke(null,[||]) :?> RegistriTag)
Expected behavior
let getAllRegistriTags (registriTagsContainers : Type seq) =
registriTagsContainers
|> Seq.collect (fun r -> r.GetProperties ())
|> Seq.filter (fun r -> r.PropertyType = typeof<RegistriTag>)
|> Seq.map (fun r -> r.GetMethod.Invoke(null,[||]) :?> RegistriTag)
Related information
- F# Lint 0.1
- .NET Core 3.1.401
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
Reproduce the FL0065 fix with the F# example in the issue and compare the output with the expected pipe-preserving form. Trace the FL0065 fixer entry point and its related tests, then verify that applying the fix keeps the pipe notation and produces the shown transformation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100