mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Add detection of GrammarKit-generated files
GrammarKit is a plugin by JetBrains for creating custom language plugins for JetBrains IDEs (such as IntelliJ, RubyMine, CLion and more). It defines a BNF parser language which can be used to generate a parser in Java, and it also integrates JFLex for generating a lexer in Java. Both of these generated Java files can be recognised by a comment on the first line of the file, and so classifying them as generated is trivial.
This commit is contained in:
@@ -69,5 +69,11 @@ class TestGenerated < Minitest::Test
|
||||
|
||||
# Specflow
|
||||
generated_fixture_without_loading_data("Features/BindingCulture.feature.cs")
|
||||
|
||||
# JFlex
|
||||
generated_sample_loading_data("Java/JFlexLexer.java")
|
||||
|
||||
# GrammarKit
|
||||
generated_sample_loading_data("Java/GrammarKit.java")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user