-
由 Peter Leitzen 创作于
The major changes here are: 1. Inherit from `RuboCop::Cop::Base`, not `RuboCop::Cop::Cop`. 2. New auto-correction style - `extend RuboCop::Cop::AutoCorrector`, pass a block to `add_offense` rather than defining an `autocorrect` method. 3. `add_offense` no longer takes a `location` keyword argument. 4. Specs should not set `subject(:cop)` as that will be done automatically, and will use the config correctly.
由 Peter Leitzen 创作于The major changes here are: 1. Inherit from `RuboCop::Cop::Base`, not `RuboCop::Cop::Cop`. 2. New auto-correction style - `extend RuboCop::Cop::AutoCorrector`, pass a block to `add_offense` rather than defining an `autocorrect` method. 3. `add_offense` no longer takes a `location` keyword argument. 4. Specs should not set `subject(:cop)` as that will be done automatically, and will use the config correctly.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。