Class: RemLint::Rules::TextAfterEofMarker

Inherits:
RemLint::Rule show all
Defined in:
lib/remlint/rules/text_after_eof_marker.rb

Overview

Commands below a line reading __EOF__.

Remind stops reading there and treats it as end of file (src/files.c: if (!strcmp(CurLine, "__EOF__"))). The match is exact -- the whole line, no leading or trailing space -- so this is decidable by looking at it.

The marker is a debugging convenience: drop it in, and everything below is temporarily switched off. The failure is leaving it in. What follows still looks like live configuration, still gets edited, and never runs again. Nothing in Remind's output distinguishes "this reminder did not trigger today" from "Remind never read this reminder at all".

Constant Summary collapse

MARKER =
"__EOF__"

Constants inherited from RemLint::Rule

RemLint::Rule::REGISTRY

Instance Attribute Summary

Attributes inherited from RemLint::Rule

#config, #document, #offenses

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_severityObject



22
23
24
# File 'lib/remlint/rules/text_after_eof_marker.rb', line 22

def self.default_severity
  "warning"
end

.descriptionObject



26
27
28
# File 'lib/remlint/rules/text_after_eof_marker.rb', line 26

def self.description
  "Commands below a __EOF__ marker, which Remind never reads."
end

Instance Method Details

#checkObject



30
31
32
33
34
35
36
# File 'lib/remlint/rules/text_after_eof_marker.rb', line 30

def check
  marker = marker_line

  if marker
    report(marker)
  end
end