Skip to content

Commit 68a000f

Browse files
committed
Rename Rubocop pre-commit hook to RuboCop
This is the correct name of the upstream project, so we should try to match it to reduce confusion.
1 parent 377aa74 commit 68a000f

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
`problem_on_unmodified_line` is set to something other than `report`
1717
* Fix handling of changing a symlink to a directory on commit amendment so it
1818
is not included in the list of modified files for pre-commit hooks
19+
* Rename `Rubocop` pre-commit hook to `RuboCop` to match the project's proper
20+
name
1921

2022
## 0.24.0
2123

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ to ignore. To prevent these errors from blocking your commit, you can include
110110
the name of the relevant hook in the `SKIP` environment variable, e.g.
111111

112112
```bash
113-
SKIP=rubocop git commit
113+
SKIP=RuboCop git commit
114114
```
115115

116116
Use this feature sparingly, as there is no point to having the hook in the first
@@ -155,7 +155,7 @@ configuration file:
155155

156156
```yaml
157157
PreCommit:
158-
Rubocop:
158+
RuboCop:
159159
enabled: true
160160
command: ['bundle', 'exec', 'rubocop'] # Invoke within Bundler context
161161
```
@@ -336,7 +336,7 @@ that you want to run before you allow a commit to even be created.
336336
* [Pyflakes](lib/overcommit/hook/pre_commit/pyflakes.rb)
337337
* [RailsSchemaUpToDate](lib/overcommit/hook/pre_commit/rails_schema_up_to_date.rb)
338338
* [Reek](lib/overcommit/hook/pre_commit/reek.rb)
339-
* [Rubocop](lib/overcommit/hook/pre_commit/rubocop.rb)
339+
* [RuboCop](lib/overcommit/hook/pre_commit/rubo_cop.rb)
340340
* [RubyLint](lib/overcommit/hook/pre_commit/ruby_lint.rb)
341341
* [Scalariform](lib/overcommit/hook/pre_commit/scalariform.rb)
342342
* [Scalastyle](lib/overcommit/hook/pre_commit/scalastyle.rb)

config/default.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@ PreCommit:
328328
- '**/Gemfile'
329329
- '**/Rakefile'
330330

331-
Rubocop:
331+
RuboCop:
332332
enabled: false
333-
description: 'Analyzing with Rubocop'
333+
description: 'Analyzing with RuboCop'
334334
required_executable: 'rubocop'
335335
flags: ['--format=emacs', '--force-exclusion', '--display-cop-names']
336336
install_command: 'gem install rubocop'

lib/overcommit/hook/pre_commit/rubocop.rb lib/overcommit/hook/pre_commit/rubo_cop.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Overcommit::Hook::PreCommit
22
# Runs `rubocop` against any modified Ruby files.
3-
class Rubocop < Base
3+
class RuboCop < Base
44
MESSAGE_TYPE_CATEGORIZER = lambda do |type|
55
type.include?('W') ? :warning : :error
66
end

spec/overcommit/hook/pre_commit/rubocop_spec.rb spec/overcommit/hook/pre_commit/rubo_cop_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'spec_helper'
22

3-
describe Overcommit::Hook::PreCommit::Rubocop do
3+
describe Overcommit::Hook::PreCommit::RuboCop do
44
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
55
let(:context) { double('context') }
66
subject { described_class.new(config, context) }

0 commit comments

Comments
 (0)