Skip to content

Commit

Permalink
Add information_for_contributors to grammars
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli authored and dbaeumer committed May 26, 2017
1 parent a90342f commit f9084bb
Show file tree
Hide file tree
Showing 46 changed files with 277 additions and 89 deletions.
1 change: 0 additions & 1 deletion build/npm/update-all-grammars.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

const cp = require('child_process');
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const integrationTests = process.platform === 'win32' ? '.\test-integration.bat' : './test-integration.sh';

function updateGrammar(location) {
const result = cp.spawnSync(npm, ['run', 'update-grammar'], {
Expand Down
16 changes: 14 additions & 2 deletions build/npm/update-grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,23 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) {
modifyGrammar(grammar);
}
return getCommitSha(repoId, repoPath).then(function (info) {
let result = {
information_for_contributors: [
'This file has been converted from https://github.com/' + repoId + '/blob/master/' + repoPath,
'If you want to provide a fix or improvement, please create a pull request against the original repository.',
'Once accepted there, we are happy to receive an update request.'
]
};

if (info) {
grammar.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha;
result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha;
}
for (let key in grammar) {
result[key] = grammar[key];
}

try {
fs.writeFileSync(dest, JSON.stringify(grammar, null, '\t'));
fs.writeFileSync(dest, JSON.stringify(result, null, '\t'));
if (info) {
console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')');
} else {
Expand Down
8 changes: 6 additions & 2 deletions extensions/clojure/syntaxes/clojure.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"scopeName": "source.clojure",
"fileTypes": [
"boot",
Expand Down Expand Up @@ -440,6 +445,5 @@
}
]
}
},
"version": "https://github.com/atom/language-clojure/commit/70e83b27444da31d6367a0aa447a216836eafc05"
}
}
8 changes: 6 additions & 2 deletions extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/atom/language-coffee-script/blob/master/grammars/coffeescript.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"scopeName": "source.coffee",
"name": "CoffeeScript",
"fileTypes": [
Expand Down Expand Up @@ -686,6 +691,5 @@
}
]
}
},
"version": "https://github.com/atom/language-coffee-script/commit/49c117b24096a369f92dfce180b61bd1f0425a29"
}
}
8 changes: 6 additions & 2 deletions extensions/cpp/syntaxes/c++.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c%2B%2B.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"scopeName": "source.cpp",
"fileTypes": [
"cc",
Expand Down Expand Up @@ -457,6 +462,5 @@
}
]
}
},
"version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f"
}
}
8 changes: 6 additions & 2 deletions extensions/cpp/syntaxes/c.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"scopeName": "source.c",
"fileTypes": [
"c",
Expand Down Expand Up @@ -1950,6 +1955,5 @@
}
]
}
},
"version": "https://github.com/atom/language-c/commit/1d137279178d06e7f7500800ebc36155e130172e"
}
}
8 changes: 6 additions & 2 deletions extensions/csharp/syntaxes/csharp.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/dotnet/csharp-tmLanguage/blob/master/grammars/csharp.tmLanguage",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"name": "C#",
"scopeName": "source.cs",
"fileTypes": [
Expand Down Expand Up @@ -4186,6 +4191,5 @@
}
}
}
},
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/4d0e50c51f336645c98689737db1be321d212d3d"
}
}
8 changes: 6 additions & 2 deletions extensions/css/syntaxes/css.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/atom/language-css/blob/master/grammars/css.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"scopeName": "source.css",
"name": "CSS",
"fileTypes": [
Expand Down Expand Up @@ -1796,6 +1801,5 @@
}
]
}
},
"version": "https://github.com/atom/language-css/commit/23dcdee3372050eb3f07374fbe9188884bd545d1"
}
}
8 changes: 6 additions & 2 deletions extensions/diff/syntaxes/diff.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/textmate/diff.tmbundle/blob/master/Syntaxes/Diff.plist",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"fileTypes": [
"patch",
"diff",
Expand Down Expand Up @@ -158,6 +163,5 @@
}
],
"scopeName": "source.diff",
"uuid": "7E848FF4-708E-11D9-97B4-0011242E4184",
"version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7"
"uuid": "7E848FF4-708E-11D9-97B4-0011242E4184"
}
8 changes: 6 additions & 2 deletions extensions/docker/syntaxes/docker.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"fileTypes": [
"Dockerfile"
],
Expand Down Expand Up @@ -96,6 +101,5 @@
}
],
"scopeName": "source.dockerfile",
"uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e",
"version": "https://github.com/moby/moby/commit/8523e9d108a0e98865673701a7bd0a7929c5260b"
"uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e"
}
8 changes: 6 additions & 2 deletions extensions/fsharp/syntaxes/fsharp.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/ionide/ionide-fsgrammar/blob/master/grammar/fsharp.json",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"name": "fsharp",
"scopeName": "source.fsharp",
"fileTypes": [
Expand Down Expand Up @@ -456,6 +461,5 @@
}
]
}
},
"version": "https://github.com/ionide/ionide-fsgrammar/commit/f2e3c30f0ebfcc89fb78ad908701159f20516812"
}
}
8 changes: 6 additions & 2 deletions extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Commit%20Message.tmLanguage",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"fileTypes": [
"COMMIT_EDITMSG",
"MERGE_MSG"
Expand Down Expand Up @@ -138,6 +143,5 @@
}
},
"scopeName": "text.git-commit",
"uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7",
"version": "https://github.com/textmate/git.tmbundle/commit/93897a78c6e52bef13dadc0d4091d203c5facb40"
"uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7"
}
8 changes: 6 additions & 2 deletions extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Rebase%20Message.tmLanguage",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"fileTypes": [
"git-rebase-todo"
],
Expand Down Expand Up @@ -30,6 +35,5 @@
}
],
"scopeName": "text.git-rebase",
"uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1",
"version": "https://github.com/textmate/git.tmbundle/commit/d1db42c2d71948662098183a6df519fb53a7a15b"
"uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1"
}
8 changes: 6 additions & 2 deletions extensions/go/syntaxes/go.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/atom/language-go/blob/master/grammars/go.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"scopeName": "source.go",
"name": "Go",
"comment": "Go language",
Expand Down Expand Up @@ -624,6 +629,5 @@
}
]
}
},
"version": "https://github.com/atom/language-go/commit/c1fe618ccf2dcd17118c5600c49b1c539f26d5c5"
}
}
8 changes: 6 additions & 2 deletions extensions/groovy/syntaxes/groovy.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/textmate/groovy.tmbundle/blob/master/Syntaxes/Groovy.tmLanguage",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"fileTypes": [
"groovy",
"gvy"
Expand Down Expand Up @@ -1381,6 +1386,5 @@
}
},
"scopeName": "source.groovy",
"uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613",
"version": "https://github.com/textmate/groovy.tmbundle/commit/85d8f7c97ae473ccb9473f6c8d27e4ec957f4be1"
"uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613"
}
8 changes: 6 additions & 2 deletions extensions/handlebars/syntaxes/Handlebars.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/daaain/Handlebars/blob/master/grammars/Handlebars.json",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"name": "Handlebars",
"repository": {
"html_tags": {
Expand Down Expand Up @@ -849,6 +854,5 @@
"template",
"tmpl"
],
"uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484",
"version": "https://github.com/daaain/Handlebars/commit/4e8244410815da73f93375532939d48bd5a9bb93"
"uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484"
}
8 changes: 6 additions & 2 deletions extensions/hlsl/syntaxes/hlsl.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/tgjones/shaders-tmLanguage/blob/master/grammars/hlsl.json",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"scopeName": "source.hlsl",
"name": "HLSL",
"fileTypes": [
Expand Down Expand Up @@ -213,6 +218,5 @@
}
]
}
],
"version": "https://github.com/tgjones/shaders-tmLanguage/commit/cd1ef40f549f9ce2b9e6b73498688de114a85382"
]
}
8 changes: 6 additions & 2 deletions extensions/html/syntaxes/html.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/textmate/html.tmbundle/blob/master/Syntaxes/HTML.plist",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"fileTypes": [
"html",
"htm",
Expand Down Expand Up @@ -742,6 +747,5 @@
}
},
"scopeName": "text.html.basic",
"uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6",
"version": "https://github.com/textmate/html.tmbundle/commit/a723f08ebd49c67c22aca08dd8f17d0bf836ec93"
"uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6"
}
8 changes: 6 additions & 2 deletions extensions/ini/syntaxes/ini.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/textmate/ini.tmbundle/blob/master/Syntaxes/Ini.plist",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"fileTypes": [
"ini",
"conf"
Expand Down Expand Up @@ -109,6 +114,5 @@
}
],
"scopeName": "source.ini",
"uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C",
"version": "https://github.com/textmate/ini.tmbundle/commit/2af0cbb0704940f967152616f2f1ff0aae6287a6"
"uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C"
}
8 changes: 6 additions & 2 deletions extensions/java/syntaxes/java.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/atom/language-java/blob/master/grammars/java.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"scopeName": "source.java",
"name": "Java",
"fileTypes": [
Expand Down Expand Up @@ -1360,6 +1365,5 @@
}
]
}
},
"version": "https://github.com/atom/language-java/commit/0e0ec7966059e3e363868311b3d855014bca95dd"
}
}
8 changes: 6 additions & 2 deletions extensions/javascript/syntaxes/JavaScript.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"name": "JavaScript (with React support)",
"scopeName": "source.js",
"fileTypes": [
Expand Down Expand Up @@ -4222,6 +4227,5 @@
}
]
}
},
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724"
}
}
Loading

0 comments on commit f9084bb

Please sign in to comment.