fsprojects / fsprojects/FSharpLint

Pipe notation must be preserved when applying a fix

Open
#462 0 comments 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

Description

FL0065 does not preserve pipe notation

Repro steps
  1. 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)
  1. Apply fix
  2. 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.