mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add support for BSDmakefile, .arcconfig, and .JSON-tmLanguage files (#2986)
* Add support for .arcconfig files * Add .JSON-tmLanguage to recognised JSON extensions * Add BSDmakefile to recognised Makefile filenames * Silence Travis
This commit is contained in:
committed by
Arfon Smith
parent
5c19f1f546
commit
aa049b4677
@@ -1623,9 +1623,11 @@ JSON:
|
|||||||
extensions:
|
extensions:
|
||||||
- .json
|
- .json
|
||||||
- .geojson
|
- .geojson
|
||||||
|
- .JSON-tmLanguage
|
||||||
- .lock
|
- .lock
|
||||||
- .topojson
|
- .topojson
|
||||||
filenames:
|
filenames:
|
||||||
|
- .arcconfig
|
||||||
- .jshintrc
|
- .jshintrc
|
||||||
- composer.lock
|
- composer.lock
|
||||||
- mcmod.info
|
- mcmod.info
|
||||||
@@ -2082,6 +2084,7 @@ Makefile:
|
|||||||
- .mk
|
- .mk
|
||||||
- .mkfile
|
- .mkfile
|
||||||
filenames:
|
filenames:
|
||||||
|
- BSDmakefile
|
||||||
- GNUmakefile
|
- GNUmakefile
|
||||||
- Kbuild
|
- Kbuild
|
||||||
- Makefile
|
- Makefile
|
||||||
|
|||||||
123
samples/JSON/Git Commit.JSON-tmLanguage
Normal file
123
samples/JSON/Git Commit.JSON-tmLanguage
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
{
|
||||||
|
"name": "Git Commit Message",
|
||||||
|
"scopeName": "text.git-commit",
|
||||||
|
"fileTypes": [
|
||||||
|
"COMMIT_EDITMSG"
|
||||||
|
],
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.line.number-sign.git-commit-message",
|
||||||
|
"begin": "^#",
|
||||||
|
"beginCaptures": {
|
||||||
|
"0": {
|
||||||
|
"name": "punctuation.definition.comment.git-commit-message"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"end": "$",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.line.on-branch.git-commit-message",
|
||||||
|
"match": "(?:On branch )([^ ]+)",
|
||||||
|
"captures": {
|
||||||
|
"1": {
|
||||||
|
"name": "support.function.branch.git-commit-message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comment.line.on-branch.git-commit-message",
|
||||||
|
"match": "Your branch .* '([^ ']+)'",
|
||||||
|
"captures": {
|
||||||
|
"1": {
|
||||||
|
"name": "support.function.branch.git-commit-message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comment.line.untracked.git-commit-message",
|
||||||
|
"begin": " Untracked files:",
|
||||||
|
"beginCaptures": {
|
||||||
|
"0": {
|
||||||
|
"name": "entity.definition.untracked.git-commit-message"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"end": "^#$",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.line.untracked-file.git-commit-message",
|
||||||
|
"match": "\t(.*)$",
|
||||||
|
"captures": {
|
||||||
|
"1": {
|
||||||
|
"name": "support.function.file-status.git-commit-message"
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"name": "constant.character.branch.git-commit-message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comment.line.discarded.git-commit-message",
|
||||||
|
"begin": " Change(?:s not staged for commit|d but not updated):",
|
||||||
|
"beginCaptures": {
|
||||||
|
"0": {
|
||||||
|
"name": "entity.definition.discarded.git-commit-message"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"end": "^#$",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.line.discarded.git-commit-message",
|
||||||
|
"match": "\t([^:]+):(.*)$",
|
||||||
|
"captures": {
|
||||||
|
"1": {
|
||||||
|
"name": "support.function.file-status.git-commit-message"
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"name": "constant.character.branch.git-commit-message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comment.line.selected.git-commit-message",
|
||||||
|
"begin": " Changes to be committed:",
|
||||||
|
"beginCaptures": {
|
||||||
|
"0": {
|
||||||
|
"name": "entity.definition.selected.git-commit-message"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"end": "^#$",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.line.selected.git-commit-message",
|
||||||
|
"match": "\t([^:]+):(.*)$",
|
||||||
|
"captures": {
|
||||||
|
"1": {
|
||||||
|
"name": "support.function.file-status.git-commit-message"
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"name": "constant.character.branch.git-commit-message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "meta.diff.git-commit",
|
||||||
|
"comment": "diff at the end of the commit message when using commit -v, or viewing a log. End pattern is just something to be never matched so that the meta continues untill the end of the file.",
|
||||||
|
"begin": "diff\\ \\-\\-git",
|
||||||
|
"end": "(?=xxxxxx)123457",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "source.diff"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"uuid": "de3fb2fc-e564-4a31-9813-5ee26967c5c8"
|
||||||
|
}
|
||||||
8
samples/JSON/filenames/.arcconfig
Normal file
8
samples/JSON/filenames/.arcconfig
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"project_id": "example",
|
||||||
|
"conduit_uri": "https://ex.am.pl/",
|
||||||
|
"copyright_holder": "Apache Software Foundation",
|
||||||
|
"arcanist_configuration": "ArcJIRAConfiguration",
|
||||||
|
"phabricator.uri": "https://phabricator.example.com/",
|
||||||
|
"load": ["libs/src"]
|
||||||
|
}
|
||||||
11
samples/Makefile/filenames/BSDmakefile
Normal file
11
samples/Makefile/filenames/BSDmakefile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# pmake might add -J (private)
|
||||||
|
FLAGS=${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W}
|
||||||
|
|
||||||
|
all: .DEFAULT
|
||||||
|
.DEFAULT:
|
||||||
|
@which gmake > /dev/null 2>&1 ||\
|
||||||
|
(echo "GMake is required for node.js to build.\
|
||||||
|
Install and try again" && exit 1)
|
||||||
|
@gmake ${.FLAGS} ${.TARGETS}
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
Reference in New Issue
Block a user