Skip to content

Commit 8454c95

Browse files
Merge pull request #504 from BHoM/Test_Toolkit-#502-FixCodeCompliance
Fix code compliance on oM
2 parents 923cfbc + 746fbaf commit 8454c95

File tree

6 files changed

+4
-137
lines changed

6 files changed

+4
-137
lines changed

CodeComplianceTest_Engine/CodeComplianceTest_Engine.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@
156156
<Compile Include="Properties\AssemblyInfo.cs" />
157157
<Compile Include="Query\Checks\AttributeHasEndingPunctuation.cs" />
158158
<Compile Include="Query\Checks\HasConstructor.cs" />
159-
<Compile Include="Query\Checks\HasOneConstructor.cs" />
160159
<Compile Include="Query\Checks\HasUniqueMultiOutputAttributes.cs" />
161160
<Compile Include="Query\Checks\HasValidConstructor.cs" />
162161
<Compile Include="Query\Checks\HasValidCopyright.cs" />
@@ -171,7 +170,6 @@
171170
<Compile Include="Query\Checks\EngineClassMatchesFilePath.cs" />
172171
<Compile Include="Query\Checks\HasValidOutputAttribute.cs" />
173172
<Compile Include="Query\Checks\IsInputAttributePresent.cs" />
174-
<Compile Include="Query\Checks\HasSingleClass.cs" />
175173
<Compile Include="Query\Checks\InputAttributeIsUnique.cs" />
176174
<Compile Include="Query\Checks\InputParameterStartsLower.cs" />
177175
<Compile Include="Query\Checks\IsValidIImmutableObject.cs" />
@@ -289,4 +287,4 @@ xcopy "$(TargetDir)System.Threading.Tasks.Extensions.dll" "C:\ProgramData\BHoM\
289287
<Target Name="AfterBuild">
290288
</Target>
291289
-->
292-
</Project>
290+
</Project>

CodeComplianceTest_Engine/Query/Checks/HasConstructor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static partial class Query
4444
[Path(@"([a-zA-Z0-9]+)_Tests\\.*\.cs$", false)] //NUnit style projects
4545
[Path(@"([a-zA-Z0-9]+)_Test\\.*\.cs$", false)] //Verification projects
4646
[ComplianceType("code")]
47-
[ErrorLevel(TestStatus.Error)]
47+
[ErrorLevel(TestStatus.Warning)]
4848
[Output("A span that represents where this error resides or null if there is no error")]
4949
public static Span HasConstructor(this ClassDeclarationSyntax node)
5050
{

CodeComplianceTest_Engine/Query/Checks/HasOneConstructor.cs

Lines changed: 0 additions & 70 deletions
This file was deleted.

CodeComplianceTest_Engine/Query/Checks/HasSingleClass.cs

Lines changed: 0 additions & 61 deletions
This file was deleted.

CodeComplianceTest_Engine/Query/Checks/HasValidConstructor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static partial class Query
4444
[Path(@"([a-zA-Z0-9]+)_Tests\\.*\.cs$", false)] //NUnit style projects
4545
[Path(@"([a-zA-Z0-9]+)_Test\\.*\.cs$", false)] //Verification projects
4646
[ComplianceType("code")]
47-
[ErrorLevel(TestStatus.Error)]
47+
[ErrorLevel(TestStatus.Warning)]
4848
[Output("A span that represents where this error resides or null if there is no error")]
4949
public static Span HasValidConstructor(this ClassDeclarationSyntax node)
5050
{

CodeComplianceTest_Engine/Query/Checks/IsValidIImmutableObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace BH.Engine.Test.CodeCompliance.Checks
3838
public static partial class Query
3939
{
4040
[Message("IImutable objects must have at least one property with only a get accessor (no set accessor).", "IsValidIImmutableObject")]
41-
[ErrorLevel(TestStatus.Error)]
41+
[ErrorLevel(TestStatus.Warning)]
4242
[Path(@"([a-zA-Z0-9]+)_?oM\\.*\.cs$")]
4343
[Path(@"([a-zA-Z0-9]+)_Engine\\.*\.cs$", false)]
4444
[Path(@"([a-zA-Z0-9]+)_Adapter\\.*\.cs$", false)]

0 commit comments

Comments
 (0)