ZS and Z#
Language name
ZS
URL of example repository
https://github.com/WMZS-Modding/zs-language
URL of syntax highlighting grammar
https://github.com/WMZS-Modding/zs-language
Most popular extensions
.zs: 32.6K files
Detected language
ZenScript, Z# (ZSharp) is the two conflicted extensions with my ZS Language. In linguist repository, ZenScript had already had extenstion is .zs. However, ZS Language had also had extension is .zs, which is making Linguist can't distinguish between "ZenScript" and "ZS".
I have a fork that isn't really complete. What should I do to make Linguist distinguish between the two programming languages correctly?
You can find details for adding support for a language in the CONTRIBUTING.md file. Please note we have minimum usage requirements so will not accept PRs for very new and hobby languages.
You can find details for adding support for a language in the CONTRIBUTING.md file. Please note we have minimum usage requirements so will not accept PRs for very new and hobby languages.
I've already understood Linguist only accepts languages with a certain level of usage, so my ZS language may not qualify yet.
However, my main concern is about file extension conflicts rather than immediate acceptance. Both ZenScript and my ZS language use .zs. My idea is:
- If a
.zsfile has no specific marker, detect it as ZenScript. - If a
.zsfile contains a marker like! ZS-CSHARPor! ZS-LUA, detect it as ZS language instead.
Would this kind of rule be possible in Linguist in the future? I’ve already forked the repository, but I’m not ready to open a PR until ZS becomes more widely used.
We use heuristics (regular expressions in the heuristics.yml file) to differentiate the languages that have matching extensions.
We use heuristics (regular expressions in the
heuristics.ymlfile) to differentiate the languages that have matching extensions.
Your answer really addresses the concern of Linguist being able to differentiate between ZenScript and ZS. However, as mentioned, my language is really new and not really popular yet, so even though I forked your repository, I can't send a Pull Request until ZS meets your minimum usage requirements or is popular.
Please keep in mind my "future note": The first Pull Request contains a submodule. However, this submodule doesn't receive the latest updates on my repository side. So in the future, after the first Pull Request is merged, I'll continue to send other Pull Requests on schedule as I'll be constantly updating my repository.
So in the future, after the first Pull Request is merged, I'll continue to send other Pull Requests on schedule as I'll be constantly updating my repository.
Please don't. See the second paragraph in My Linguist PR has been merged but GitHub doesn't reflect my changes.
So in the future, after the first Pull Request is merged, I'll continue to send other Pull Requests on schedule as I'll be constantly updating my repository.
Please don't. See the second paragraph in My Linguist PR has been merged but GitHub doesn't reflect my changes.
I'm sorry, I was forgotten to read troubleshooting.md, so I had said like:
So in the future, after the first Pull Request is merged, I'll continue to send other Pull Requests on schedule as I'll be constantly updating my repository.
This is my fault, please skip this.
I have a situation: I had resolved the conflict between ZenScript and ZS by editing heuristics.yml. Now I want to add a Z# language to Linguist, but I'm worried that there will be a second conflict between ZenScript, Z# and ZS (because I previously forked to register 2 languages ZenScript and ZS with the same file extension .zs in languages.yml). Should I add this Z# language? If this language isn't popular enough, I won't add it. However, I don't want to abandon Z#. So I want to ask you if I'm allowed to add it to Linguist.
Should I add this Z# language?
No. It definitely sounds like a hobby language that is no longer in development so isn't likely to ever meet usage requirements.
I have a question: I know I can't use GPL-3.0 License on your Linguist, but my License in ZS Highlight Syntaxes is GPL-3.0. So it's imposible to create a pull request if I write mit in zs-language.dep.yml, is it?
So it's imposible to create a pull request if I write
mitinzs-language.dep.yml, is it?
That would be rejected because you're misleading the situation. I manually check all grammars to make sure the license matches the source so if the source is GPL, the PR will be rejected.
That would be rejected because you're misleading the situation. I manually check all grammars to make sure the license matches the source so if the source is GPL, the PR will be rejected.
Ok. But It's imposible to create 2 Licenses in ZS Highlight Syntaxes (eg., LICENSE-GPL, LICENSE-MIT, LICENSE (for tell to user why I have to create dual-license)), then change LICENSE to LICENSE-MIT in zs-language.dep.yml, is it? If true, should I change LICENSE from GPL-3.0 to MIT?
I have a worrying question about ZS language usage: ZenScript has a lot of users and there are tens of thousands of files that overlap with ZS. If I search for usage by typing path:*.zs NOT is:fork, it will show both languages. How can I know only ZS language usage (:user/:repo) (I just want to know although ZS isn't used yet, I just need to know to let me use in the future)?
As there are two languages sharing a common extension, we require a heuristic to differentiate the two. As this is just a regex, you can use that regex in GitHub's search to find and prove popularity.