mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +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
|
||||
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
|
||||
|
||||
def submodule_paths
|
||||
|
||||
Reference in New Issue
Block a user