Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add common AutoHotkey extensions #6815

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Banaanae
Copy link

@Banaanae Banaanae commented May 9, 2024

Adds common AutoHotkey extensions

Description

Adds the following extensions:

  • ah1
  • ah2

Checklist:

@Banaanae Banaanae requested a review from a team as a code owner May 9, 2024 03:26
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

A quick look at your search links suggests most of these extensions are nowhere near popular enough for inclusion. Your samples are all exactly what we explicitly say do not add too.

Please remove all extensions that don't meet our popularity requirements or aren't close. And replace the samples with real samples.

The heuristic is also unnecessary as Linguist won't use it as it doesn't already know about this extension, which means every file on GitHub will that extension will now be associated with this language, which you might want to think twice about.

You might want to consider using an override instead.

@Banaanae
Copy link
Author

Banaanae commented May 9, 2024

I removed the ahk1 and ahk2 extensions
Made the samples better

I'm not too sure what you mean with the heuristics, there are a couple of files like this which share the same extension, but isn't autohotkey
Overrides sound like a local thing?

@lildude
Copy link
Member

lildude commented May 10, 2024

I'm not too sure what you mean with the heuristics, there are a couple of files like this which share the same extension, but isn't autohotkey

The heuristic is not considered at all when Linguist only knows one language for an extension. In such a case the language Linguist knows is applied to all files with that extension, unless overridden.

In order for the heuristic to be considered, Linguist needs to know of at least two languages using the extension so it can use it to differentiate between the two and make a better identification. So if you want your heuristic to take effect, you will need to identify another other language, and add it to Linguist as part of this PR, assuming it meets the popularity requirements too.

That file in question will remain unaffected as the repo already has an override.

Overrides sound like a local thing?

Only local to the repo. The other language file you pointed to only has a language and loose syntax highlighting because the repo owner has told Linguist to consider all files in the repo as matlab with this line.

@Banaanae
Copy link
Author

All requested changes should be addressed now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants