Skip to content

Commit 891b42b

Browse files
committed
Rename CheckYardCoverage -> YardCoverage
"Check" is redundant.
1 parent 2851e86 commit 891b42b

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ issue](https://github.com/brigade/overcommit/issues/238) for more details.
487487
* [BundleOutdated](lib/overcommit/hook/pre_commit/bundle_outdated.rb)
488488
* [`*`CaseConflicts](lib/overcommit/hook/pre_commit/case_conflicts.rb)
489489
* [ChamberSecurity](lib/overcommit/hook/pre_commit/chamber_security.rb)
490-
* [CheckYardCoverage](lib/overcommit/hook/pre_commit/check_yard_coverage.rb)
491490
* [CoffeeLint](lib/overcommit/hook/pre_commit/coffee_lint.rb)
492491
* [Credo](lib/overcommit/hook/pre_commit/credo.rb)
493492
* [CssLint](lib/overcommit/hook/pre_commit/css_lint.rb)
@@ -556,6 +555,7 @@ issue](https://github.com/brigade/overcommit/issues/238) for more details.
556555
* [XmlSyntax](lib/overcommit/hook/pre_commit/xml_syntax.rb)
557556
* [YamlLint](lib/overcommit/hook/pre_commit/yaml_lint.rb)
558557
* [YamlSyntax](lib/overcommit/hook/pre_commit/yaml_syntax.rb)
558+
* [YardCoverage](lib/overcommit/hook/pre_commit/yard_coverage.rb)
559559
* [YarnCheck](lib/overcommit/hook/pre_commit/yarn_check.rb)
560560

561561
### PrePush

config/default.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,6 @@ PreCommit:
222222
install_command: 'gem install chamber'
223223
include: *chamber_settings_files
224224

225-
CheckYardCoverage:
226-
enabled: false
227-
description: 'Checking for yard coverage'
228-
command: ['yard', 'stats', '--list-undoc', '--compact']
229-
flags: ['--private', '--protected']
230-
required_executable: 'yard'
231-
install_command: 'gem install yard'
232-
min_coverage_percentage: 100
233-
include:
234-
- '/**/*.rb'
235-
236225
CoffeeLint:
237226
enabled: false
238227
description: 'Analyze with coffeelint'
@@ -816,6 +805,17 @@ PreCommit:
816805
- '**/*.yaml'
817806
- '**/*.yml'
818807

808+
YardCoverage:
809+
enabled: false
810+
description: 'Checking for yard coverage'
811+
command: ['yard', 'stats', '--list-undoc', '--compact']
812+
flags: ['--private', '--protected']
813+
required_executable: 'yard'
814+
install_command: 'gem install yard'
815+
min_coverage_percentage: 100
816+
include:
817+
- '/**/*.rb'
818+
819819
YarnCheck:
820820
enabled: false
821821
description: 'Check yarn.lock dependencies'

lib/overcommit/hook/pre_commit/check_yard_coverage.rb lib/overcommit/hook/pre_commit/yard_coverage.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
module Overcommit::Hook::PreCommit
33
# Class to check yard documentation coverage.
44
#
5-
# Use option "min_coverage_percentage" in your CheckYardCoverage configuration
5+
# Use option "min_coverage_percentage" in your YardCoverage configuration
66
# to set your desired documentation coverage percentage.
77
#
8-
class CheckYardCoverage < Base
8+
class YardCoverage < Base
99
def run
1010
# Run a no-stats yard command to get the coverage
1111
args = flags + applicable_files

spec/overcommit/hook/pre_commit/check_yard_coverage_spec.rb spec/overcommit/hook/pre_commit/yard_coverage_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::CheckYardCoverage do
3+
describe Overcommit::Hook::PreCommit::YardCoverage 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)