Class: Semverve::VersionChecks::Check
- Inherits:
-
Object
- Object
- Semverve::VersionChecks::Check
- Defined in:
- lib/semverve/version_checks.rb
Overview
Base behavior for check adapters. Public check objects must expose name, task_name, descriptions, labels, findings, and fix.
Direct Known Subclasses
CodeReferences, DocReferences, PackageMetadataCheck, RailsConfigMetadataCheck
Instance Method Summary collapse
-
#exact_target_fix_noop_notice? ⇒ Boolean
Whether findings should print a note when an exact target is already current.
-
#findings(_configuration, _current_version, include_ignored: false, target_version: nil) ⇒ Array
Finds mismatches.
-
#fix(_configuration, _current_version, target_version: nil) ⇒ #changed_files, #replacement_count
Fixes mismatches.
-
#fix_label ⇒ String
Label used when reporting replacement counts.
-
#targetable? ⇒ Boolean
Whether focused task accepts an exact target version argument.
-
#task_arguments ⇒ Array<Symbol>
Rake task argument names for the focused task.
Instance Method Details
#exact_target_fix_noop_notice? ⇒ Boolean
Whether findings should print a note when an exact target is already current.
135 136 137 |
# File 'lib/semverve/version_checks.rb', line 135 def exact_target_fix_noop_notice? false end |
#findings(_configuration, _current_version, include_ignored: false, target_version: nil) ⇒ Array
Finds mismatches.
159 160 161 |
# File 'lib/semverve/version_checks.rb', line 159 def findings(_configuration, _current_version, include_ignored: false, target_version: nil) raise NotImplementedError end |
#fix(_configuration, _current_version, target_version: nil) ⇒ #changed_files, #replacement_count
Fixes mismatches.
167 168 169 |
# File 'lib/semverve/version_checks.rb', line 167 def fix(_configuration, _current_version, target_version: nil) raise NotImplementedError end |
#fix_label ⇒ String
Label used when reporting replacement counts.
151 152 153 |
# File 'lib/semverve/version_checks.rb', line 151 def fix_label finding_label end |
#targetable? ⇒ Boolean
Whether focused task accepts an exact target version argument.
127 128 129 |
# File 'lib/semverve/version_checks.rb', line 127 def targetable? false end |
#task_arguments ⇒ Array<Symbol>
Rake task argument names for the focused task.
143 144 145 |
# File 'lib/semverve/version_checks.rb', line 143 def task_arguments targetable? ? [:version] : [] end |