mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-02-13 03:39:32 +00:00
Test submodules are using HTTPS links
This commit is contained in:
@@ -113,6 +113,20 @@ class TestGrammars < Minitest::Test
|
|||||||
assert_equal [], licensed, msg
|
assert_equal [], licensed, msg
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_submodules_use_https_links
|
||||||
|
File.open(".gitmodules", "r") do |fh|
|
||||||
|
ssh_submodules = []
|
||||||
|
fh.each_line do |line|
|
||||||
|
if matches = line.match(/url = (git@.*)/)
|
||||||
|
submodule_link = matches.captures[0]
|
||||||
|
ssh_submodules.push(submodule_link)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
msg = "The following submodules don't have an HTTPS link:\n* #{ssh_submodules.join("\n* ")}"
|
||||||
|
assert_equal [], ssh_submodules, msg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def submodule_paths
|
def submodule_paths
|
||||||
|
|||||||
Reference in New Issue
Block a user