Skip to content

Commit

Permalink
Rename CheckYardCoverage -> YardCoverage
Browse files Browse the repository at this point in the history
"Check" is redundant.
  • Loading branch information
sds committed Jul 17, 2018
1 parent 2851e86 commit 891b42b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ issue](https://github.com/brigade/overcommit/issues/238) for more details.
* [BundleOutdated](lib/overcommit/hook/pre_commit/bundle_outdated.rb)
* [`*`CaseConflicts](lib/overcommit/hook/pre_commit/case_conflicts.rb)
* [ChamberSecurity](lib/overcommit/hook/pre_commit/chamber_security.rb)
* [CheckYardCoverage](lib/overcommit/hook/pre_commit/check_yard_coverage.rb)
* [CoffeeLint](lib/overcommit/hook/pre_commit/coffee_lint.rb)
* [Credo](lib/overcommit/hook/pre_commit/credo.rb)
* [CssLint](lib/overcommit/hook/pre_commit/css_lint.rb)
Expand Down Expand Up @@ -556,6 +555,7 @@ issue](https://github.com/brigade/overcommit/issues/238) for more details.
* [XmlSyntax](lib/overcommit/hook/pre_commit/xml_syntax.rb)
* [YamlLint](lib/overcommit/hook/pre_commit/yaml_lint.rb)
* [YamlSyntax](lib/overcommit/hook/pre_commit/yaml_syntax.rb)
* [YardCoverage](lib/overcommit/hook/pre_commit/yard_coverage.rb)
* [YarnCheck](lib/overcommit/hook/pre_commit/yarn_check.rb)

### PrePush
Expand Down
22 changes: 11 additions & 11 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,6 @@ PreCommit:
install_command: 'gem install chamber'
include: *chamber_settings_files

CheckYardCoverage:
enabled: false
description: 'Checking for yard coverage'
command: ['yard', 'stats', '--list-undoc', '--compact']
flags: ['--private', '--protected']
required_executable: 'yard'
install_command: 'gem install yard'
min_coverage_percentage: 100
include:
- '/**/*.rb'

CoffeeLint:
enabled: false
description: 'Analyze with coffeelint'
Expand Down Expand Up @@ -816,6 +805,17 @@ PreCommit:
- '**/*.yaml'
- '**/*.yml'

YardCoverage:
enabled: false
description: 'Checking for yard coverage'
command: ['yard', 'stats', '--list-undoc', '--compact']
flags: ['--private', '--protected']
required_executable: 'yard'
install_command: 'gem install yard'
min_coverage_percentage: 100
include:
- '/**/*.rb'

YarnCheck:
enabled: false
description: 'Check yarn.lock dependencies'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
module Overcommit::Hook::PreCommit
# Class to check yard documentation coverage.
#
# Use option "min_coverage_percentage" in your CheckYardCoverage configuration
# Use option "min_coverage_percentage" in your YardCoverage configuration
# to set your desired documentation coverage percentage.
#
class CheckYardCoverage < Base
class YardCoverage < Base
def run
# Run a no-stats yard command to get the coverage
args = flags + applicable_files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe Overcommit::Hook::PreCommit::CheckYardCoverage do
describe Overcommit::Hook::PreCommit::YardCoverage do
let(:config) { Overcommit::ConfigurationLoader.default_configuration }
let(:context) { double('context') }
subject { described_class.new(config, context) }
Expand Down

0 comments on commit 891b42b

Please sign in to comment.