Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b54aa9b
Fix #49: POCO to DTO can include derived properties values
antoineatstariongroup Jan 21, 2026
25fbe5d
added explicit on dictionary ecore codegen
antoineatstariongroup Jan 21, 2026
cd8216b
trying cicd improvement
antoineatstariongroup Jan 21, 2026
bd9de71
skip sonarqube for test
antoineatstariongroup Jan 21, 2026
8890ec7
Remove most of warnings from DAL
antoineatstariongroup Jan 21, 2026
d5e29dd
fix build issue
antoineatstariongroup Jan 21, 2026
6f975a3
Fix static and unnecessary casting warning
antoineatstariongroup Jan 21, 2026
e13580a
update coverage path
antoineatstariongroup Jan 21, 2026
27a87fc
fix log format warning
antoineatstariongroup Jan 21, 2026
e7b4c08
Reverts yml changes
antoineatstariongroup Jan 21, 2026
734b976
Reverts changes on pipeline
antoineatstariongroup Jan 21, 2026
36495d6
remove Cognitive Complexity Warnings
antoineatstariongroup Jan 21, 2026
e8f522b
Reduce log level while test
antoineatstariongroup Jan 21, 2026
5968b58
verbosity to quiet
antoineatstariongroup Jan 21, 2026
6546bd2
Concurrency actions
antoineatstariongroup Jan 21, 2026
0854c90
trying to limit ram usage
antoineatstariongroup Jan 21, 2026
98232d7
ignoring integraiton test
antoineatstariongroup Jan 21, 2026
2ef9909
excluding integration
antoineatstariongroup Jan 21, 2026
d6a3a1f
downgrade version to ubuntu-22.04
antoineatstariongroup Jan 21, 2026
da766d6
timeout on test
antoineatstariongroup Jan 21, 2026
e25ad65
disable sonarscanner to verify tests
antoineatstariongroup Jan 21, 2026
3de7405
moved to dotnet scanner
antoineatstariongroup Jan 21, 2026
3d490a5
Removd integration filtering
antoineatstariongroup Jan 22, 2026
c0b5f39
Fix security hotspots
antoineatstariongroup Jan 22, 2026
38ddcb7
Ignore CS1570 for all codegen file
antoineatstariongroup Jan 22, 2026
db04319
Disable CS1570/CS1584/CS1658 for all codegen
antoineatstariongroup Jan 22, 2026
9169193
Fix some warnings
antoineatstariongroup Jan 22, 2026
1719a10
Fix failing test and set verbosity to normal for tests
antoineatstariongroup Jan 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*.cs]
# Disable S3776: Cognitive Complexity Warning
dotnet_diagnostic.S3776.severity = none

