Register `MODULE.bazel.lock` as JSON and generated by dtolnay · Pull Request #6783 · github-linguist/linguist · GitHub
Skip to content

Register MODULE.bazel.lock as JSON and generated#6783

Merged
lildude merged 2 commits into
github-linguist:masterfrom
dtolnay-contrib:bzlmod
Jun 7, 2024
Merged

Register MODULE.bazel.lock as JSON and generated#6783
lildude merged 2 commits into
github-linguist:masterfrom
dtolnay-contrib:bzlmod

Conversation

@dtolnay

@dtolnay dtolnay commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

Description

This PR makes Linguist recognize files named "MODULE.bazel.lock" as generated and also as JSON syntax.

Real-world examples:

Bazel (https://bazel.build) outputs these lockfile since version 6.2.0. Announcement: https://blog.bazel.build/2023/07/24/whats-new-with-bzlmod.html. More details about Bazel lockfiles: https://bazel.build/external/lockfile.

Checklist:

  • I am fixing a misclassified language

    • I have included a new sample for the misclassified language:
      • Sample source(s):
        • obtained by running mkdir bzlmod && cd bzlmod && touch MODULE.bazel && touch BUILD.bazel && bazel build ...
      • Sample license(s):
    • I have included a change to the heuristics to distinguish my language from others using the same extension.
  • I am adding new or changing current functionality

    • I have added or updated the tests for the new or changed functionality.

@dtolnay dtolnay requested a review from a team as a code owner April 4, 2024 02:57

@lildude lildude 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.

The sample file is waaay too big so is suppressed by the diff by default as would be the case when this PR is merged. Is it possible to generate a smaller file?

@dtolnay

dtolnay commented Apr 4, 2024

Copy link
Copy Markdown
Contributor Author

@lildude lildude changed the title Recognize Bazel's bzlmod lockfiles (MODULE.bazel.lock) Register MODULE.bazel.lock as JSON and generated Apr 4, 2024
@lildude lildude changed the title Register MODULE.bazel.lock as JSON and generated Register MODULE.bazel.lock as JSON and generated Apr 4, 2024

@lildude lildude 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.

LGTM. Thanks.

Note: this PR will not be merged until close to when the next release is made. See here for more details.

@lildude lildude added this pull request to the merge queue Jun 7, 2024
Merged via the queue into github-linguist:master with commit 9d2fd70 Jun 7, 2024
@dtolnay dtolnay deleted the bzlmod branch June 7, 2024 12:13
@lildude lildude mentioned this pull request Jun 14, 2024
2 tasks
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants