feat: Add new CodeQL extension for C# and SonarLint configuration

- Introduced a new CodeQL extension for C# in `.github/codeql/extensions/quantalib-csharp/codeql-pack.yml`.
- Added SonarLint configuration in `.sonarlint/CSharp/SonarLint.xml` and `.sonarlint/csharp.ruleset` to suppress specific rules for high-performance indicators.
- Removed outdated `.vscode/launch.json` configurations.
- Updated `.vscode/tasks.json` to streamline build and test tasks, including renaming and consolidating tasks.
- Modified `Directory.Build.props` to enhance SARIF output directory handling and integrate SonarLint rules.
- Refactored various indicator classes to improve code clarity and maintainability, including updates to method parameters for consistency.
- Added XML documentation comments to several classes and methods for better code understanding.
- Improved numerical stability in calculations by replacing direct comparisons with `double.Epsilon` checks in multiple classes.
This commit is contained in:
Miha Kralj
2026-01-21 23:05:38 -06:00
parent 32f3366952
commit da4e56bf40
32 changed files with 187 additions and 187 deletions
+15 -57
View File
@@ -2,23 +2,8 @@
"version": "2.0.0",
"tasks": [
{
"label": "Build & Audit (Roslyn + JetBrains)",
"dependsOrder": "sequence",
"dependsOn": ["Create .sarif Dir", "Build: QuanTAlib", "JetBrains: Inspect"],
"group": { "kind": "build", "isDefault": true }
},
{
"label": "Create .sarif Dir",
"type": "shell",
"command": "mkdir -p .sarif",
"windows": {
"command": "powershell",
"args": ["-Command", "if (!(Test-Path .sarif)) { New-Item -Path .sarif -ItemType Directory }"]
},
"presentation": { "reveal": "silent" }
},
{
"label": "Build: QuanTAlib",
"label": "Build",
"detail": "dotnet build QuanTAlib.sln",
"type": "process",
"command": "dotnet",
"args": [
@@ -27,63 +12,36 @@
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "JetBrains: Inspect",
"type": "shell",
"command": "jb inspectcode QuanTAlib.sln --output=.sarif/jetbrains.sarif --format=Sarif",
"presentation": { "reveal": "always" },
"problemMatcher": [],
"postLines": ["Analysis complete. Open .sarif/jetbrains.sarif to view results."]
},
{
"label": "JetBrains: Cleanup",
"type": "shell",
"command": "jb cleanupcode QuanTAlib.sln",
"problemMatcher": []
},
{
"label": "test-net10",
"command": "dotnet",
"type": "process",
"args": [
"test",
"${workspaceFolder}/lib/QuanTAlib.Tests.csproj",
"--framework",
"net10.0"
],
"problemMatcher": "$msCompile",
"group": { "kind": "test", "isDefault": true },
"presentation": { "reveal": "always", "panel": "new" }
"group": { "kind": "build", "isDefault": true }
},
{
"label": "build-lib-net10-debug",
"label": "Build Library",
"detail": "dotnet build lib/quantalib.csproj (Debug, net10.0)",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/lib/quantalib.csproj",
"--configuration",
"Debug",
"--framework",
"net10.0"
"--configuration", "Debug",
"--framework", "net10.0"
],
"problemMatcher": "$msCompile",
"group": { "kind": "build", "isDefault": false }
"group": "build"
},
{
"label": "build-sln-debug",
"label": "Test",
"detail": "dotnet test lib/QuanTAlib.Tests.csproj (net10.0)",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/QuanTAlib.sln",
"--configuration",
"Debug"
"test",
"${workspaceFolder}/lib/QuanTAlib.Tests.csproj",
"--framework", "net10.0"
],
"problemMatcher": "$msCompile",
"group": { "kind": "build", "isDefault": false }
"group": { "kind": "test", "isDefault": true },
"presentation": { "reveal": "always", "panel": "new" }
}
]
}