vulns: raise let-free spec files to typed: strict

utils/repology_spec, identify_spec and purl_spec go to typed: strict
with sigs added on their helper methods. cpan_sec_spec, vulns/repology_spec,
match_spec and dev-cmd/advisory-match_spec stay at typed: true because
they use let, which generates a sig-less method that strict rejects (no
brew spec at typed: strict uses let).
This commit is contained in:
Andrew Nesbitt committed 2026-07-28 11:41:05 +01:00
1 parent ac858185a3
commit 269b3ae4f0
3 files changed
+8 -3

No files matched your search

+5 -1
View File
@@ -1,4 +1,4 @@
# typed: true
# typed: strict
# frozen_string_literal: true
require "utils/repology"
@@ -10,6 +10,10 @@ RSpec.describe Repology do
end
describe ".single_package_query" do
sig {
params(success: T::Boolean, stdout: String, stderr: String, exit_status: Integer)
.returns(T.untyped)
}
def stub_curl(success:, stdout: "", stderr: "", exit_status: 0)
instance_double(SystemCommand::Result, success?: success, stdout:, stderr:, exit_status:)
end
+2 -1
View File
@@ -1,4 +1,4 @@
# typed: true
# typed: strict
# frozen_string_literal: true
require "vulns/identify"
@@ -146,6 +146,7 @@ RSpec.describe Homebrew::Vulns::Identify do
end
describe ".registry_package" do
sig { params(url: T.nilable(String)).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
def result(url)
described_class.registry_package(url)&.to_h
end
+1 -1
View File
@@ -1,4 +1,4 @@
# typed: true
# typed: strict
# frozen_string_literal: true
require "vulns/purl"