Add Silverstripe Templates language
Adding the Silverstripe Templating language. See https://docs.silverstripe.org/en/6/developer_guides/templates/syntax/ for in-depth information about this templating language.
Description
Checklist:
- [x] I am adding a new language.
- [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
- Search results for each extension:
- https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.ss+silverstripe
- Search results for each extension:
- [x] I have included a real-world usage sample for all extensions added in this PR:
- Sample source(s):
- https://github.com/silverstripe/silverstripe-framework/blob/6/templates/SilverStripe/Forms/CheckboxSetField.ss
- https://github.com/silverstripe/startup-theme/blob/1/templates/Page.ss
- Sample license(s): BSD-3 clause
- Sample source(s):
- [x] I have also included usage examples for another language which uses the same extension.
- Sample source(s):
- https://github.com/exercism/scheme/blob/main/load.ss
- https://github.com/exercism/scheme/blob/main/code/track.ss
- Sample license(s): MIT license
- [x] I have included a syntax highlighting grammar: https://github.com/gorriecoe/atom-silverstripe
- [x] I have added a color
- Hex value:
#005AE1 - Rationale: This is one of the Silverstripe CMS brand colours as per https://www.silverstripe.com/silverstripe-brand-guides/silverstripe-cms-style-guide/
- Hex value:
- [x] I have updated the heuristics to distinguish my language from others using the same extension.
- Presumably adding the two examples to the "Scheme" language is sufficient, since that's what the contributing doc says to do.
- [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
Thanks for submitting this @GuySartorelli 🎉
For the record: Going on Silverstripe's CMS style guide, we're thinking the bright blue #005AE1 makes more sense over the dark blue #0049A3 given how small the design element is in the GitHub UI, so it'll stand out a little bit more and be more distinct from the color PHP is using (#4F5D95). That's important since this will likely always be shown adjacent to PHP (given Silverstripe is a PHP based CMS and framework).
Coincidentally, this "bright blue" isn't too far off from the existing color already being associated with *.ss files via Scheme (#1e4aec), so the most visible change here will mainly just be the file type being displayed, i.e. "Silverstripe Templates.
I've committed all of the changes (just did a straight git add . && git commit) - that script must not have created a cached license file. Can you please provide me with instructions to either find out what went wrong, or else to create the file another way?
This is the command that should have run:
https://github.com/github-linguist/linguist/blob/2409807814a3ff386294b1f217b886a1594642cd/script/add-grammar#L135
You can run it manually but you might want to check why it might have failed before it got here. Maybe there's a problem with the grammar? (An error should have been reported)
Not sure about the automations, but:
- Samples: @GuySartorelli I imagine the sample files you copied were likely covered by some particular licenses as well. I know if the
page.ssfile was copied from Silverstripe, it probably is covered, since it uses the BSD-3 license which is accepted here according to CONTRIBUTING.md. - Grammar: The
atom-silverstriperepo referenced above appears to also use BSD-3 as well.
Does that help @lildude? If so, then maybe the file you're looking for can be generated manually instead. If so, maybe next steps are:
- @GuySartorelli look up the details of the licenses used for the samples and
- @lildude let us know:
a. If that license can be manually done.
b. Where it'd be, e.g. at
vendor/licenses/git_submodule/language-[NAME].dep.yml? Presumably similar to this recently merged request (Hurl)? https://github.com/github-linguist/linguist/pull/7627/files#diff-496746ca94fd0d61db41d5c9ce50a86a0205b451e612527664a3d9c7fc9afda0
Edit: Just realized you replied shortly before my comment, but will leave it up in case there's a pathway for manual completion as well.
@patricknelson The license being discussed is specifically for the grammar. Sample licenses and sources are mentioned in the files themselves and in the PR description. I'm sure if more needs to be done in that respect we'll be told what to do :+1:
Running bundle exec licensed cache -c vendor/licenses/config.yml gives this output:
Caching dependency records for app
But no files were changed.
you might want to check why it might have failed before it got here. Maybe there's a problem with the grammar? (An error should have been reported)
No errors were reported this time nor when I ran script/add-grammar initially. In fact the output I just got from running the licensed cache command was part of the output I got when I ran script/add-grammar.
If you can provide me with debug steps I'll gladly look more into it - or alternatively if there's a more manual way to cache the license I'll happily do that too if you can tell me how.
Worked for me (I re-ran the script/add-grammar command) so I've added the cached file for you.
Thank you @lildude !