Module: DevDoc::Test::BestPracticeLints
- Defined in:
- lib/dev_doc/test/best_practice_lints.rb
Overview
Aggregator that pulls in every dev-doc best-practice lint as a set of Minitest ‘test_*` methods. Include this in a single test class in each project; new lints added here automatically apply to all consuming projects on the next `bundle update`.
Per-project integration (one file, never needs editing):
# test/linters/best_practice_lints_test.rb
require 'dev_doc/test/best_practice_lints'
class BestPracticeLintsTest < ActiveSupport::TestCase
include DevDoc::Test::BestPracticeLints
end
To opt out of a specific lint in a project, redefine the offending ‘test_*` method in that test class as a `skip ’reason’‘.
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
24 25 26 27 28 |
# File 'lib/dev_doc/test/best_practice_lints.rb', line 24 def self.included(base) base.include Lints::CronSchedule base.include Lints::DuplicateSnapshot base.include Lints::NoFileExcludes end |