Class: RemLint::Rules::BannerPlacement
- Inherits:
-
RemLint::Rule
- Object
- RemLint::Rule
- RemLint::Rules::BannerPlacement
- Defined in:
- lib/remlint/rules/banner_placement.rb
Overview
BANNER written more than once, or below the reminders it appears above.
BANNER sets the line Remind prints before the day's reminders, and
there is one of them. A second BANNER silently replaces the first, and
one written below a REM reads as though it applied to the reminders
above it when it applies to all of them equally.
Neither is an error. The first is a line of configuration that does nothing; the second is a line that does something other than where it sits suggests.
Constant Summary
Constants inherited from RemLint::Rule
Instance Attribute Summary
Attributes inherited from RemLint::Rule
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from RemLint::Rule
all, enabled_by_default?, find, inherited, #initialize, rule_name, #rule_name, #run
Constructor Details
This class inherits a constructor from RemLint::Rule
Class Method Details
.default_severity ⇒ Object
18 19 20 |
# File 'lib/remlint/rules/banner_placement.rb', line 18 def self.default_severity "warning" end |
.description ⇒ Object
22 23 24 |
# File 'lib/remlint/rules/banner_placement.rb', line 22 def self.description "A second BANNER, or a BANNER written below the first reminder." end |
Instance Method Details
#check ⇒ Object
26 27 28 29 30 31 |
# File 'lib/remlint/rules/banner_placement.rb', line 26 def check = document.code_commands.select { |command| command.keyword?("BANNER") } report_duplicates() report_late(.first) end |