Commit Graph

11 Commits

Author SHA1 Message Date
Jean Boussier
c91c266872 Enable Style/ExplicitBlockArgument cop
This reduce the stack size which is beneficial for
exceptions performance.

See: https://gist.github.com/byroot/cb3bcadcc3701c2518d002fb8d3a4e7a

However the cop is unsafe because it might change the block arity,
so it can run into some false positives.
2021-09-05 17:06:19 +02:00
Ryuta Kamizono
c81af6ae72 Enable Layout/EmptyLinesAroundAccessModifier cop
We sometimes say "✂️ newline after `private`" in a code review (e.g.
https://github.com/rails/rails/pull/18546#discussion_r23188776,
https://github.com/rails/rails/pull/34832#discussion_r244847195).

Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style
`EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059).

That cop and enforced style will reduce the our code review cost.
2019-06-13 12:00:45 +09:00
Pat Allan
acea68de02 Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
783763bde9 applies new string literal convention in railties/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:16:09 +02:00
Jeremy Kemper
5154089c18 Revert "Merge pull request #19404 from dmathieu/remove_rack_env"
Preserving RACK_ENV behavior.

This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing
changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
2015-03-20 08:14:11 -07:00
Damien Mathieu
d578cbfb5c don't fallback to RACK_ENV when RAILS_ENV is not present 2015-03-19 10:06:28 +01:00
Marc Schütz
16c0023a9a Make logging to stdout work again with implicit development env 2013-10-13 19:21:18 +02:00
Carlos Antonio da Silva
5a8f25f003 Refactor tests that switch RAILS_ENV and RACK_ENV
This cleanup aims to fix a build failure:
https://travis-ci.org/rails/rails/jobs/3515951/#L482

Since travis always have both ENV vars set to "test", a test is failing
where it's expected to output the default env "development", but "test"
is the result due to RACK_ENV being set when we expect it to not be.

By cleaning this duplication we ensure that changing any of these env
variables will pick the right expected value.
2012-12-06 10:47:14 -02:00