dotnet / dotnet/sdk

EditorConfig template has `namespace` for `applicable_kinds` of `type_parameters` naming symbol

Open
#46,569 2 comments 2 reactions 0 assignees View on GitHub
Area-WebSDK untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Describe the bug

When using the EditorConfig template produced by `dotnet new .editorconfig` I noticed that the [`applicable_kinds`](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/naming-rules#symbol-group-properties) for the `type_parameters` naming symbol is set to `namespace` instead of `type_parameter`. This leads to type parameters being missed when attempting to enforce a naming convention.

### To Reproduce

With your SDK version of choice (tested with both 8 and 9) run `dotnet new .editorconfig`.

Within the produced `.editorconfig`, locate the naming symbol for type parameters (`dotnet_naming_symbols.type_parameters`) and inspect the value generated for `applicable_kinds`, it should be `namespace`.

### Additional information

I didn't notice any [existing issues/discussions](https://github.com/dotnet/sdk/issues?q=is%3Aissue%20editorconfig%20) surrounding having the incorrect kind, and it looks like the value has been `namespace` since the [initial creation of the template](https://github.com/dotnet/sdk/commit/c5d021feee9cabc532d8ae49d74d27b22aaad4c8#diff-56eeb55357d6d9f43ee56a277352a586219daf7bacf5d3495afea0bd8cb095aeR297), but please let me know if there's some extra info on if it's intentional.

I'm also familiar with templates, so I'm more than happy to make the necessary changes if this becomes a confirmed issue since it's simply replacing the offending line with:

```editorconfig
dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
```

----

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.