Skip to content

fix: route configured null-language extensions to line-count instead of skipped-unsupported (#1274)#1278

Open
alpurkan17 wants to merge 1 commit into
entrius:testfrom
alpurkan17:fix/1274-null-language-line-count
Open

fix: route configured null-language extensions to line-count instead of skipped-unsupported (#1274)#1278
alpurkan17 wants to merge 1 commit into
entrius:testfrom
alpurkan17:fix/1274-null-language-line-count

Conversation

@alpurkan17
Copy link
Copy Markdown
Contributor

@alpurkan17 alpurkan17 commented May 14, 2026

Summary

Extensions in programming_languages.json with language=null (no tree-sitter parser) receive score=0.0 with scoring_method=skipped-unsupported. The scorer only routed to line-count when the extension appeared in NON_CODE_EXTENSIONS — it never consulted the JSON config for null-language entries.

This affects 11 extensions: env, gitattributes, gitignore, gql, graphql, ipynb, move, nim, pde, puml, tex.

Fix: add an inline check before the skipped-unsupported gate: when the extension is configured in programming_languages with language=null, route to line-count scoring using the configured weight. No new method, no import changes — single inline check in the existing elif chain.

Validation

  • uv run ruff check — clean
  • uv run ruff format --check — clean
  • uv run pyright — 0 errors / 0 warnings
  • uv run pytest tests/ -k "null_language or line_count" -q — 30/30 passed

Closes #1274

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] configured null-language extensions score 0 (skipped-unsupported) instead of line-count

1 participant