Skip to content

Update Linguist languages.yml to latest upstream#1402

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
auto/update-linguist
Open

Update Linguist languages.yml to latest upstream#1402
github-actions[bot] wants to merge 1 commit into
mainfrom
auto/update-linguist

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 4, 2026

Summary

This PR was automatically created by the Update Linguist workflow.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 4, 2026

Greptile Summary

This automated PR syncs config/languages.yml from the upstream github-linguist/linguist repository, adding three new language definitions and two new filename entries.

  • BAML is added as a programming language with .baml extension.
  • Pro*C (Oracle embedded SQL) is added with .pc extension; pkg-config is also added with .pc and .pc.in extensions — both sharing .pc.
  • Makefile.pc and README.pc are added to the Makefile and Text filename lists respectively.

Confidence Score: 4/5

Safe to merge; it is a pure data sync with no application logic changes.

The only functional concern is that Pro*C and pkg-config now both claim the .pc extension, and LanguageUtils#extension_map will resolve the collision by silently picking pkg-config (last write wins). In practice .pc files were previously unrecognized entirely, so the net change is a new — if occasionally wrong — detection rather than a regression.

config/languages.yml — the new .pc extension entries for Pro*C and pkg-config warrant a quick check against how LanguageUtils handles shared extensions.

Important Files Changed

Filename Overview
config/languages.yml Adds BAML, ProC, and pkg-config language definitions plus filenames for Makefile.pc and README.pc; introduces a shared .pc extension between ProC and pkg-config

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[entity path e.g. foo.pc] --> B{detect_from_filename?}
    B -->|Makefile.pc| C[Language: Makefile]
    B -->|README.pc| D[Language: Text]
    B -->|no match| E{detect_from_extension?}
    E -->|.baml| F[Language: BAML]
    E -->|.pc| G{extension_map lookup}
    G -->|Pro*C written first| H[overwritten by pkg-config]
    H --> I[Language: pkg-config]
    G -->|Pro*C files| J[also resolved as pkg-config]
    E -->|.pc.in| K[Language: pkg-config]
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
config/languages.yml:6003-6013
**`.pc` extension collision between Pro*C and pkg-config**

Both `Pro*C` (added here) and `pkg-config` (added later in this same diff) register `.pc` as an extension. `LanguageUtils#build_lookup` builds a flat hash where the last writer wins, so one of these will silently shadow the other for any `.pc` file not matched by filename. Since `pkg-config` appears later in the file (lowercase sorts after uppercase), it will consistently win — meaning `.pc` files intended as Pro*C will be misidentified as `pkg-config`. This is a pre-existing limitation of the single-map approach, but this PR is the first to introduce two languages sharing the same extension.

Reviews (1): Last reviewed commit: "Update Linguist languages.yml to latest ..." | Re-trigger Greptile

Comment thread config/languages.yml
Comment on lines 6003 to +6013
tm_scope: source.prisma
ace_mode: prisma
language_id: 499933428
Pro*C:
fs_name: ProC
color: "#bb8368"
type: programming
extensions:
- ".pc"
tm_scope: source.c
ace_mode: c_cpp
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 .pc extension collision between Pro*C and pkg-config

Both Pro*C (added here) and pkg-config (added later in this same diff) register .pc as an extension. LanguageUtils#build_lookup builds a flat hash where the last writer wins, so one of these will silently shadow the other for any .pc file not matched by filename. Since pkg-config appears later in the file (lowercase sorts after uppercase), it will consistently win — meaning .pc files intended as Pro*C will be misidentified as pkg-config. This is a pre-existing limitation of the single-map approach, but this PR is the first to introduce two languages sharing the same extension.

Prompt To Fix With AI
This is a comment left during a code review.
Path: config/languages.yml
Line: 6003-6013

Comment:
**`.pc` extension collision between Pro*C and pkg-config**

Both `Pro*C` (added here) and `pkg-config` (added later in this same diff) register `.pc` as an extension. `LanguageUtils#build_lookup` builds a flat hash where the last writer wins, so one of these will silently shadow the other for any `.pc` file not matched by filename. Since `pkg-config` appears later in the file (lowercase sorts after uppercase), it will consistently win — meaning `.pc` files intended as Pro*C will be misidentified as `pkg-config`. This is a pre-existing limitation of the single-map approach, but this PR is the first to introduce two languages sharing the same extension.

How can I resolve this? If you propose a fix, please make it concise.

@github-actions github-actions Bot force-pushed the auto/update-linguist branch 28 times, most recently from e2b5440 to 41d4ccc Compare June 6, 2026 01:04
@github-actions github-actions Bot force-pushed the auto/update-linguist branch 6 times, most recently from 197d332 to c41d44e Compare June 6, 2026 11:35
@github-actions github-actions Bot force-pushed the auto/update-linguist branch from c41d44e to 953f2f0 Compare June 6, 2026 12:37
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.

0 participants