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
220 critical, 328 high, 528 medium, 256 low.
Hotspots
57 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
- tests/test_optimizer.py: 50 commits in the last 90 days from 42 contributors with 50 recent bug fixes
- tests/dialects/test_snowflake.py: 24 commits in the last 90 days from 81 contributors with 30 recent bug fixes
- sqlglot/generator.py: 68 commits in the last 90 days from 147 contributors with 63 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 3 unused exports. 60 refactoring targets across 60 files would raise the score.
More on sqlglot: summary and FAQ, codebase overview, architecture.