Module: Wool
- Defined in:
- lib/wool.rb,
lib/wool.rb,
lib/wool/runner.rb,
lib/wool/scanner.rb,
lib/wool/warning.rb,
lib/wool/rake/task.rb,
lib/wool/advice/advice.rb,
lib/wool/analysis/scope.rb,
lib/wool/analysis/symbol.rb,
lib/wool/analysis/visitor.rb,
lib/wool/analysis/protocols.rb,
lib/wool/analysis/signature.rb,
lib/wool/analysis/wool_class.rb,
lib/wool/analysis/annotations.rb,
lib/wool/warnings/line_length.rb,
lib/wool/advice/comment_advice.rb,
lib/wool/analysis/sexp_analysis.rb,
lib/wool/analysis/lexical_analysis.rb,
lib/wool/support/module_extensions.rb,
lib/wool/analysis/protocol_registry.rb,
lib/wool/analysis/annotations/next_annotation.rb,
lib/wool/analysis/annotations/scope_annotation.rb,
lib/wool/analysis/annotations/parent_annotation.rb
Defined Under Namespace
Modules: Advice, LexicalAnalysis, ModuleExtensions, Rake, SexpAnalysis
Classes: ExtraBlankLinesWarning, ExtraWhitespaceWarning, FileWarning, GenericLineLengthWarning, InlineCommentSpaceWarning, LineWarning, MisalignedUnindentationWarning, OperatorSpacing, RescueExceptionWarning, Runner, Scanner, SemicolonWarning, UselessDoubleQuotesWarning, Warning
Constant Summary
collapse
- VERSION =
"0.5.0"
Class Method Summary
collapse
Class Method Details
.initialize_global_scope ⇒ Object
MOVE THIS TODO(adgar): move this to someplace effing sensible
.LineLengthCustomSeverity(size, severity) ⇒ Object
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# File 'lib/wool/warnings/line_length.rb', line 91
def LineLengthCustomSeverity(size, severity)
Wool.class_eval do
if const_defined?("GenericLineLengthWarning_#{size}_#{severity}")
return const_get("GenericLineLengthWarning_#{size}_#{severity}")
end
new_warning = Class.new(Wool::GenericLineLengthWarning)
const_set("GenericLineLengthWarning_#{size}_#{severity}", new_warning)
new_warning.line_length_limit = size
new_warning.severity = severity
new_warning.desc = Wool::GenericLineLengthWarning.desc
new_warning
end
end
|
.LineLengthMaximum(size) ⇒ Object
105
106
107
|
# File 'lib/wool/warnings/line_length.rb', line 105
def LineLengthMaximum(size)
(@table ||= {})[size] ||= LineLengthCustomSeverity(size, 8)
end
|
.LineLengthWarning(size) ⇒ Object
109
110
111
|
# File 'lib/wool/warnings/line_length.rb', line 109
def LineLengthWarning(size)
(@table ||= {})[size] ||= LineLengthCustomSeverity(size, 3)
end
|