fsprojects / fsprojects/FSharpLint

bug: MemberNames rule triggers on compiler generated delegate member

Open
#717 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

Description

When setting MemberNames to camelCase, the rule triggers on delegates, where the Invoke member is compiler-generated, and as far as I know, out of the users's control:

Consider changing `Invoke` to camelCase.
Error on line 127 starting at column 33
  type Target4<'a, 'b, 'c, 'd> = delegate of string * 'a * 'b * 'c * 'd -> unit
                                 ^
See https://fsprojects.github.io/FSharpLint/how-tos/rules/FL0045.html
Repro steps

Please provide the steps required to reproduce the problem

  1. Configure the memberNames.config.naming field to CamelCase
  2. Define a delegate and run linter
Expected behavior

Compiler generated members should not be candidates for lints where they are out of user control

Related information
  • Operating system - OSX
  • Branch - 0.24.2+143ae50e0e32d0842fa36c1bc22c735f2c72f114
  • .NET Runtime, CoreCLR or Mono Version - 8.0.303

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 reproducing the report with memberNames.config.naming set to CamelCase and the delegate example, then inspect the FL0045 rule behavior. Done means compiler-generated delegate members such as Invoke are no longer reported as naming violations.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.