Merge pull request #10450 from iMichka/style-sha256

style: do not fail on sha256 lines with cellar information
This commit is contained in:
Michka Popoff 2021-01-28 18:57:10 +01:00 committed by GitHub
commit b252b5d280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,11 @@ module RuboCop
return
end
if string_content(checksum).size != 64 && regex_match_group(checksum, /^\w*$/)
checksum_string = string_content(checksum)
return if checksum_string == "cellar"
if checksum_string.size != 64 && regex_match_group(checksum, /^\w*$/)
problem "sha256 should be 64 characters"
end