Skip to content

Conversation

@eureka928
Copy link
Contributor

Summary

  • Add .erb (Embedded Ruby) extension to programming_languages.json with weight 0.8
  • Add erb to NON_CODE_EXTENSIONS in constants.py for line-count scoring

Related Issues

ERB files (.erb, .html.erb) used in Rails projects were completely unscored — they had no entry in programming_languages.json and no tree-sitter parser exists in the language pack. This meant any PR modifying only ERB files would get 0 token score.

Since no tree-sitter ERB parser is available, line-count scoring is the only viable method. Weight of 0.8 reflects ERB being a mix of HTML (0.75) and Ruby (1.75) template code.

Scoring behavior:

  • ERB changes contribute to the contribution bonus only (not pr.token_score)
  • ERB-only PRs get a small base score (max ~3.60 per file at 300-line cap)
  • Mixed PRs (.rb + .erb) get ERB as a small bonus on top of Ruby AST scoring
  • ERB changes do not count toward tier token score thresholds

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • Tests added/updated
  • Manually tested
  • All 199 existing tests pass

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

Add .erb (Embedded Ruby) to programming_languages.json with weight 0.8
and to NON_CODE_EXTENSIONS for line-count scoring. No tree-sitter ERB
parser exists in the language pack, so line-count is the only viable
scoring method. Weight of 0.8 reflects ERB being a mix of HTML (0.75)
and Ruby (1.75) template code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant