Add `Cargo.toml.orig` as TOML filename by spenserblack · Pull Request #6787 · github-linguist/linguist · GitHub
Skip to content

Add Cargo.toml.orig as TOML filename#6787

Merged
lildude merged 2 commits into
github-linguist:masterfrom
spenserblack:language/toml/Cargo.toml.orig
Jun 7, 2024
Merged

Add Cargo.toml.orig as TOML filename#6787
lildude merged 2 commits into
github-linguist:masterfrom
spenserblack:language/toml/Cargo.toml.orig

Conversation

@spenserblack

@spenserblack spenserblack commented Apr 8, 2024

Copy link
Copy Markdown
Contributor

This is a file that is generated by commands like cargo package.

Checklist:

  • I am adding a new extension filename to a language.
    • The new extension filename is used in hundreds of repositories on GitHub.com
    • I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
      • 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.

@spenserblack

Copy link
Copy Markdown
Contributor Author

@spenserblack spenserblack marked this pull request as ready for review April 8, 2024 16:07
@spenserblack spenserblack requested a review from a team as a code owner April 8, 2024 16:07
@Alhadis

Alhadis commented Apr 9, 2024

Copy link
Copy Markdown
Collaborator

Is there a reason to choose one over the other?

@spenserblack I believe test_blob.rb is for testing the functionality and expected behaviour of the Linguist::Blob class proper, while the test_generated.rb file holds individual tests for the contents of Linguist::Generated (the latter is more format-specific). @lildude will correct me if I'm wrong. 😉

@lildude

lildude commented Apr 9, 2024

Copy link
Copy Markdown
Member

@Alhadis is spot on. teat_blob.rb is essentially testing the helper methods used by the Blob class which in turn is doing the same things as the tests in test_generated.rb in this case, so there's no value in adding even more tests for generated to test_blob.rb, or test_file_blob.rb which is essentially the same, as that functionality isn't changing. Doing so only unnecessarily extends the time CI takes to run by effectively adding duplicate tests. This is one of a few places where a refactoring has left things in an incomplete and duplicating state. I've been meaning to find time to clean this all up for years 😁

@Alhadis

Alhadis commented Apr 9, 2024

Copy link
Copy Markdown
Collaborator

@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 00bf9c9 Jun 7, 2024
@spenserblack spenserblack deleted the language/toml/Cargo.toml.orig branch June 7, 2024 11:52
@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.

3 participants