【发布时间】:2016-11-18 01:30:57
【问题描述】:
查看旧的 Rubocop 配置:
...
Style/AlignParameters:
Description: Align the parameters of a method call if they span more than one line.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
Enabled: true
EnforcedStyle: with_first_parameter
SupportedStyles:
- with_first_parameter
- with_fixed_indentation
...
Rubocop 网站上的default settings 如下所示:
...
Style/AlignParameters:
Description: >-
Align the parameters of a method call if they span more
than one line.
StyleGuide: '#no-double-indent'
Enabled: true
...
试图找出旧样式是否已过时?,已弃用?还是有效?
我可以see SupportedStyles 有这两个选项可用。在第一个示例中指定它们只是重申默认行为的一种方式,还是选择这两个选项的语句?
换句话说,如果我们要从我的 rubocop.yml 中删除 Style/AlignParameters 部分(或其中的一部分),我应该期待默认行为还是会跳过它?
【问题讨论】: