Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b7915fc
chore: remove leaderboard feature
joachimhodana May 23, 2026
89d3a30
feat(manifest): add manifest graph reader package
joachimhodana May 23, 2026
338c15d
feat(types): extend config and inspect option types
joachimhodana May 23, 2026
fa15f82
feat(core): expand config presets and rule validation
joachimhodana May 23, 2026
98c88ae
feat(rules): expand catalog with manifest and SQL style rules
joachimhodana May 23, 2026
bd42673
feat(cli): add phase4 coverage metrics and manifest wiring
joachimhodana May 23, 2026
b4eb307
feat(website): add docs site with rules reference and tool parity
joachimhodana May 23, 2026
4b25e6a
chore: update workspace scripts and release config
joachimhodana May 23, 2026
cf80141
docs(website): clarify presets guide
joachimhodana May 23, 2026
91e286a
chore(rules): remove RULES.md in favor of website docs
joachimhodana May 23, 2026
e5849e2
feat(core): include SQL style rules in strict and enterprise presets
joachimhodana May 23, 2026
c53a233
fix(website): repair rules page copy-link control
joachimhodana May 23, 2026
ce140f8
fix(website): use literal revalidate for Next.js segment config
joachimhodana May 23, 2026
8c6137e
fix(rules): repair CI test failures and typecheck errors
joachimhodana May 24, 2026
0e437c2
chore: apply formatter to fix format:check CI
joachimhodana May 24, 2026
6f392c8
refactor(core): remove baseline diagnostics support
joachimhodana May 25, 2026
fe84509
refactor(cli): rename phase4 coverage metrics module
joachimhodana May 25, 2026
eb35539
refactor(rules): rename phase5 tag to sql-style
joachimhodana May 25, 2026
4143872
feat(rules): add sqlfluff, dbt-checkpoint, and dbt-score parity rules
joachimhodana May 25, 2026
542c77f
test(rules): split parity and sql style coverage into focused suites
joachimhodana May 25, 2026
cce328a
docs(website): expand rules catalog, presets, and tool parity pages
joachimhodana May 25, 2026
8a715a5
chore: apply formatter to fix format:check CI
joachimhodana May 31, 2026
8f234ec
fix(website): format generated docs after rules regeneration
joachimhodana May 31, 2026
43cd091
fix(rules): tag parity rules for presets and clarify docs
joachimhodana May 31, 2026
c396526
fix(core): pass SQL dialect to sqlfluff subprocess lint
joachimhodana May 31, 2026
d82831b
test(rules): assert sqlfluff parity map references valid rules
joachimhodana May 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "joachimhodana/dbt-doctor" }],
"commit": false,
"fixed": [["dbt-doctor", "dbt-doctor-rules", "@dbt-doctor/types", "@dbt-doctor/project-info"]],
"fixed": [
[
"dbt-doctor",
"dbt-doctor-rules",
"@dbt-doctor/types",
"@dbt-doctor/project-info",
"@dbt-doctor/manifest"
]
],
"linked": [],
"access": "public",
"baseBranch": "main",
Expand Down
13 changes: 13 additions & 0 deletions .changeset/fast-donuts-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"dbt-doctor": patch
"dbt-doctor-rules": patch
"@dbt-doctor/types": patch
"@dbt-doctor/project-info": patch
"@dbt-doctor/manifest": minor
---

Add Phase 1 manifest graph support with explicit manifest path configuration.

- Introduce `@dbt-doctor/manifest` package for reading and normalizing graph artifacts.
- Add manifest-backed rules (`staging-depends-on-staging`, `unused-sources`) and skip manifest-only rules when artifact is missing.
- Add `manifestPath` config support and CLI `--manifest <path>` override for dbt Core/Fusion compatibility.
47 changes: 0 additions & 47 deletions .github/workflows/update-leaderboard.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ review-*.md
/scripts/print-batch-input.mjs
/scripts/rule-prompts/
/rules.json
packages/website/docs/rules/.rule-ids.json

content/

