Skip to content

Conversation

@parhamsaremi
Copy link
Contributor

@parhamsaremi parhamsaremi commented Jul 20, 2022

Checks for OCaml and CSharp styles. Fixes #532

add .vscode to .gitignore
@parhamsaremi parhamsaremi force-pushed the issue532-squashed-fixed branch from a8e55ba to 98f3cbd Compare July 20, 2022 12:16
@parhamsaremi parhamsaremi changed the title Add new rule IndexerAccessorStyleConsistency for OCaml and CSharp styles Add new rule IndexerAccessorStyleConsistency Jul 20, 2022

## Rationale

F# 6.0 introduces a new style for indexer accessor, similar to the one in C#. But it's convenient for our codebase to be consistent in which accessor to use.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parhamsaremi which accessor -> which accessor style


let generateOutput (range: FSharp.Compiler.Text.Range) (styleMain: string) (styleError: string) =
{ Range = range
Message = String.Format ("You must use %s styling instead of %s for indexer accessing", styleMain, styleError)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parhamsaremi same here (please use sprintf)

@parhamsaremi parhamsaremi force-pushed the issue532-squashed-fixed branch 2 times, most recently from 51c2871 to 7cf80f6 Compare July 25, 2022 09:46
Checks for OCaml and CSharp styles. Fixes fsprojects#532
@parhamsaremi parhamsaremi force-pushed the issue532-squashed-fixed branch from 7cf80f6 to dcf2cc4 Compare July 25, 2022 10:01
@parhamsaremi parhamsaremi changed the title Add new rule IndexerAccessorStyleConsistency DRAFT: Add new rule IndexerAccessorStyleConsistency Nov 3, 2022
@parhamsaremi parhamsaremi marked this pull request as draft November 3, 2022 13:37
@knocte
Copy link
Collaborator

knocte commented Dec 15, 2025

Superseded by #794

@knocte knocte closed this Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: indexing syntax consistency

2 participants