rubocops/text: Prefer lib/"string" over lib+"string"
#36284
Annotations
3 errors
|
|
|
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test/rubocops/text_spec.rb#L234
RuboCop::Cop::FormulaAudit::Text when auditing formula text reports an offense if `prefix + "bin"` is present
Failure/Error:
expect_offense(<<~RUBY)
class Foo < Formula
def install
ohai prefix + "bin"
^^^^^^^^^^^^^^ FormulaAudit/Text: Use `bin` instead of `prefix + "bin"`
end
end
RUBY
Diff:
@@ -1,6 +1,6 @@
class Foo < Formula
def install
ohai prefix + "bin"
- ^^^^^^^^^^^^^^ FormulaAudit/Text: Use `bin` instead of `prefix + "bin"`
+ ^^^^^^^^^^^^^^ FormulaAudit/Text: Use `prefix/"bin"` instead of `prefix + "bin"`
end
end
|
|
|
The logs for this run have expired and are no longer available.
Loading