Skip to content

Fix Super-linter copy-paste failures - #2

Merged
dmzoneill merged 1 commit into
mainfrom
cursor/fix-super-linter-4d02
Oct 19, 2026
Merged

dmzoneill merged 1 commit into
mainfrom
cursor/fix-super-linter-4d02

Conversation

@dmzoneill

Copy link
Copy Markdown
Owner

Summary

The cicd / Lint job on main fails because Super-linter's JSCPD check reports 7.6% duplication, above the 5% threshold. PHP, PHP_CodeSniffer, PHPStan, and Psalm were not part of that failure because no PHP files had changed.

This branch:

  • Moves duplicated buy/sell order handling, order totals, candle diffs, ignored-coin parsing, and the two transaction strategies into shared methods.
  • Ignores the vendored jaggedsoft Binance client (bi-api.php) and the screenshot (example.png) from JSCPD via a repo-root .ignore file. .github/linters/.jscpd.json is unchanged.
  • Makes the touched PHP pass PHP syntax, PSR-12, PHPStan level 5, and Psalm, which Super-linter runs on the diff.

Local Super-linter (ghcr.io/super-linter/super-linter:v8.7.0, same validate flags as the reusable workflow) reports JSCPD and the PHP linters successful. Duplication is about 3.4%, under the 5% threshold.

Test plan

  • jscpd 5.0.10 with the central config (threshold 5)
  • Super-linter v8.7.0 in Docker with VALIDATE_ALL_CODEBASE=false and the workflow's disabled linters
Open in Web Open in Cursor 

Extract shared order, candle, and strategy helpers so copy-paste detection stays under the 5% threshold, ignore the vendored Binance client and screenshot, and make the touched PHP pass the linters.

Co-authored-by: Dave <dmz.oneill@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Super-linter summary

Language Validation result
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSCPD Pass ✅
PHP_BUILTIN Pass ✅
PHP_PHPCS Pass ✅
PHP_PHPSTAN Pass ✅
PHP_PSALM Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
XML Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@dmzoneill
dmzoneill marked this pull request as ready for review October 19, 2026 19:29
@dmzoneill
dmzoneill merged commit e555ef4 into main Oct 19, 2026
37 checks passed
@dmzoneill
dmzoneill deleted the cursor/fix-super-linter-4d02 branch October 28, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants