Skip to content

Commit 0f16f21

Browse files
Fix code analysis warnings
1 parent 2da8e07 commit 0f16f21

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/Atata.Configuration.Json.Tests/CustomJsonConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ public class CustomJsonConfig : JsonConfig<CustomJsonConfig>
1414

1515
public string[] StringArrayValues { get; set; }
1616

17-
public List<string> StringListValues { get; set; }
17+
public List<string> StringListValues { get; } = new List<string>();
1818

1919
public CustomSection Section { get; set; }
2020

21-
public List<CustomItemSection> Items { get; set; }
21+
public List<CustomItemSection> Items { get; } = new List<CustomItemSection>();
2222

2323
public class CustomSection
2424
{
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This file is used by Code Analysis to maintain SuppressMessage
2+
// attributes that are applied to this project.
3+
// Project-level suppressions either have no target or are given
4+
// a specific target and scoped to a namespace, type, member, etc.
5+
6+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "<Pending>", Scope = "member", Target = "~P:Atata.Configuration.Json.Tests.CustomJsonConfig.StringArrayValues")]

src/Atata.ruleset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
8787
<Rule Id="SA0001" Action="None" />
8888
<Rule Id="SA1101" Action="None" />
89+
<Rule Id="SA1135" Action="None" />
8990
<Rule Id="SA1200" Action="None" />
9091
<Rule Id="SA1202" Action="None" />
9192
<Rule Id="SA1404" Action="None" />

0 commit comments

Comments
 (0)