fix: resolve all 11 SonarCloud HIGH impact issues#449
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Resolves all 11 remaining SonarCloud HIGH impact issues on main.
S3776 — Cognitive complexity (8 functions → ≤15)
src/core/spider.tsspiderUrlcheckDeadline,shouldSkipNonSeedUrl,fetchSpiderPagesrc/core/packs.tscreatePackFromSourceprocessFileSources,processUrlSources,validateDocumentssrc/cli/index.tstryGitRegistryInstall,executePackInstallsrc/connectors/notion.tssyncNotionsyncNotionItemsrc/connectors/notion.tsconvertNotionBlocksconvertSingleBlocksrc/connectors/obsidian.tssyncObsidianVaultapplyVaultFileOutcome,syncVaultFilessrc/core/graph.tscomputeSimilarityEdgesfindEdgesForDocumentOther fixes
voidoperator inscheduler.ts— added NOSONAR comment (ESLintno-floating-promisesrequiresvoid)mock-provider.ts—return valueinstead ofreturn Promise.resolve(value)mock-provider.ts—Math.truncinstead of| 0Test plan
🤖 Generated with Claude Code