Skip to content

Commit 0078c52

Browse files
authored
Merge pull request #6353 from mikadumont/docs-bash
closing bugs from doc bash
2 parents 22fae9f + f0dcbfe commit 0078c52

File tree

3 files changed

+108
-10
lines changed

3 files changed

+108
-10
lines changed

docs/ide/editorconfig-formatting-conventions.md

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: .NET formatting conventions for EditorConfig
3-
ms.date: 07/17/2019
3+
ms.date: 03/31/2020
44
ms.topic: reference
55
dev_langs:
66
- CSharp
77
- VB
88
helpviewer_keywords:
99
- formatting conventions [EditorConfig]
10-
author: TerryGLee
11-
ms.author: tglee
10+
author: mikadumont
11+
ms.author: midumont
1212
manager: jillfra
1313
ms.workload:
1414
- dotnet
@@ -145,6 +145,8 @@ The formatting rules in this section apply only to C# code.
145145
- [Wrap options](#wrap-options)
146146
- csharp_preserve_single_line_statements
147147
- csharp_preserve_single_line_blocks
148+
- [Using directive options](#using-directive-options)
149+
- csharp_using_directive_placement
148150

149151
### New-line options
150152

@@ -1204,6 +1206,50 @@ public int MyProperty
12041206
}
12051207
```
12061208

1209+
- [Using directive options](#using-directive-options)
1210+
- csharp_using_directive_placement
1211+
1212+
### Using directive options
1213+
1214+
This formatting rule concerns the use of using directives being placed inside versus outside a namespace.
1215+
1216+
Example *.editorconfig* file:
1217+
1218+
```ini
1219+
# 'using' directive preferences
1220+
[*.cs]
1221+
csharp_using_directive_placement = outside_namespace
1222+
csharp_using_directive_placement = inside_namespace
1223+
```
1224+
1225+
#### csharp_using_directive_placement
1226+
1227+
|||
1228+
|-|-|
1229+
| **Rule name** | csharp_using_directive_placement |
1230+
| **Applicable languages** | C# |
1231+
| **Introduced version** | Visual Studio 2019 version 16.1 |
1232+
| **Values** | `outside_namespace` - Leave using directives outside namespace<br /><br />`inside_namespace` - Leave using directives inside namespace |
1233+
| **Visual Studio default** | `outside_namespace` |
1234+
1235+
Code examples:
1236+
1237+
```csharp
1238+
// csharp_using_directive_placement = outside_namespace
1239+
using System;
1240+
1241+
namespace Conventions
1242+
{
1243+
1244+
}
1245+
1246+
// csharp_using_directive_placement = inside_namespace
1247+
namespace Conventions
1248+
{
1249+
using System;
1250+
}
1251+
```
1252+
12071253
## See also
12081254

12091255
- [Language conventions](editorconfig-language-conventions.md)

docs/ide/editorconfig-language-conventions.md

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: .NET language conventions for EditorConfig
3-
ms.date: 09/23/2019
3+
ms.date: 03/31/2020
44
ms.topic: reference
55
dev_langs:
66
- CSharp
77
- VB
88
helpviewer_keywords:
99
- language code style rules [EditorConfig]
10-
author: TerryGLee
11-
ms.author: tglee
10+
author: mikadumont
11+
ms.author: midumont
1212
manager: jillfra
1313
ms.workload:
1414
- dotnet
@@ -88,7 +88,6 @@ The style rules in this section are applicable to both C# and Visual Basic.
8888
- dotnet\_style\_predefined\_type\_for\_member_access
8989
- [Modifier preferences](#normalize-modifiers)
9090
- dotnet\_style\_require\_accessibility_modifiers
91-
- csharp\_preferred\_modifier_order
9291
- visual\_basic\_preferred\_modifier_order
9392
- dotnet\_style\_readonly\_field
9493
- [Parentheses preferences](#parentheses-preferences)
@@ -110,6 +109,7 @@ The style rules in this section are applicable to both C# and Visual Basic.
110109
- ["Null" checking preferences](#null-checking-preferences)
111110
- dotnet\_style\_coalesce_expression
112111
- dotnet\_style\_null_propagation
112+
- dotnet\_style\_prefer\_is\_null\_check\_over\_reference\_equality\_method
113113

114114
### <a name="this-and-me"></a>"This." and "Me." qualifiers
115115

@@ -403,6 +403,43 @@ Public Class MyClass
403403
End Class
404404
```
405405

406+
#### visual_basic_style_unused_value_expression_statement_preference
407+
408+
|||
409+
|-|-|
410+
| **Rule name** | visual_basic_style_unused_value_expression_statement_preference |
411+
| **Rule ID** | IDE0058 |
412+
| **Applicable languages** | Visual Basic |
413+
| **Values** | `unused_local_variable:silent` |
414+
| **Visual Studio default** | `unused_local_variable:silent` |
415+
416+
Code examples:
417+
418+
```vb
419+
' visual_basic_style_unused_value_expression_statement_preference = unused_local_variable:silent
420+
421+
Dim unused = Computation()
422+
```
423+
424+
#### visual_basic_style_unused_value_assignment_preference
425+
426+
|||
427+
|-|-|
428+
| **Rule name** | visual_basic_style_unused_value_assignment_preference |
429+
| **Rule ID** | IDE0059 |
430+
| **Applicable languages** | Visual Basic |
431+
| **Values** | `unused_local_variable:silent` |
432+
| **Visual Studio default** | `unused_local_variable:silent` |
433+
434+
Code examples:
435+
436+
```vb
437+
' visual_basic_style_unused_value_assignment_preference = unused_local_variable:suggestion
438+
439+
Dim unused = Computation()
440+
Dim x = 1;
441+
```
442+
406443
#### dotnet_style_readonly_field
407444

408445
|||
@@ -935,6 +972,7 @@ These rules could appear in an *.editorconfig* file as follows:
935972
[*.{cs,vb}]
936973
dotnet_style_coalesce_expression = true:suggestion
937974
dotnet_style_null_propagation = true:suggestion
975+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
938976
```
939977

940978
#### dotnet\_style\_coalesce_expression
@@ -997,6 +1035,16 @@ Dim v = If(o Is Nothing, Nothing, o.ToString()) ' or
9971035
Dim v = If(o IsNot Nothing, o.ToString(), Nothing)
9981036
```
9991037

1038+
### dotnet\_style\_prefer\_is\_null\_check\_over\_reference\_equality\_method
1039+
1040+
|||
1041+
|-|-|
1042+
| **Rule name** | dotnet_style_prefer_is_null_check_over_reference_equality_method |
1043+
| **Rule ID** | IDE0041 |
1044+
| **Applicable languages** | C# 6.0+ and Visual Basic 14+ |
1045+
| **Values** | `true` - Prefer is null check over reference equality method<br /><br />`false` - Prefer reference equality method over is null check |
1046+
| **Visual Studio default** | `true:silent` |
1047+
10001048
## .NET code quality settings
10011049

10021050
The quality rules in this section apply to both C# and Visual Basic code. They're used to configure code analyzers that are built into the Visual Studio integrated development environment (IDE). For information about configuring FxCop analyzers with an EditorConfig file, see [Configure FxCop analyzers](../code-quality/configure-fxcop-analyzers.md).
@@ -1075,6 +1123,8 @@ The style rules in this section are applicable to C# only.
10751123
- ["Null" checking preferences](#c-null-checking-preferences)
10761124
- csharp\_style\_throw_expression
10771125
- csharp\_style\_conditional\_delegate_call
1126+
- [Modifier preferences](#normalize-modifiers)
1127+
-csharp\_preferred\_modifier_order
10781128
- [Code block preferences](#code-block-preferences)
10791129
- csharp\_prefer_braces
10801130
- [Unused value preferences](#unused-value-preferences)

docs/ide/editorconfig-naming-conventions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: .NET Naming Conventions For EditorConfig files
3-
ms.date: 08/07/2019
3+
ms.date: 03/31/2020
44
ms.topic: reference
55
helpviewer_keywords:
66
- naming conventions [EditorConfig]
77
- EditorConfig naming conventions
8-
author: TerryGLee
9-
ms.author: tglee
8+
author: mikadumont
9+
ms.author: midumont
1010
manager: jillfra
1111
ms.workload:
1212
- multiple
@@ -51,6 +51,8 @@ The following list shows the allowable values, and you can specify multiple valu
5151
- local
5252
- local_function
5353

54+
[!NOTE] Tuple members aren't currently supported.
55+
5456
### Accessibility levels of symbols
5557

5658
To describe the accessibility levels of the symbols you want the naming rule to apply to, specify a property name in the following format:

0 commit comments

Comments
 (0)