[**/AutoGen*/*.cs]
# Disable CS1570/CS1584/CS1658 for all codegen
dotnet_diagnostic.CS1570.severity = none
dotnet_diagnostic.CS1584.severity = none
dotnet_diagnostic.CS1658.severity = none
21 changes: 14 additions & 7 deletions .github/workflows/CodeQuality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
push:
pull_request:
types: [opened, synchronize, reopened]


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
Expand All @@ -26,22 +30,25 @@ jobs:

- name: Restore dependencies
run: dotnet restore SysML2.NET.sln

- name: Sonarqube Begin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_SCANNER_OPTS: "-Xmx4096m"
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:"STARIONGROUP_SysML2.NET" /o:"stariongroup" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="./CoverageResults/coverage.opencover.xml"
dotnet tool install --global dotnet-coverage
dotnet sonarscanner begin /k:"STARIONGROUP_SysML2.NET" /o:"stariongroup" /d:sonar.token="$SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml

- name: Build
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
run: dotnet build --no-restore --no-incremental /p:ContinuousIntegrationBuild=true

- name: Run Tests and Compute Coverage
run: dotnet test SysML2.NET.sln --filter Category!="Expected" --no-restore --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutput="../CoverageResults/" /p:MergeWith="../CoverageResults/coverage.json" /p:CoverletOutputFormat=\"opencover,json\"
run: dotnet-coverage collect "dotnet test SysML2.NET.sln --no-restore --no-build --verbosity normal" -f xml -o "coverage.xml"

- name: Sonarqube end
run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"
1 change: 1 addition & 0 deletions SySML2.NET.REST.Tests/RestClientTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ namespace SySML2.NET.REST.Tests
/// <summary>
/// Suite of tests for the <see cref="RestClient"/> class
/// </summary>
[TestFixture]
public class RestClientTestFixture
{
private string baseUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the aliasIds Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the aliasIds Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("annotatedElement"u8, out var annotatedElementProperty))
Expand All @@ -149,7 +149,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the annotatedElement Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the annotatedElement Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("annotation"u8, out var annotationProperty))
Expand All @@ -169,7 +169,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the annotation Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the annotation Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("declaredName"u8, out var declaredNameProperty))
Expand All @@ -178,7 +178,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the declaredName Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the declaredName Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("declaredShortName"u8, out var declaredShortNameProperty))
Expand All @@ -187,7 +187,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the declaredShortName Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the declaredShortName Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("documentation"u8, out var documentationProperty))
Expand All @@ -207,7 +207,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the documentation Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the documentation Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("elementId"u8, out var elementIdProperty))
Expand All @@ -221,7 +221,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the elementId Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the elementId Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("isImpliedIncluded"u8, out var isImpliedIncludedProperty))
Expand All @@ -233,7 +233,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the isImpliedIncluded Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the isImpliedIncluded Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("isLibraryElement"u8, out var isLibraryElementProperty))
Expand All @@ -245,7 +245,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the isLibraryElement Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the isLibraryElement Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("name"u8, out var nameProperty))
Expand All @@ -254,7 +254,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the name Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the name Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("ownedAnnotatingRelationship"u8, out var ownedAnnotatingRelationshipProperty))
Expand All @@ -274,7 +274,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the ownedAnnotatingRelationship Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the ownedAnnotatingRelationship Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("ownedAnnotation"u8, out var ownedAnnotationProperty))
Expand All @@ -294,7 +294,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the ownedAnnotation Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the ownedAnnotation Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("ownedElement"u8, out var ownedElementProperty))
Expand All @@ -314,7 +314,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the ownedElement Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the ownedElement Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("ownedRelationship"u8, out var ownedRelationshipProperty))
Expand All @@ -334,7 +334,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the ownedRelationship Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the ownedRelationship Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("owner"u8, out var ownerProperty))
Expand All @@ -358,7 +358,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the owner Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the owner Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("owningAnnotatingRelationship"u8, out var owningAnnotatingRelationshipProperty))
Expand All @@ -382,7 +382,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the owningAnnotatingRelationship Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the owningAnnotatingRelationship Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("owningMembership"u8, out var owningMembershipProperty))
Expand All @@ -406,7 +406,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the owningMembership Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the owningMembership Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("owningNamespace"u8, out var owningNamespaceProperty))
Expand All @@ -430,7 +430,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the owningNamespace Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the owningNamespace Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("owningRelationship"u8, out var owningRelationshipProperty))
Expand All @@ -454,7 +454,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the owningRelationship Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the owningRelationship Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("qualifiedName"u8, out var qualifiedNameProperty))
Expand All @@ -463,7 +463,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the qualifiedName Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the qualifiedName Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("shortName"u8, out var shortNameProperty))
Expand All @@ -472,7 +472,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the shortName Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the shortName Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("textualRepresentation"u8, out var textualRepresentationProperty))
Expand All @@ -492,7 +492,7 @@ private static void DeserializeDtoIncludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the textualRepresentation Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the textualRepresentation Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

}
Expand Down Expand Up @@ -526,7 +526,7 @@ private static void DeserializeDtoExcludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the aliasIds Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the aliasIds Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("declaredName"u8, out var declaredNameProperty))
Expand All @@ -535,7 +535,7 @@ private static void DeserializeDtoExcludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the declaredName Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the declaredName Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("declaredShortName"u8, out var declaredShortNameProperty))
Expand All @@ -544,7 +544,7 @@ private static void DeserializeDtoExcludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the declaredShortName Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the declaredShortName Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("elementId"u8, out var elementIdProperty))
Expand All @@ -558,7 +558,7 @@ private static void DeserializeDtoExcludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the elementId Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the elementId Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("isImpliedIncluded"u8, out var isImpliedIncludedProperty))
Expand All @@ -570,7 +570,7 @@ private static void DeserializeDtoExcludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the isImpliedIncluded Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the isImpliedIncluded Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("ownedRelationship"u8, out var ownedRelationshipProperty))
Expand All @@ -590,7 +590,7 @@ private static void DeserializeDtoExcludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the ownedRelationship Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the ownedRelationship Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

if (jsonElement.TryGetProperty("owningRelationship"u8, out var owningRelationshipProperty))
Expand All @@ -614,7 +614,7 @@ private static void DeserializeDtoExcludingDerivedProperties(SysML2.NET.Core.DTO
}
else
{
logger.LogDebug("the owningRelationship Json property was not found in the AnnotatingElement: { Id }", dtoInstance.Id);
logger.LogDebug("the owningRelationship Json property was not found in the AnnotatingElement: {Id}", dtoInstance.Id);
}

}
Expand Down
Loading
Loading