Class: Hanamismith::Builders::Reek
- Inherits:
-
Rubysmith::Builders::Reek
- Object
- Rubysmith::Builders::Reek
- Hanamismith::Builders::Reek
- Defined in:
- lib/hanamismith/builders/reek.rb
Overview
Builds project skeleton Reek code quality support.
Instance Method Summary collapse
- #add_duplicate_exclusion ⇒ Object
- #add_too_many_statements_exclusion ⇒ Object
- #call ⇒ Object
- #with_template ⇒ Object
Instance Method Details
#add_duplicate_exclusion ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/hanamismith/builders/reek.rb', line 20 def add_duplicate_exclusion with_template.insert_before( /LongParameterList:\n/, <<~DETECTORS.gsub(/^/, " ") DuplicateMethodCall: exclude: - UniversalLoggerPatch#_log_structured DETECTORS ) end |
#add_too_many_statements_exclusion ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hanamismith/builders/reek.rb', line 31 def add_too_many_statements_exclusion with_template.insert_after( /enabled:\sfalse\n/, <<~DETECTORS.gsub(/^/, " ") TooManyStatements: exclude: - UniversalLoggerPatch#_log_structured DETECTORS ) end |
#call ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/hanamismith/builders/reek.rb', line 11 def call return false unless settings.build_reek super add_duplicate_exclusion add_too_many_statements_exclusion true end |
#with_template ⇒ Object
42 43 44 |
# File 'lib/hanamismith/builders/reek.rb', line 42 def with_template builder.call settings.with(template_path: "%project_name%/.reek.yml.erb") end |