fsprojects / fsprojects/FSharpLint
bug: MemberNames rule triggers on compiler generated delegate member
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
- Configure the
memberNames.config.namingfield toCamelCase - 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
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 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