diff -r 26775417f337 -r d7f87303b984 reports/Builder__LintReport.st --- a/reports/Builder__LintReport.st Thu Feb 21 19:14:15 2013 +0100 +++ b/reports/Builder__LintReport.st Fri Mar 01 10:42:50 2013 +0100 @@ -45,6 +45,22 @@ "Created: / 13-01-2012 / 12:43:07 / Jan Vrany " ! ! +!LintReport methodsFor:'command line options'! + +cmdlineOptionRuleset + + ^CmdLineOption new + short: $s; + long: 'ruleset'; + description: 'Rule set '; + action:[:option | + self setupRulesFrom: option. + ]; + yourself + + "Created: / 28-02-2013 / 23:13:57 / Jan Vrany " +! ! + !LintReport methodsFor:'generating'! generateClass: aClass @@ -208,10 +224,25 @@ setUp super setUp. - rules := (RBCompositeLintRule rulesFor: RBBasicLintRule) - reject: [ :each | each class name endsWith: 'SpellingRule' ] + rules isNil ifTrue:[ + rules := (RBCompositeLintRule rulesFor: RBBasicLintRule) + reject: [ :each | each class name endsWith: 'SpellingRule' ] + ]. "Created: / 04-08-2011 / 14:35:27 / Jan Vrany " + "Modified: / 28-02-2013 / 23:18:57 / Jan Vrany " +! + +setupRulesFrom: filename + | file | + file := filename asFilename. + file readingFileDo:[:s| + | spec | + spec := Parser parseLiteralArray: s. + rules := spec decodeAsLiteralArray rules. + ] + + "Created: / 28-02-2013 / 23:17:41 / Jan Vrany " ! ! !LintReport methodsFor:'testing'! @@ -238,4 +269,5 @@ ^ '§Id: Builder__LintReport.st 293 2011-11-25 21:42:31Z vranyj1 §' ! ! + LintReport initialize!