mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Merge pull request #3259 from Alhadis/colour-removal
Guard against unused colour definitions
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
# language_id - Integer used as a language-name-independent indexed field so that we can rename
|
# language_id - Integer used as a language-name-independent indexed field so that we can rename
|
||||||
# languages in Linguist without reindexing all the code on GitHub. Must not be
|
# languages in Linguist without reindexing all the code on GitHub. Must not be
|
||||||
# changed for existing languages without the explicit permission of GitHub staff.
|
# changed for existing languages without the explicit permission of GitHub staff.
|
||||||
# color - CSS hex color to represent the language.
|
# color - CSS hex color to represent the language. Only used if type is "programming" or "prose"
|
||||||
# tm_scope - The TextMate scope that represents this programming
|
# tm_scope - The TextMate scope that represents this programming
|
||||||
# language. This should match one of the scopes listed in
|
# language. This should match one of the scopes listed in
|
||||||
# the grammars.yml file. Use "none" if there is no grammar
|
# the grammars.yml file. Use "none" if there is no grammar
|
||||||
@@ -103,7 +103,6 @@ APL:
|
|||||||
language_id: 6
|
language_id: 6
|
||||||
ASN.1:
|
ASN.1:
|
||||||
type: data
|
type: data
|
||||||
color: "#aeead0"
|
|
||||||
extensions:
|
extensions:
|
||||||
- ".asn"
|
- ".asn"
|
||||||
- ".asn1"
|
- ".asn1"
|
||||||
|
|||||||
@@ -494,4 +494,11 @@ class TestLanguage < Minitest::Test
|
|||||||
message << missing.sort.join("\n")
|
message << missing.sort.join("\n")
|
||||||
assert missing.empty?, message
|
assert missing.empty?, message
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_no_unused_colours
|
||||||
|
Language.all.each do |language|
|
||||||
|
next unless language.type == :data || language.type == :prose
|
||||||
|
assert !language.color, "Unused colour assigned to #{language.name}"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
2
vendor/grammars/language-asn1
vendored
2
vendor/grammars/language-asn1
vendored
Submodule vendor/grammars/language-asn1 updated: bc3811c770...208b6d9ebe
Reference in New Issue
Block a user