mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
New Grammars Compiler (#3915)
* grammars: Update several grammars with compat issues * [WIP] Add new grammar conversion tools * Wrap in a Docker script * Proper Dockerfile support * Add Javadoc grammar * Remove NPM package.json * Remove superfluous test This is now always checked by the grammars compiler * Update JSyntax grammar to new submodule * Approve Javadoc license * grammars: Remove checked-in dependencies * grammars: Add regex checks to the compiler * grammars: Point Oz to its actual submodule * grammars: Refactor compiler to group errors by repo * grammars: Cleanups to error reporting
This commit is contained in:
@@ -94,19 +94,6 @@ class TestGrammars < Minitest::Test
|
||||
assert nonexistent_submodules.empty? && unlisted_submodules.empty?, message.sub(/\.\Z/, "")
|
||||
end
|
||||
|
||||
def test_local_scopes_are_in_sync
|
||||
actual = YAML.load(`"#{File.join(ROOT, "script", "convert-grammars")}" --output - --no-install --no-remote`)
|
||||
assert $?.success?, "script/convert-grammars failed"
|
||||
|
||||
# We're not checking remote grammars. That can take a long time and make CI
|
||||
# flaky if network conditions are poor.
|
||||
@grammars.delete_if { |k, v| k.start_with?("http:", "https:") }
|
||||
|
||||
@grammars.each do |k, v|
|
||||
assert_equal v, actual[k], "The scopes listed for #{k} in grammars.yml don't match the scopes found in that repository"
|
||||
end
|
||||
end
|
||||
|
||||
def test_readme_file_is_in_sync
|
||||
current_data = File.read("#{ROOT}/vendor/README.md").to_s.sub(/\A.+?<!--.+?-->\n/ms, "")
|
||||
updated_data = `script/list-grammars --print`
|
||||
|
||||
Reference in New Issue
Block a user