Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Alhadis
Copy link
Collaborator

@Alhadis Alhadis commented Aug 26, 2024

Description

This pull-request adds support for Hosts files that use a .txt extension.

In-the-wild usage checks out, though I'm not sure how many .txt files named “hosts” would be misclassified by this addition. In any case, it doesn't appear as if heuristics support filenames in addition to extensions, so I'll avoid assuming too much for the time being.

/cc @larsbrinkhoff I noticed you forked the legacy HOSTS.TXT tables, so you might have input concerning the (mis)classification of files named hosts.txt.

Checklist

  • I am adding a new extension filename to a language.
    • The new filename is used in hundreds of repositories on GitHub:
      ~2,400 search results for files named hosts.txt.
    • I have included real-world usage samples:
    • I have included a change to the heuristics.
      This was necessary because of the circuitous way in which we disambiguate between different .txt files. I don't know if filename conflicts can be resolved by heuristics in the way that file extensions are.

Footnotes

  1. https://github.com/Alhadis/.files/blob/4b6e915/etc/install/README.md?plain=1#L71-L78

  2. https://github.com/Alhadis/.files/blob/4b6e915/etc/install/README.md#:~:text=Update%20/etc/hosts

  3. https://superuser.com/q/241642

@Alhadis Alhadis requested a review from a team as a code owner August 26, 2024 02:16
@Alhadis Alhadis requested a review from lildude August 26, 2024 02:17
@Alhadis
Copy link
Collaborator Author

Alhadis commented Aug 26, 2024

@lildude Is there any reason why the license hashes aren't checked as part of Linguist's usual test run? I keep forgetting to run the following line during local development:

# Check license hashes
bundle exec licensed status -c vendor/licenses/config.yml

# Update license hashes
bundle exec licensed cache -c vendor/licenses/config.yml

Both of these commands were pulled from the pre-release checklist, which isn't even meant for regular contributors. Is there a way to integrate this step into bundle exec rake…?

@lildude
Copy link
Member

lildude commented Aug 26, 2024

Is there any reason why the license hashes aren't checked as part of Linguist's usual test run?

They are, here but only on pushes. Generally you'd only need to check these when adding or updating a grammar with the add-grammar script taking care of things for the grammar being added/replaced.

It shouldn't be too hard to add checking the licences to the Rakefile. I'm AFK today but can take a look tomorrow.

@larsbrinkhoff
Copy link
Contributor

Hey @Alhadis, good to hear from you. Sorry, no I never gave any thought to the number of misclassified hosts.txt files. Though I'm sure it will be important when this newfangled "Inter-Net" collapses under the weight of AI bots, and humans are forced (relieved) to retreat to the ARPANET where peace, prosperity, and empathy reins. ARE YOU WITH ME?

@lildude lildude added this pull request to the merge queue Aug 29, 2024
Merged via the queue into master with commit 22e1017 Aug 29, 2024
@lildude lildude deleted the hosts.txt branch August 29, 2024 14:28
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Dec 20, 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