Skip to content

fix: resolve all 11 SonarCloud HIGH impact issues#449

Merged
RobertLD merged 3 commits intomainfrom
fix/sonar-high-remaining
Mar 19, 2026
Merged

fix: resolve all 11 SonarCloud HIGH impact issues#449
RobertLD merged 3 commits intomainfrom
fix/sonar-high-remaining

Conversation

@RobertLD
Copy link
Copy Markdown
Owner

Summary

Resolves all 11 remaining SonarCloud HIGH impact issues on main.

S3776 — Cognitive complexity (8 functions → ≤15)

File Function Before After Helpers extracted
src/core/spider.ts spiderUrl 27 ~12 checkDeadline, shouldSkipNonSeedUrl, fetchSpiderPage
src/core/packs.ts createPackFromSource 26 ~10 processFileSources, processUrlSources, validateDocuments
src/cli/index.ts pack install action 22 ~8 tryGitRegistryInstall, executePackInstall
src/connectors/notion.ts syncNotion 19 ~10 syncNotionItem
src/connectors/notion.ts convertNotionBlocks 16 ~3 convertSingleBlock
src/connectors/obsidian.ts syncObsidianVault 17 ~8 applyVaultFileOutcome, syncVaultFiles
src/core/graph.ts computeSimilarityEdges 16 ~8 findEdgesForDocument

Other fixes

  • S3735: void operator in scheduler.ts — added NOSONAR comment (ESLint no-floating-promises requires void)
  • S7746: mock-provider.tsreturn value instead of return Promise.resolve(value)
  • S7767: mock-provider.tsMath.trunc instead of | 0

Test plan

  • All 1351 tests pass
  • Format check passes
  • No new lint errors
  • No new typecheck errors

🤖 Generated with Claude Code

S3776 — Cognitive complexity (8 functions reduced to ≤15):
- src/core/spider.ts: extract checkDeadline, shouldSkipNonSeedUrl, fetchSpiderPage
- src/core/packs.ts: extract processFileSources, processUrlSources, validateDocuments
- src/cli/index.ts: extract tryGitRegistryInstall, executePackInstall
- src/connectors/notion.ts: extract syncNotionItem, convertSingleBlock
- src/connectors/obsidian.ts: extract applyVaultFileOutcome, syncVaultFiles
- src/core/graph.ts: extract findEdgesForDocument

S3735 — void operator in scheduler.ts: add NOSONAR (ESLint requires void)
S7746 — mock-provider.ts: return value directly instead of Promise.resolve
S7767 — mock-provider.ts: Math.trunc instead of | 0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
libscope Ignored Ignored Preview Mar 19, 2026 0:03am

RobertLD and others added 2 commits March 19, 2026 12:01
Drop async keyword and keep Promise.resolve to satisfy both ESLint
(require-await) and SonarCloud (S7746 only flags async+Promise.resolve).

Also add pre-push verification checklist to CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@RobertLD RobertLD merged commit ec4e539 into main Mar 19, 2026
10 checks passed
@RobertLD RobertLD deleted the fix/sonar-high-remaining branch March 19, 2026 12:05
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.

1 participant