repowisepgplex/pgschema

Code health of pgplex/pgschema

Repowise scores pgplex/pgschema at 6.8 out of 10 for code health, which reads as fair, alongside maintainability 7.9 and static performance 9.7 on the same scale. There are 958 open findings across the three pillars, and the lowest-scoring file is inspector.go at 1.9. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

73 critical, 219 high, 345 medium, 220 low.

Hotspots

22 files are flagged as hotspots. The top 5:

  • internal/diff/diff.go: 18 commits in the last 90 days from 11 contributors with 21 recent bug fixes
  • internal/diff/table.go: 17 commits in the last 90 days from 11 contributors with 22 recent bug fixes
  • ir/queries/queries.sql.go: 14 commits in the last 90 days from 7 contributors with 22 recent bug fixes
  • ir/normalize.go: 7 commits in the last 90 days from 6 contributors with 13 recent bug fixes
  • ir/inspector.go: 13 commits in the last 90 days from 8 contributors with 18 recent bug fixes

Lowest-scoring files

  • ir/inspector.go: 1.9 out of 10 with 18 bug fixes in the last 180 days
  • internal/plan/plan.go: 1.9 out of 10 with 4 bug fixes in the last 180 days
  • internal/diff/view.go: 1.9 out of 10 with 6 bug fixes in the last 180 days
  • internal/diff/function.go: 1.9 out of 10 with 1 bug fix in the last 180 days
  • internal/diff/table.go: 1.9 out of 10 with 22 bug fixes in the last 180 days

Checked against bug fixes

Of the 20 files Repowise scores lowest, 17 had a bug fix in the last 180 days. Across all 1,504 scored files, 4.5% had a bug fix in that window.

Dead code and refactoring

Repowise found 8 unused exports. 70 refactoring targets across 70 files would raise the score.

More on pgschema: summary and FAQ, codebase overview, architecture.

Related guide: Best dead code detection tools by language