Merge pull request #16717 from jesboat/fix-chmod-message2
[brew audit] fix "Incorrect file permissions" message
This commit is contained in:
commit
b8243d0e9e
@ -22,7 +22,7 @@ module RuboCop
|
|||||||
if actual_mode & 0444 != 0444
|
if actual_mode & 0444 != 0444
|
||||||
problem format("Incorrect file permissions (%03<actual>o): chmod %<wanted>s %<path>s",
|
problem format("Incorrect file permissions (%03<actual>o): chmod %<wanted>s %<path>s",
|
||||||
actual: actual_mode & 0777,
|
actual: actual_mode & 0777,
|
||||||
wanted: "+r",
|
wanted: "a+r",
|
||||||
path: file_path)
|
path: file_path)
|
||||||
end
|
end
|
||||||
# Check that the file is user-writeable.
|
# Check that the file is user-writeable.
|
||||||
|
@ -13,7 +13,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::Files do
|
|||||||
|
|
||||||
expect_offense(<<~RUBY, file)
|
expect_offense(<<~RUBY, file)
|
||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
^^^^^^^^^^^^^^^^^^^ FormulaAudit/Files: Incorrect file permissions (000): chmod +r #{filename}
|
^^^^^^^^^^^^^^^^^^^ FormulaAudit/Files: Incorrect file permissions (000): chmod a+r #{filename}
|
||||||
url "https://brew.sh/foo-1.0.tgz"
|
url "https://brew.sh/foo-1.0.tgz"
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user