Class: RemLint::Rules::InfoSubstitutionWithoutHeader
- Inherits:
-
RemLint::Rule
- Object
- RemLint::Rule
- RemLint::Rules::InfoSubstitutionWithoutHeader
- Defined in:
- lib/remlint/rules/info_substitution_without_header.rb
Overview
%<Header> with no matching INFO on the same command.
FindTrigInfo returns NULL and dosubst.c ships nothing at all, so the
substitution expands to the empty string. The reminder then reads
Meeting at and looks like a truncation bug somewhere else entirely.
INFO headers are per-command, so this is decidable from one line: the
headers a command carries and the headers its body asks for are both
right there. Matching is case-insensitive, because Remind's header
lookup is.
Constant Summary collapse
- INFO_HEADER =
INFO "Header: value"-- the argument is a quoted string whose header runs up to the first colon. /\A["'](?<header>[^:"']+):/- REFERENCE =
/%<(?<header>[^>]*)>/
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
24 25 26 |
# File 'lib/remlint/rules/info_substitution_without_header.rb', line 24 def self.default_severity "warning" end |
.description ⇒ Object
28 29 30 |
# File 'lib/remlint/rules/info_substitution_without_header.rb', line 28 def self.description "A %<Header> substitution with no INFO clause of that name on the command." end |
Instance Method Details
#check ⇒ Object
32 33 34 35 36 |
# File 'lib/remlint/rules/info_substitution_without_header.rb', line 32 def check document.code_commands.each do |command| check_command(command) end end |