Skip to content

Commit 2dff330

Browse files
committed
refs
1 parent 3c89a59 commit 2dff330

File tree

4 files changed

+37
-14
lines changed

4 files changed

+37
-14
lines changed

docs/github-action.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
docs:
2222
runs-on: windows-latest
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525
- name: Run MarkdownSnippets
2626
run: |
2727
dotnet tool install --global MarkdownSnippets.Tool

src/.editorconfig

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
root = true
2-
# EditorConfig: http://EditorConfig.org
3-
4-
# top-most EditorConfig file
52

63
[*]
74
indent_style = space
85

9-
106
[*.cs]
117
indent_size = 4
128
charset = utf-8
@@ -17,12 +13,42 @@ resharper_redundant_accessor_body_highlighting = error
1713
# Replace with field keyword
1814
resharper_replace_with_field_keyword_highlighting = error
1915

16+
# Replace with single call to Single(..)
17+
resharper_replace_with_single_call_to_single_highlighting = error
18+
19+
# Replace with single call to SingleOrDefault(..)
20+
resharper_replace_with_single_call_to_single_or_default_highlighting = error
21+
22+
# Replace with single call to LastOrDefault(..)
23+
resharper_replace_with_single_call_to_last_or_default_highlighting = error
24+
25+
# Replace with single call to Last(..)
26+
resharper_replace_with_single_call_to_last_highlighting = error
27+
28+
# Replace with single call to First(..)
29+
resharper_replace_with_single_call_to_first_highlighting = error
30+
31+
# Replace with single call to FirstOrDefault(..)
32+
resharper_replace_with_single_call_to_first_or_default_highlighting = error
33+
34+
# Replace with single call to Any(..)
35+
resharper_replace_with_single_call_to_any_highlighting = error
36+
37+
# Replace with single call to Count(..)
38+
resharper_replace_with_single_call_to_count_highlighting = error
39+
2040
# Declare types in namespaces
21-
dotnet_diagnostic.CA1050.severity = None
41+
dotnet_diagnostic.CA1050.severity = none
2242

2343
# Use Literals Where Appropriate
2444
dotnet_diagnostic.CA1802.severity = error
2545

46+
# Potentially misleading parameter name in lambda or local function
47+
resharper_all_underscore_local_parameter_name_highlighting = none
48+
49+
# Redundant explicit collection creation in argument of 'params' parameter
50+
resharper_redundant_explicit_params_array_creation_highlighting = error
51+
2652
# Do not initialize unnecessarily
2753
dotnet_diagnostic.CA1805.severity = error
2854

@@ -152,7 +178,6 @@ dotnet_diagnostic.CA1869.severity = error
152178
# Use a cached 'SearchValues' instance
153179
dotnet_diagnostic.CA1870.severity = error
154180

155-
156181
# Microsoft .NET properties
157182
trim_trailing_whitespace = true
158183
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async:suggestion

src/Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.12.6" />
1010
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1111
<PackageVersion Include="Polyfill" Version="7.5.0" />
12-
<PackageVersion Include="ProjectDefaults" Version="1.0.144" />
12+
<PackageVersion Include="ProjectDefaults" Version="1.0.147" />
1313
<PackageVersion Include="System.Memory" Version="4.6.0" />
1414
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
1515
<PackageVersion Include="Verify.DiffPlex" Version="3.1.2" />
16-
<PackageVersion Include="Verify.XunitV3" Version="28.3.2" />
16+
<PackageVersion Include="Verify.XunitV3" Version="28.4.0" />
1717
<PackageVersion Include="xunit.v3" Version="0.7.0-pre.15" />
1818
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0-pre.49" />
1919
<!-- explicit to avoid CVE -->

src/MarkdownSnippets/Processing/Line.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,19 @@ public override string ToString() =>
2222

2323
public string Current
2424
{
25-
get => current;
25+
get;
2626
set
2727
{
2828
IsWhiteSpace = value.IsWhiteSpace();
2929
Length = value.Length;
30-
current = value;
30+
field = value;
3131
}
32-
}
32+
} = null!;
3333

3434
public string? Path { get; }
3535
public int LineNumber { get; }
3636

3737
public int Length { get; private set; }
3838

39-
string current = null!;
40-
4139
public bool IsWhiteSpace { get; private set; }
4240
}

0 commit comments

Comments
 (0)