.pnpm-store/
57 changes: 0 additions & 57 deletions benchmarks/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions benchmarks/results/leaderboard.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"changeset": "changeset",
"version": "changeset version",
"release": "pnpm build && changeset publish",
"leaderboard:update": "node --experimental-strip-types --no-warnings scripts/update-leaderboard.ts",
"leaderboard:sync": "node --experimental-strip-types --no-warnings scripts/sync-leaderboard-public.ts"
"generate:rules-docs": "node scripts/generate-rules-docs.mjs && node scripts/link-tool-parity-rules.mjs && vp fmt packages/website/docs/rules",
"update:tool-parity-coverage": "node scripts/update-tool-parity-coverage.mjs"
},
"devDependencies": {
"@changesets/changelog-github": "^0.7.0",
Expand Down
55 changes: 49 additions & 6 deletions packages/core/src/apply-config-preset.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,73 @@
import type { DbtDoctorConfig, DbtDoctorPreset } from "@dbt-doctor/types";

const PRESET_OVERRIDES: Record<Exclude<DbtDoctorPreset, "default">, Partial<DbtDoctorConfig>> = {
/**
* Tag bundles skipped per preset via `ignore.tags`.
* Rules with any ignored tag are not registered for the scan.
*/
const IGNORE_TAGS = {
style: ["style", "sql-style"],
strict: ["strict"],
enterprise: ["enterprise"],
} as const;

const PRESET_OVERRIDES: Record<DbtDoctorPreset, Partial<DbtDoctorConfig>> = {
/**
* Recommended starter: core architecture, naming, SQL quality, and manifest rules
* without documentation-contract (`strict`), governance (`enterprise`), or
* formatting (`style` / `sql-style`) tiers.
*/
default: {
ignore: {
tags: [...IGNORE_TAGS.enterprise, ...IGNORE_TAGS.strict, ...IGNORE_TAGS.style],
},
},
/**
* CI documentation, native SQL style, and contract discipline on top of `default`,
* without enterprise governance rules.
*/
strict: {
failOn: "error",
ignore: { tags: [] },
ignore: { tags: [...IGNORE_TAGS.enterprise] },
categories: {
Documentation: "error",
Configuration: "error",
Architecture: "error",
"SQL Style": "warn",
Testing: "warn",
},
},
/**
* Full rule catalog (all registered rules) with stricter governance and graph checks.
*/
enterprise: {
scoreMode: "files",
failOn: "warning",
ignore: { tags: ["style"] },
categories: {
Governance: "error",
Architecture: "error",
Sources: "error",
Documentation: "warn",
Performance: "warn",
Testing: "warn",
},
},
};

export const applyConfigPreset = (config: DbtDoctorConfig | null): DbtDoctorConfig | null => {
if (!config?.preset || config.preset === "default") return config;
const presetDefaults = PRESET_OVERRIDES[config.preset];
const mergePresetConfig = (preset: DbtDoctorPreset, config: DbtDoctorConfig): DbtDoctorConfig => {
const presetDefaults = PRESET_OVERRIDES[preset];
return {
...presetDefaults,
...config,
preset,
ignore: { ...presetDefaults.ignore, ...config.ignore },
categories: { ...presetDefaults.categories, ...config.categories },
surfaces: { ...presetDefaults.surfaces, ...config.surfaces },
rules: { ...presetDefaults.rules, ...config.rules },
};
};

export const applyConfigPreset = (config: DbtDoctorConfig | null): DbtDoctorConfig | null => {
if (!config) return null;
const preset: DbtDoctorPreset = config.preset ?? "default";
return mergePresetConfig(preset, config);
};
49 changes: 0 additions & 49 deletions packages/core/src/baseline-diagnostics.ts

This file was deleted.

2 changes: 2 additions & 0 deletions packages/core/src/build-json-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export const buildJsonReport = (input: BuildJsonReportInput): JsonReport => {
project: result.project,
diagnostics: result.diagnostics,
score: result.score,
...(result.coverage ? { coverage: result.coverage } : {}),
...(result.perModelScores ? { perModelScores: result.perModelScores } : {}),
skippedChecks: result.skippedChecks,
...(result.skippedCheckReasons ? { skippedCheckReasons: result.skippedCheckReasons } : {}),
elapsedMilliseconds: result.elapsedMilliseconds,
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * from "./apply-config-preset.js";
export * from "./apply-ignore-overrides.js";
export * from "./baseline-diagnostics.js";
export * from "./build-sarif-report.js";
export * from "./apply-severity-controls.js";
export * from "./build-rule-severity-controls.js";
Expand Down
13 changes: 12 additions & 1 deletion packages/core/src/merge-config-with-cli-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ export interface ConfigCliOverrides {
preset?: string;
scoreMode?: string;
failOn?: string;
manifest?: string;
}

export const mergeConfigWithCliFlags = (
config: DbtDoctorConfig | null,
overrides: ConfigCliOverrides,
): DbtDoctorConfig | null => {
if (!overrides.preset && !overrides.scoreMode && !overrides.failOn && !config) {
if (
!overrides.preset &&
!overrides.scoreMode &&
!overrides.failOn &&
!overrides.manifest &&
!config
) {
return config;
}

Expand Down Expand Up @@ -51,5 +58,9 @@ export const mergeConfigWithCliFlags = (
}
}

if (overrides.manifest) {
merged.manifestPath = overrides.manifest;
}

return merged;
};
Loading
Loading