Skip to content

Commit 3592c55

Browse files
committed
(maint) Changed severity on brace formatting
Always have braces for statements.
1 parent 7d5af14 commit 3592c55

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ csharp_prefer_static_local_function = true:suggestion
9191
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
9292

9393
# Code-block preferences
94-
csharp_prefer_braces = true:silent
94+
csharp_prefer_braces = true:error
9595
csharp_prefer_simple_using_statement = true:suggestion
9696

9797
# Expression-level preferences
@@ -249,6 +249,9 @@ dotnet_diagnostic.IDE1006.severity = none
249249
# IDE0005: Using directive is unnecessary.
250250
dotnet_diagnostic.IDE0005.severity = error
251251

252+
# IDE0011: Add braces
253+
dotnet_diagnostic.IDE0011.severity = error
254+
252255
[*.{cs,vb}]
253256
dotnet_style_operator_placement_when_wrapping = beginning_of_line
254257
tab_width = 4

src/Cake.AppVeyor.Tests/Fakes/FakeCakeContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public string GetLogs()
5252
public void DumpLogs()
5353
{
5454
foreach (var m in log.Entries)
55+
{
5556
Console.WriteLine(m);
57+
}
5658
}
5759
}
5860
}

src/Cake.AppVeyor.Tests/Keys.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,21 @@ public static string AppVeyorApiToken
1818
// Check for a local file with a token first
1919
var localFile = Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", "..", ".appveyorapitoken");
2020
if (File.Exists(localFile))
21+
{
2122
appVeyorApiToken = File.ReadAllText(localFile);
23+
}
2224

2325
// Next check for an environment variable
2426
if (string.IsNullOrEmpty(appVeyorApiToken))
27+
{
2528
appVeyorApiToken = Environment.GetEnvironmentVariable("test_appveyor_api_token");
29+
}
2630

2731
// Finally use the const value
2832
if (string.IsNullOrEmpty(appVeyorApiToken))
33+
{
2934
appVeyorApiToken = YOUR_APPVEYOR_API_TOKEN;
35+
}
3036
}
3137

3238
return appVeyorApiToken;

0 commit comments

Comments
 (0)