repowisetobymao/sqlglot

Code health of tobymao/sqlglot

Repowise scores tobymao/sqlglot at 4.1 out of 10 for code health, which reads as needs work, alongside maintainability 6.6 and static performance 9.9 on the same scale. There are 1,374 open findings across the three pillars, and the lowest-scoring file is parser.py at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

216 critical, 321 high, 521 medium, 256 low.

Hotspots

39 files are flagged as hotspots. The top 5:

  • sqlglot/parser.py: 93 commits in the last 90 days from 163 contributors with 96 recent bug fixes
  • sqlglot/dialects/duckdb.py: 6 commits in the last 90 days from 60 contributors with 6 recent bug fixes
  • sqlglot/generator.py: 68 commits in the last 90 days from 147 contributors with 63 recent bug fixes
  • sqlglot/dialects/dialect.py: 30 commits in the last 90 days from 74 contributors with 33 recent bug fixes
  • sqlglot/generators/duckdb.py: 29 commits in the last 90 days from 27 contributors with 30 recent bug fixes

Lowest-scoring files

  • sqlglot/parser.py: 1.0 out of 10 with 96 bug fixes in the last 180 days
  • sqlglot/optimizer/simplify.py: 1.0 out of 10 with 27 bug fixes in the last 180 days
  • sqlglot/optimizer/qualify_columns.py: 1.0 out of 10 with 34 bug fixes in the last 180 days
  • sqlglot/generator.py: 1.0 out of 10 with 63 bug fixes in the last 180 days
  • sqlglot/tokenizer_core.py: 1.0 out of 10 with 13 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 256 scored files, 19.9% had a bug fix in that window.

Dead code and refactoring

Repowise found 2 unused exports. 60 refactoring targets across 60 files would raise the score.

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

Related guide: Best dead code detection tools by language