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

ASH scripts misidentified as AGS #5022

Open
4 tasks done
midgleyc opened this issue Sep 22, 2020 · 3 comments · May be fixed by #5401
Open
4 tasks done

ASH scripts misidentified as AGS #5022

midgleyc opened this issue Sep 22, 2020 · 3 comments · May be fixed by #5401
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist

Comments

@midgleyc
Copy link

ASH is a currently unrecognised language used for scripting KoLMafia, a program for playing the online game "Kingdom of Loathing". There is documentation available at the KoLMafia wiki. It seems quite popular throughout GitHub -- here's a search for a commonly used global function, "get_property".

All ASH scripts have the ".ash" extension, currently owned by AGS Scripts.

Preliminary Steps

Please confirm you have...

Problem Description

I'd like ASH to be added. I think it meets the "hundreds of repositories" requirement. Limiting the extension to ".ash" and comparing a search for "get_property" (I assume 100% ASH) to "int" (I assume a mix of ASH and AGS, and also that I've got most of the AGS .ash files) I think about a third of "AGS" scripts with the .ash extension are actually ASH. I don't think there's an existing TextMate grammar -- is there a simpler file structure I could provide, given that it won't be used for TextMate, only this?

There is a difficulty in that there are many valid AGS script files with a .ash extension. One heuristic could be to search for various common global functions in ASH: "set_property", "get_property", "cli_execute" and "visit_url"; or the keyword "notify". Alternatively, I think .ash in AGS is header file-esque, so if any functions are defined it's ASH.

The current syntax highlighting poses a problem for some ASH files, mostly where it interprets a ' in the middle of an $items[] (or $strings[], or $effects[]) construct as starting a new string, and formats the rest of the file accordingly. An example with "$item[FantasyRealm Warrior's Helm]".

URL of the affected repository:

Both https://github.com/Ezandora/Guide and https://github.com/Aenimus/newDG have free licenses (Unlicense and MIT respectively) and are recognised as AGS Script where they should be ASH.

Last modified on:

Expected language:

ASH

Detected language:

AGS Script

@smola
Copy link
Contributor

smola commented Sep 26, 2020

@midgleyc ASH might be a bit confusing (ash as in Almquist shell might be better known than KoLMafia). Do you think KoLMafia ASH would be a good name for the language?

@midgleyc
Copy link
Author

midgleyc commented Sep 26, 2020

@smola Sounds good to me, nice and descriptive.

@smola
Copy link
Contributor

smola commented Sep 26, 2020

By the way, I didn't get proper stats, but this is common enough that the vast majority of .ash files retrieved by my sample harvesting scripts were ASH, not AGS Script.

@lildude lildude added Add Language Good First Issue This is a great opportunity to start contributing to Linguist labels Sep 29, 2020
@midgleyc midgleyc linked a pull request May 31, 2021 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants