From 92ccb7e53a5c370a2588409e7135f15c0f2a503f Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Wed, 4 Mar 2026 09:52:09 -0800 Subject: [PATCH 1/6] fix: resolve ReSharper InspectCode CI timeout - Pre-build solution before inspectcode to avoid redundant 4-min internal build - Add --no-build flag to jb inspectcode - Add --exclude patterns for bin/obj/TestResults and binary artifacts - Bump timeout-minutes from 15 to 20 as safety margin --- .github/workflows/Publish.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml index d812be06..a04b6a06 100644 --- a/.github/workflows/Publish.yml +++ b/.github/workflows/Publish.yml @@ -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 @@ -81,6 +84,8 @@ jobs: run: | set +e jb inspectcode QuanTAlib.slnx \ + --no-build \ + --exclude="**/bin/**;**/obj/**;**/TestResults/**;**/*.dll;**/*.pdb;**/*.cache" \ --format=sarif \ --output=.sarif/resharper.sarif rc=$? From 0868f2082062a5a8e03396b21806076b3ad24203 Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Wed, 4 Mar 2026 10:01:37 -0800 Subject: [PATCH 2/6] refactor: use --include=**.cs instead of --exclude for inspectcode Per JetBrains docs, --exclude only filters report output, not scanning. Switch to --include="**/*.cs" for cleaner SARIF with only C# results. --- .github/workflows/Publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml index a04b6a06..2e8b084f 100644 --- a/.github/workflows/Publish.yml +++ b/.github/workflows/Publish.yml @@ -85,7 +85,7 @@ jobs: set +e jb inspectcode QuanTAlib.slnx \ --no-build \ - --exclude="**/bin/**;**/obj/**;**/TestResults/**;**/*.dll;**/*.pdb;**/*.cache" \ + --include="**/*.cs" \ --format=sarif \ --output=.sarif/resharper.sarif rc=$? From ef330e527c8b7fb0c5948d020219c44b417d2d5b Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Wed, 4 Mar 2026 10:03:50 -0800 Subject: [PATCH 3/6] fix: target quantalib.csproj instead of .slnx for inspectcode Analysis of full .slnx (800+ files across 5 projects) still times out even with --no-build. Target lib/quantalib.csproj directly to scope analysis to the main library (~400 files). Consistent with proven local inspectcode approach. --- .github/workflows/Publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml index 2e8b084f..1e4afae9 100644 --- a/.github/workflows/Publish.yml +++ b/.github/workflows/Publish.yml @@ -83,7 +83,7 @@ jobs: - name: Run ReSharper InspectCode (SARIF) run: | set +e - jb inspectcode QuanTAlib.slnx \ + jb inspectcode lib/quantalib.csproj \ --no-build \ --include="**/*.cs" \ --format=sarif \ From 37eea8761b761c94b74e0dc34ed4bbc8d701c91a Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Wed, 4 Mar 2026 10:29:51 -0800 Subject: [PATCH 4/6] suppress S1192: guard clause exception messages are inline by convention --- .github/sonar-suppressions.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/sonar-suppressions.json b/.github/sonar-suppressions.json index acf418c3..403946d1 100644 --- a/.github/sonar-suppressions.json +++ b/.github/sonar-suppressions.json @@ -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" From 0d85d820cd0bcd09177f60072f51ba41e5e06d09 Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Wed, 4 Mar 2026 10:31:31 -0800 Subject: [PATCH 5/6] suppress S1192 in Directory.Build.props NoWarn for build-time silence --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 27a93cae..26897226 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -73,7 +73,7 @@ - $(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);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 From 935a5ab26cd204125919398045da3db7d308dbf1 Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Wed, 4 Mar 2026 11:59:42 -0800 Subject: [PATCH 6/6] fix(python): align QtlEacp export params with Eacp.Batch signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The NativeAOT export had stale parameter names (period, minPeriod, maxPeriod, useMedian) from an older API. Renamed to match the actual Eacp.Batch(minPeriod, maxPeriod, avgLength, enhance) signature. ABI preserved — same 7 params, same types, no Python-side changes needed. --- python/src/Exports.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/src/Exports.cs b/python/src/Exports.cs index ec488172..82c65de7 100644 --- a/python/src/Exports.cs +++ b/python/src/Exports.cs @@ -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; } }