Use FrozenStringLiteralComment instead of flag.
Unfortunately we cannot use `--frozen-string-literal` with Ruby 2.3 due to https://bugs.ruby-lang.org/issues/12031 and our usage of ERB.
This commit is contained in:
parent
e68fc530c0
commit
f76b083b91
@ -93,8 +93,7 @@ Style/ConditionalAssignment:
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
|
||||
# we want to add this slowly and manually
|
||||
# TODO: add to more files
|
||||
# don't want this for formulae but re-enabled for Library/Homebrew
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: false
|
||||
|
||||
|
@ -117,6 +117,11 @@ Style/DocumentationMethod:
|
||||
Include:
|
||||
- 'Library/Homebrew/formula.rb'
|
||||
|
||||
# don't want this for formulae but re-enabled for Library/Homebrew
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: true
|
||||
EnforcedStyle: always
|
||||
|
||||
# so many of these in formulae but none in here
|
||||
Style/GuardClause:
|
||||
Enabled: true
|
||||
|
@ -348,9 +348,6 @@ else
|
||||
RUBY_DISABLE_OPTIONS="--disable=gems,rubyopt"
|
||||
fi
|
||||
|
||||
# Don't set this for anyone (yet)
|
||||
unset HOMEBREW_FROZEN_STRING_LITERAL
|
||||
|
||||
if [[ -z "$HOMEBREW_RUBY_WARNINGS" ]]
|
||||
then
|
||||
export HOMEBREW_RUBY_WARNINGS="-W0"
|
||||
@ -502,5 +499,5 @@ else
|
||||
|
||||
# Unshift command back into argument list (unless argument list was empty).
|
||||
[[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@"
|
||||
{ update-preinstall "$@"; exec "$HOMEBREW_RUBY_PATH" $HOMEBREW_FROZEN_STRING_LITERAL $HOMEBREW_RUBY_WARNINGS "$RUBY_DISABLE_OPTIONS" "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; }
|
||||
{ update-preinstall "$@"; exec "$HOMEBREW_RUBY_PATH" $HOMEBREW_RUBY_WARNINGS "$RUBY_DISABLE_OPTIONS" "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; }
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user