Roslyn: Naming codestyles should handle local functions

Created on 30 Sep 2017  路  9Comments  路  Source: dotnet/roslyn

The screenshot below shows the list of specifications we currently support.
Can we add local functions?

image

FYI @kuhlenh @sharwell @agocke

Area-IDE Feature Request

Most helpful comment

but rather introduce one for locals (which local functions would be one of).

I'm not sure i would like that. I use camelCase for locals, but PascalCase for local methods :)

All 9 comments

@jcouv @dpoeschl Lots of people have asked for local variable support for naming. Do we think local functions would have different style than other locals'?

@kuhlenh I typically name local functions in PascalCase, as opposed to other locals in camelCase.

@sharwell so treat local functions like methods? I'm just trying to figure out if there really is a need to call local functions out separately, or if we set the style to match locals or methods.

In compiler code, we use PascalCase for methods, but so far we've used camelCase for local functions. The IDE code uses PascalCase even for local functions.

I've been thinking about this more. Maybe we wouldn't introduce a naming code style for local functions, but rather introduce one for locals (which local functions would be one of).

but rather introduce one for locals (which local functions would be one of).

I'm not sure i would like that. I use camelCase for locals, but PascalCase for local methods :)

I think it's clear from this discussion that we need a separate rule :smile:

A style for tuple element names would also be useful.

@sharwell Please reopen, local functions are still not handled (only PR for locals was merged).

Was this page helpful?
0 / 5 - 0 ratings