Skip to content

Make Assembly files track as Assembly - #1474

Merged
skyfallwastaken merged 9 commits into
hackclub:mainfrom
SeradedStripes:main
Jul 26, 2026
Merged

Make Assembly files track as Assembly#1474
skyfallwastaken merged 9 commits into
hackclub:mainfrom
SeradedStripes:main

Conversation

@SeradedStripes

Copy link
Copy Markdown
Contributor

Summary of the problem

Assembly file types were being tracked as a range of assembly derivatives.

Describe your changes

Fixes it by making Assembly file extensions be logged as Assembly

Screenshots / Media

None

@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes Assembly file extensions resolve to the canonical Assembly language. The main changes are:

  • Custom language extension arrays are merged with base language data instead of replacing them.
  • Extensions owned by custom language entries are removed from competing language definitions before lookup maps are built.
  • Assembly is added to config/languages_custom.yml for key assembly extensions.
  • Tests cover Assembly extension detection and existing custom language entries.

Confidence Score: 5/5

This PR is safe to merge with minimal risk.

The change is narrow and directly addresses the Assembly extension precedence issue. Tests cover the updated behavior for Assembly and existing custom entries.

Files Needing Attention: No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • I ran a Ruby syntax check on app/lib/language_utils.rb and confirmed Syntax OK with exit code 0.
  • I attempted the Rails test for assembly-language-utils, but the run failed early during Bundler Gemfile parsing because Windows is not a valid platform, exiting with code 1.
  • I executed the harness which listed foo.asm, foo.s, and foo.S as Assembly files and reported no conflicting owners, exiting cleanly with code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
app/lib/language_utils.rb Merges custom language arrays by union and removes custom-owned extensions from competing language definitions before building lookup maps.
config/languages_custom.yml Adds Assembly as a custom language override for key assembly extensions so they take priority over derivative language entries.
test/lib/language_utils_test.rb Adds tests confirming Assembly extensions and existing custom language definitions resolve as expected.

Sequence Diagram

sequenceDiagram
  participant Client as Language detection caller
  participant LU as LanguageUtils
  participant Base as config/languages.yml
  participant Custom as config/languages_custom.yml
  participant Map as Extension lookup

  Client->>LU: detect_from_extension(entity)
  LU->>Base: load base language data
  LU->>Custom: load custom overrides
  LU->>LU: deep_merge arrays with union
  LU->>LU: remove custom-owned extensions from other languages
  LU->>Map: build extension_map from merged data
  Map-->>LU: canonical language name
  LU-->>Client: Assembly for configured assembly extensions
Loading

Reviews (9): Last reviewed commit: "Merge branch 'main' into main" | Re-trigger Greptile

Comment thread config/languages_custom.yml
Comment thread config/languages_custom.yml
Comment thread app/lib/language_utils.rb Outdated
Comment thread app/lib/language_utils.rb Outdated
@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@skyfallwastaken
skyfallwastaken enabled auto-merge (squash) July 26, 2026 17:16

@skyfallwastaken skyfallwastaken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@skyfallwastaken
skyfallwastaken merged commit fe1711e into hackclub:main Jul 26, 2026
12 of 13 checks passed
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.

2 participants