Merge dev into main

This commit is contained in:
Miha Kralj
2026-03-04 15:56:50 -08:00
4 changed files with 16 additions and 7 deletions
+4
View File
@@ -10,6 +10,10 @@
"id": "S1144",
"reason": "Unused private types or members should be removed - false positives on reflection/serialization patterns"
},
{
"id": "S1192",
"reason": "String literals should not be duplicated - guard clause exception messages are inline by .NET convention, not localizable strings"
},
{
"id": "S1244",
"reason": "Floating point numbers should not be tested for equality - intentional exact comparisons in financial calculations"
+7 -2
View File
@@ -43,7 +43,7 @@ jobs:
# ==============================================================================
ReSharper_Analysis:
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20
permissions:
contents: read
actions: write
@@ -68,6 +68,9 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build QuanTAlib.slnx --no-restore --configuration Debug --nologo -m:1
- name: Prepare SARIF directory
run: mkdir -p .sarif
@@ -80,7 +83,9 @@ jobs:
- name: Run ReSharper InspectCode (SARIF)
run: |
set +e
jb inspectcode QuanTAlib.slnx \
jb inspectcode lib/quantalib.csproj \
--no-build \
--include="**/*.cs" \
--format=sarif \
--output=.sarif/resharper.sarif
rc=$?
+1 -1
View File
@@ -73,7 +73,7 @@
<!-- S107: "Methods should not have too many parameters" - high-performance SIMD methods require multiple parameters for zero-allocation patterns -->
<!-- S1244: "Do not check floating point equality with exact values" - exact-zero div guards and exact-equality tie detection are fundamental patterns in quantitative indicators -->
<!-- MA0007: "Add comma after the last value" - trailing commas not enforced in this codebase -->
<NoWarn>$(NoWarn);S107;S1144;S1244;S1944;S2053;S2245;S2259;S2583;S2589;S3329;S3604;S3655;S3776;S3949;S3966;S4158;S4347;S5773;S6781;MA0007;MA0048;MA0051;MA0076;RCS1123;RCS1159;IDE0007</NoWarn>
<NoWarn>$(NoWarn);S107;S1144;S1192;S1244;S1944;S2053;S2245;S2259;S2583;S2589;S3329;S3604;S3655;S3776;S3949;S3966;S4158;S4347;S5773;S6781;MA0007;MA0048;MA0051;MA0076;RCS1123;RCS1159;IDE0007</NoWarn>
</PropertyGroup>
<!-- Code Coverage Configuration (for NDepend integration) -->
+4 -4
View File
@@ -1387,13 +1387,13 @@ public static unsafe partial class Exports
catch { return StatusCodes.QTL_ERR_INTERNAL; }
}
// Eacp: Pattern A (int period, int min, int max, bool useSimd → int)
// Eacp: (int minPeriod, int maxPeriod, int avgLength, bool enhance → int)
[UnmanagedCallersOnly(EntryPoint = "qtl_eacp")]
public static int QtlEacp(double* src, int n, double* dst, int period, int minPeriod, int maxPeriod, int useMedian)
public static int QtlEacp(double* src, int n, double* dst, int minPeriod, int maxPeriod, int avgLength, int enhance)
{
int v = Chk1(src, dst, n); if (v != 0) return v;
v = ChkPeriod(period); if (v != 0) return v;
try { Eacp.Batch(Src(src, n), Dst(dst, n), period, minPeriod, maxPeriod, useMedian != 0); return StatusCodes.QTL_OK; }
v = ChkPeriod(minPeriod); if (v != 0) return v;
try { Eacp.Batch(Src(src, n), Dst(dst, n), minPeriod, maxPeriod, avgLength, enhance != 0); return StatusCodes.QTL_OK; }
catch { return StatusCodes.QTL_ERR_INTERNAL; }
}