Repository navigation
chore: qlty setup - #5
Conversation
📝 WalkthroughWalkthrough
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant Jobs as CI Jobs
participant Q as Qlty Check
Dev->>GH: Push / PR open
note over GH: CI workflow starts
GH->>Jobs: Run Spell Check, Lint & Format, Typecheck, Build, Test, License Check (timeout-minutes=3)
GH->>Q: Run Qlty Check (checkout → install qlty → qlty check → qlty smells)
alt Any job exceeds 3 minutes
GH-->>Dev: Job times out (failure)
else All complete
GH-->>Dev: CI results reported
end
sequenceDiagram
autonumber
actor Dev as Developer
participant Husky as .husky/pre-commit
participant LS as lint-staged
participant Qlty as qlty
Dev->>Husky: git commit
Husky->>LS: Run lint-staged
alt lint-staged succeeds
Husky->>Qlty: Run `qlty check`
Qlty-->>Husky: Exit code
else lint-staged fails
Husky-->>Dev: Abort commit
end
Husky-->>Dev: Commit proceeds or aborts
Possibly related PRs
Suggested reviewers
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
.github/workflows/ci.yml(1 hunks).gitignore(1 hunks).qlty/qlty.toml(1 hunks)cspell.json(1 hunks)package.json(2 hunks)
🔇 Additional comments (8)
cspell.json (1)
21-22: LGTM.Dictionary entries prevent false positives from spell checker.
.gitignore (1)
2-6: LGTM.Proper exclusion of Qlty artifacts.
.qlty/qlty.toml (3)
6-25: Good plugin selection.Security scanning (trufflehog, osv-scanner) and standard linters covered.
33-41: Exclusion patterns align with .gitignore.Proper coverage of build artifacts and dependencies.
47-81: Verify duplicate smell configurations.Both
function_parameters(line 55) andlong_parameter_list(line 79) have threshold 5. Confirm this duplication is intentional for your use case.package.json (1)
16-17: LGTM.Scripts provide convenient access to Qlty commands.
.github/workflows/ci.yml (2)
63-64: Consider fetch-depth for analysis.Default shallow clone may limit Qlty's historical analysis capabilities. Verify if
fetch-depth: 0is needed.
58-75: Job structure is sound.Parallel execution with other checks is efficient.
- Add qlty configuration with prettier, eslint, markdownlint, yamllint, actionlint, trufflehog, and osv-scanner - Configure code smells detection (boolean logic, nested control flow, function parameters, etc.) - Add qlty check to lint-staged for pre-commit hooks on code files - Add qlty CI job with check and smells analysis - Add qlty to cspell dictionary
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
.github/workflows/ci.yml(1 hunks).gitignore(1 hunks).qlty/qlty.toml(1 hunks)cspell.json(1 hunks)package.json(1 hunks)
🔇 Additional comments (5)
cspell.json (1)
21-22: LGTM. Word additions are appropriate.Both "repo" and "qlty" are valid additions to the spell-check dictionary.
.gitignore (1)
1-6: LGTM. Ignore patterns are complete.Covers Qlty artifacts and normalizes node_modules entry.
package.json (1)
25-31: Verify qlty availability in pre-commit context.lint-staged runs in the pre-commit hook via husky, but there's no setup step to ensure
qltyis in PATH. Developers will need to install qlty locally for these commands to succeed.Consider documenting the qlty installation requirement in the README or adding an installation check to the prepare script.
Additionally, note that JS/TS files lack formatting checks (only qlty check), while HTML/MD/YAML run both formatting and qlty. Confirm this is intentional.
.qlty/qlty.toml (2)
27-41: LGTM. Exclusion patterns align with .gitignore.Standard patterns for node projects.
43-81: LGTM. Reasonable smell thresholds for initial rollout.Mode "comment" is appropriate for non-blocking feedback. Thresholds follow industry standards, though you may want to tune based on actual results.
Note:
duplicate_codethreshold of 6 lines can be noisy; consider increasing if you get false positives.
# Conflicts: # .github/workflows/ci.yml # .gitignore # cspell.json # package.json
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5 +/- ##
=======================================
Coverage 92.67% 92.67%
=======================================
Files 16 16
Lines 505 505
Branches 110 167 +57
=======================================
Hits 468 468
Misses 37 37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.qlty/qlty.toml (1)
73-75: Lower threshold to distinguish fromfunction_parameters.Matching
function_parametersthreshold (5) means both smells trigger simultaneously.long_parameter_listdetects when parameters should be grouped into objects—a different concern than raw count. Consider threshold 2-3 to catch this smell earlier.Apply this diff:
[smells.long_parameter_list] enabled = true -threshold = 5 # When parameters should be grouped/refactored into objects +threshold = 2 # When parameters should be grouped/refactored into objects
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/ci.yml(1 hunks).qlty/qlty.toml(1 hunks).yamllint(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-30T16:47:46.420Z
Learnt from: jamesbhobbs
PR: deepnote/deepnote#5
File: .qlty/qlty.toml:5-26
Timestamp: 2025-09-30T16:47:46.420Z
Learning: In the deepnote/deepnote repository, for .qlty/qlty.toml configuration, the team prefers to use latest plugin versions rather than pinning versions to ensure the most current scans are used.
Applied to files:
.qlty/qlty.toml
🔇 Additional comments (5)
.yamllint (1)
1-7: LGTM!Clean yamllint config. The 120-char limit aligns well with the broader quality tooling setup.
.qlty/qlty.toml (4)
5-20: LGTM!Plugin configuration is clean. No version pinning is intentional per team preference for latest scans.
Based on learnings.
21-25: LGTM!Default source configuration is correct.
26-35: LGTM!Exclusion patterns cover typical build artifacts and generated code appropriately.
37-72: LGTM!Smells configuration thresholds are reasonable defaults. Mode "comment" is appropriate for initial rollout.
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/ci.yml(1 hunks).qlty/qlty.toml(1 hunks)cspell.json(1 hunks)package.json(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-30T16:47:46.420Z
Learnt from: jamesbhobbs
PR: deepnote/deepnote#5
File: .qlty/qlty.toml:5-26
Timestamp: 2025-09-30T16:47:46.420Z
Learning: In the deepnote/deepnote repository, for .qlty/qlty.toml configuration, the team prefers to use latest plugin versions rather than pinning versions to ensure the most current scans are used.
Applied to files:
.qlty/qlty.toml
Summary by CodeRabbit