fsprojects / fsprojects/FSharpLint
Detect map indexing as a use of a partial function
Open
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 327
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
Description
Indexing in a map (e.g. someMap.[x]) is the same as using Map.Item, which is flagged by FSharpLint already (https://github.com/fsprojects/FSharpLint/commit/e4dcdaed07ca4c4145e8aa71cac1d02014df8a3d). We should flag indexing too.
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 with the existing Map.Item lint implementation referenced in the issue and trace how it identifies partial-function use. Check how F# map indexing such as someMap.[x] is represented and covered by the linter’s tests. Done means equivalent map-indexing expressions are flagged consistently with Map.Item.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100