Commit Graph

77 Commits

Author SHA1 Message Date
Colin Seymour
15e2b74dec Release v6.0.0 (#4002)
* Update all submodules

* Ensure always using lastest docker image

* Allow passing in GEM_VERSION from env

This is useful to building test gems in a cache friendly way using:
`GEM_VERSION=$(git describe --tags 2>/dev/null | sed 's/-/./g' | sed
's/v//') bundle exec rake build_gem`

* Update submodules one last time

* Set version 6.0.0
2018-01-26 13:12:12 +00:00
Vicent Martí
c8171322f5 script: Add build-grammars-tarball (#3992) 2018-01-18 18:23:55 +01:00
Vicent Martí
e7e64bf39a compiler: Add error output to the compiler (#3935) 2017-12-04 19:20:38 +01:00
Vicent Martí
e335d48625 New Grammars Compiler (#3915)
* grammars: Update several grammars with compat issues

* [WIP] Add new grammar conversion tools

* Wrap in a Docker script

* Proper Dockerfile support

* Add Javadoc grammar

* Remove NPM package.json

* Remove superfluous test

This is now always checked by the grammars compiler

* Update JSyntax grammar to new submodule

* Approve Javadoc license

* grammars: Remove checked-in dependencies

* grammars: Add regex checks to the compiler

* grammars: Point Oz to its actual submodule

* grammars: Refactor compiler to group errors by repo

* grammars: Cleanups to error reporting
2017-11-30 16:15:48 +01:00
Colin Seymour
10dfe9f296 Fix typo in script/add-grammar (#3853) 2017-10-10 18:26:26 +01:00
John Gardner
63ff51e2ed Add test to keep grammar-list synced with submodules (#3793)
* Add test to check if grammar list is outdated

* Update grammar list

* Fix duplicate punctuation in error messages
2017-08-24 21:13:30 +10:00
Javier Honduvilla Coto
1ec4db97c2 Be able to configure the number of threads for git submodules update (#3438)
* make the number of submodule update threads configurable

* change thread number to be a script argument
2017-01-24 09:55:31 -08:00
Arie Kurniawan
ae8ffcad22 change http to https
fix the little flaws found on http protocol that is used,
one of the web using the http protocol which is already supporting more secure protocol,
which is https
2017-01-03 17:19:58 -08:00
meganemura
e1ce88920d Fix add-grammar and convert-grammars (#3354)
* Skip removed grammar submodule

* Clean up old grammar from grammars and grammars.yml

* Clean up unused grammar license

Run `script/licensed`.
This was missing change in 12f9295 of #3350.

* Clean up license files when we replace grammar

Update license files by running `script/licensed`.
Since we replace grammar, the old grammar license must be removed
and new grammar license must be added.
2017-01-03 13:57:46 -08:00
Paul Chaignon
9d8392dab8 Remove deprecated code (#3359)
* Remove deprecated find_by_shebang

* Remove deprecated ace_modes function

* Remove deprecated primary_extension function

Gists don't have a language dropdown anymore

* Remove deprecated Linguist::Language.detect function

* Remove deprecated search_term field
2016-12-12 12:24:19 -08:00
meganemura
12f9295dd7 Improve grammar scripts (#3350)
* Remove trailing spaces

* Setup Bundler in some scripts

* Update grammar index

* Make prune-grammars script to be callable in a script directory

* Prune unused xquery grammar repo

source.xq by language-jsoniq is actual tm_scope for XQuery.

* Remove xquery submodule

git submodule deinit vendor/grammars/xquery/
git rm vendor/grammars/xquery/

* Fix invocation of script/list-grammars

This fixes #3339.

* Make add-grammars script to be callable in a script directory

* Generate samples.json before running list-grammars

list-grammars requires linguist.
2016-11-29 10:13:33 -08:00
Paul Chaignon
0980e304b1 Generate language_id (#3284)
* Generate language_id from language names

The language_id is generated from the SHA256 hash of the language's name

* Test the validity of language ids

All languages should have a positive 32bit integer as an id

* Update languages.yml header in set-language-ids
2016-11-29 07:50:44 -08:00
Arfon Smith
43fa563b77 Adding script/list-grammars to script/add-grammar 2016-10-29 08:33:58 -04:00
Alhadis
4e20928e04 Merge branch 'master' into grammar-list 2016-10-29 12:31:04 +11:00
Alhadis
d7c689fd6b Merge branch 'master' into grammar-scripts 2016-10-05 16:34:24 +11:00
Paul Chaignon
65491d460e Remove support for .sublime-syntax 2016-09-14 23:09:22 +02:00
Arfon Smith
e0d890240b Adding basic script for adding language_id fields to languages.yml 2016-09-12 21:35:10 -07:00
Alhadis
b61fe90d12 Terminate script if submodule registration failed 2016-09-12 02:17:10 +10:00
Alhadis
e6c849d92c Document --verbose option in usage message 2016-09-12 02:08:52 +10:00
Alhadis
3247d46e81 Chop trailing slashes before looking up language 2016-09-09 16:33:21 +10:00
Alhadis
68c45be47d Flatten whitespace 2016-09-07 04:37:04 +10:00
Alhadis
4584963dd2 Add logic to update submodules and licenses 2016-09-07 04:26:45 +10:00
Alhadis
f382abc2f3 Add logic to consume and parse options 2016-09-07 03:14:49 +10:00
Alhadis
9d57e1e1b5 Remove debugging vestige 2016-09-07 00:59:13 +10:00
Alhadis
2a4150b104 Butcher whitespace to appease tab-hating heretics 2016-09-07 00:23:31 +10:00
Alhadis
09612ae42e Add logic to update Markdown file 2016-09-07 00:21:05 +10:00
Alhadis
49e9ee48d0 Make grammar-listing code more modular 2016-09-07 00:09:24 +10:00
Alhadis
a8719f3e82 Add script to generate grammars-list in Markdown 2016-09-06 23:07:18 +10:00
Paul Chaignon
adaf4011bc Support for .YAML-tmLanguage grammar files 2016-06-26 20:57:50 +02:00
Paul Chaignon
4a031107ac Support for Sublime Text YAML syntax definitions
Sublime Text YAML syntax definitions use the .sublime-syntax file extension

Most syntax files declare a YAML 1.2 syntax although they are YAML 1.1 compatible
Thus, the YAML version header is stripped off before parsing
Displays a warning if parsing fails

In .sublime-syntax files, the scope is under the 'scope' key -- as opposed to the usual 'scopeName' key
2016-06-26 19:47:34 +02:00
Brandon Keepers
12228fb525 Proper exit status for script/licensed 2016-04-16 10:25:34 -04:00
Arfon Smith
065c809dd5 Updating grammars based on script/licensed 2016-03-18 16:52:49 -06:00
Arfon Smith
b5091e88ad Updating licensor -> licensed 2016-03-18 12:32:52 -06:00
Arfon Smith
afcf1c6c22 Merge branch 'master' into licensor 2016-03-17 19:57:29 -06:00
Dan Buch
550b67215c Fetch libicu via Travis, switch back to container-based
This is a test.  I don't understand the details of how the `bundle config
build.charlock_holmes` bit works/fails, so the intent here is to get a PR posted
for purposes of getting feedback via the full Travis machinery.
2015-11-08 06:41:22 -05:00
Brandon Keepers
0d469e2966 Add licensor 2015-10-20 17:44:31 -04:00
Adam Roben
57429f3194 Don't warn if a package contains multiple copies of a grammar
This is pretty common (e.g., if the package contains the grammar in both
XML and JSON).
2015-05-19 09:27:13 -04:00
Adam Roben
9bdf890fd8 Fix nil NoMethodError when converting a duplicated grammar
We were sticking a nil value into the grammars Array when we encountered
a duplicate scope. Now we strip out nils before returning the Array.
2015-05-19 09:27:13 -04:00
Paul Chaignon
ca12a99970 Handle SSH links to submodules 2015-05-01 21:03:02 +02:00
Brandon Keepers
8da458e1a8 apt-get update before downloading deps 2015-03-08 16:24:05 -07:00
Adam Roben
6fef6b578a Fix script/convert-grammars --add 2015-01-08 10:49:01 -05:00
Florian M. Schäfer
417171cfe1 Don't pass JSON-files through csonc 2015-01-07 15:27:40 +01:00
Florian Schäfer
6843aa7cc8 Enable file extension .json for grammar files 2015-01-07 15:27:40 +01:00
Florian M. Schäfer
ab1b603c78 Require thread-gem and solve problem with visibility of variable p in convert-grammars
* The `thread`-gem is required for the script, because otherwise Ruby throws an error that `Queue` in line 259 is an uninitialized constant
* The variable `p` was previously in the same method with the status message saying `OK ‹path› ‹converted scopes›`. But `p` is now defined in load_grammars() and thus not visible when showing the OK-message in install_grammars(). This was solved by adding a path-parameter to install_grammars().
2015-01-06 22:06:55 +01:00
Adam Roben
7edddec920 Make convert-grammars a little quieter
No need to say "Done" at the end. We're obviously done; the script is
exiting.
2015-01-06 13:39:18 -05:00
Adam Roben
917bc48348 Use File.directory? to test for local directories
Some of our submodules end in ".tmLanguage", which we used to think
meant it was a file rather than a directory.
2015-01-06 13:31:26 -05:00
Adam Roben
581dc36c47 Ruby 1.9 compatibility for convert-grammars 2015-01-06 13:28:26 -05:00
Adam Roben
ada6f6882a Test that grammars.yml lists the right scopes for each submodule
convert-grammars now supports a few flags that we can use to make it
dump out the YAML just for the local grammar submodules. We can then
compare this to the YAML that's actually in grammars.yml to check that
they're the same. If they aren't, grammars.yml needs to be updated.
This will help catch mistakes like using the wrong scope name.
2015-01-06 13:28:25 -05:00
Adam Roben
78a0030d46 download-grammars -> convert-grammars
Downloading is only a small part of what this script does. The main
thing it does is convert grammars to JSON.
2015-01-06 13:28:25 -05:00
Adam Roben
188e579df7 Use a single git fetch invocation in CI 2015-01-06 12:56:08 -05:00