Skip to content

Commit 6f27487

Browse files
committed
Add information_for_contributors to grammars
1 parent 567bbbc commit 6f27487

46 files changed

Lines changed: 277 additions & 89 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/npm/update-all-grammars.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

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

109
function updateGrammar(location) {
1110
const result = cp.spawnSync(npm, ['run', 'update-grammar'], {

build/npm/update-grammar.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,23 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) {
8888
modifyGrammar(grammar);
8989
}
9090
return getCommitSha(repoId, repoPath).then(function (info) {
91+
let result = {
92+
information_for_contributors: [
93+
'This file has been converted from https://github.com/' + repoId + '/blob/master/' + repoPath,
94+
'If you want to provide a fix or improvement, please create a pull request against the original repository.',
95+
'Once accepted there, we are happy to receive an update request.'
96+
]
97+
};
98+
9199
if (info) {
92-
grammar.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha;
100+
result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha;
101+
}
102+
for (let key in grammar) {
103+
result[key] = grammar[key];
93104
}
105+
94106
try {
95-
fs.writeFileSync(dest, JSON.stringify(grammar, null, '\t'));
107+
fs.writeFileSync(dest, JSON.stringify(result, null, '\t'));
96108
if (info) {
97109
console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')');
98110
} else {

extensions/clojure/syntaxes/clojure.tmLanguage.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
27
"scopeName": "source.clojure",
38
"fileTypes": [
49
"boot",
@@ -440,6 +445,5 @@
440445
}
441446
]
442447
}
443-
},
444-
"version": "https://github.com/atom/language-clojure/commit/70e83b27444da31d6367a0aa447a216836eafc05"
448+
}
445449
}

extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/atom/language-coffee-script/blob/master/grammars/coffeescript.cson",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
27
"scopeName": "source.coffee",
38
"name": "CoffeeScript",
49
"fileTypes": [
@@ -686,6 +691,5 @@
686691
}
687692
]
688693
}
689-
},
690-
"version": "https://github.com/atom/language-coffee-script/commit/49c117b24096a369f92dfce180b61bd1f0425a29"
694+
}
691695
}

extensions/cpp/syntaxes/c++.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c%2B%2B.cson",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
27
"scopeName": "source.cpp",
38
"fileTypes": [
49
"cc",
@@ -457,6 +462,5 @@
457462
}
458463
]
459464
}
460-
},
461-
"version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f"
465+
}
462466
}

extensions/cpp/syntaxes/c.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c.cson",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
27
"scopeName": "source.c",
38
"fileTypes": [
49
"c",
@@ -1950,6 +1955,5 @@
19501955
}
19511956
]
19521957
}
1953-
},
1954-
"version": "https://github.com/atom/language-c/commit/1d137279178d06e7f7500800ebc36155e130172e"
1958+
}
19551959
}

extensions/csharp/syntaxes/csharp.tmLanguage.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/dotnet/csharp-tmLanguage/blob/master/grammars/csharp.tmLanguage",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
27
"name": "C#",
38
"scopeName": "source.cs",
49
"fileTypes": [
@@ -4186,6 +4191,5 @@
41864191
}
41874192
}
41884193
}
4189-
},
4190-
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/4d0e50c51f336645c98689737db1be321d212d3d"
4194+
}
41914195
}

extensions/css/syntaxes/css.tmLanguage.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/atom/language-css/blob/master/grammars/css.cson",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
27
"scopeName": "source.css",
38
"name": "CSS",
49
"fileTypes": [
@@ -1796,6 +1801,5 @@
17961801
}
17971802
]
17981803
}
1799-
},
1800-
"version": "https://github.com/atom/language-css/commit/23dcdee3372050eb3f07374fbe9188884bd545d1"
1804+
}
18011805
}

extensions/diff/syntaxes/diff.tmLanguage.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/textmate/diff.tmbundle/blob/master/Syntaxes/Diff.plist",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
27
"fileTypes": [
38
"patch",
49
"diff",
@@ -158,6 +163,5 @@
158163
}
159164
],
160165
"scopeName": "source.diff",
161-
"uuid": "7E848FF4-708E-11D9-97B4-0011242E4184",
162-
"version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7"
166+
"uuid": "7E848FF4-708E-11D9-97B4-0011242E4184"
163167
}

extensions/docker/syntaxes/docker.tmLanguage.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"information_for_contributors": [
3+
"This file has been converted from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage",
4+
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
5+
"Once accepted there, we are happy to receive an update request."
6+
],
27
"fileTypes": [
38
"Dockerfile"
49
],
@@ -96,6 +101,5 @@
96101
}
97102
],
98103
"scopeName": "source.dockerfile",
99-
"uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e",
100-
"version": "https://github.com/moby/moby/commit/8523e9d108a0e98865673701a7bd0a7929c5260b"
104+
"uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e"
101105
}

0 commit comments

Comments
 (0)