mirror of
https://github.com/david942j/one_gadget.git
synced 2026-10-11 22:09:54 +00:00
#436 gave every public method a @param for each parameter and a @return. Nothing kept it that way: a new architecture arrives with a dozen inst_* overrides, and the next one to land bare would land unnoticed. doc:untagged reads the same registry `doc` builds and names what a method leaves unsaid. Two things it deliberately does not report: an attribute, which is documented once by the @return on its reader, and a block, which @yield tags describe. A keyword or splat parameter is named as a @param names it, without the colon or the stars, or every method taking **options would read as undocumented. YARD supplies some of these itself -- a @return [Boolean] for a predicate, a constructor's return -- and the check takes them as given rather than asking for what a reader already sees.
28 lines
939 B
Ruby
28 lines
939 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'bundler/gem_tasks'
|
|
require 'rspec/core/rake_task'
|
|
require 'rubocop/rake_task'
|
|
|
|
import 'tasks/aletheia.rake'
|
|
import 'tasks/builds/audit.rake'
|
|
import 'tasks/builds/check.rake'
|
|
import 'tasks/builds/generate.rake'
|
|
import 'tasks/builds/list.rake'
|
|
import 'tasks/builds/refresh.rake'
|
|
import 'tasks/doc.rake'
|
|
import 'tasks/readme.rake'
|
|
|
|
task default: %i[readme rubocop doc doc:orphans doc:untagged spec builds:list builds:audit builds:check]
|
|
|
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
task.patterns = ['lib/**/*.rb', 'spec/**/*.rb', 'bin/*', 'tasks/**/*.rake', 'aletheia/**/*.rb', 'aletheia/bin/*']
|
|
task.options += ['--force-exclusion', 'lib/one_gadget/builds/*.rb']
|
|
end
|
|
|
|
RSpec::Core::RakeTask.new(:spec) do |task|
|
|
# The harness's own unit specs run with the suite; +.rspec+ says the same for a
|
|
# bare +rspec+, which this task does not read.
|
|
task.pattern = '{spec,aletheia/spec}/**/*_spec.rb'
|
|
end
|