reports/Builder__LintReport.st
changeset 117 d7f87303b984
parent 84 77e12dbe97d3
child 118 7e93ef8c5417
equal deleted inserted replaced
116:26775417f337 117:d7f87303b984
    41     environment isNil ifTrue:[^super defaultName].
    41     environment isNil ifTrue:[^super defaultName].
    42     ^environment label
    42     ^environment label
    43 
    43 
    44     "Modified: / 25-11-2011 / 22:06:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    44     "Modified: / 25-11-2011 / 22:06:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    45     "Created: / 13-01-2012 / 12:43:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    45     "Created: / 13-01-2012 / 12:43:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    46 ! !
       
    47 
       
    48 !LintReport methodsFor:'command line options'!
       
    49 
       
    50 cmdlineOptionRuleset
       
    51 
       
    52     ^CmdLineOption new
       
    53         short: $s;
       
    54         long: 'ruleset';
       
    55         description: 'Rule set ';
       
    56         action:[:option |
       
    57             self setupRulesFrom: option.
       
    58         ];
       
    59         yourself
       
    60 
       
    61     "Created: / 28-02-2013 / 23:13:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    46 ! !
    62 ! !
    47 
    63 
    48 !LintReport methodsFor:'generating'!
    64 !LintReport methodsFor:'generating'!
    49 
    65 
    50 generateClass: aClass
    66 generateClass: aClass
   206 !
   222 !
   207 
   223 
   208 setUp
   224 setUp
   209 
   225 
   210     super setUp.
   226     super setUp.
   211     rules := (RBCompositeLintRule rulesFor: RBBasicLintRule)
   227     rules isNil ifTrue:[
   212                 reject: [ :each | each class name endsWith: 'SpellingRule' ]
   228         rules := (RBCompositeLintRule rulesFor: RBBasicLintRule)
       
   229                  reject: [ :each | each class name endsWith: 'SpellingRule' ]
       
   230     ].
   213 
   231 
   214     "Created: / 04-08-2011 / 14:35:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   232     "Created: / 04-08-2011 / 14:35:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   233     "Modified: / 28-02-2013 / 23:18:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   234 !
       
   235 
       
   236 setupRulesFrom: filename
       
   237     | file |    
       
   238     file := filename asFilename.
       
   239     file readingFileDo:[:s|
       
   240         | spec |
       
   241         spec := Parser parseLiteralArray: s.
       
   242         rules := spec decodeAsLiteralArray rules.
       
   243     ]
       
   244 
       
   245     "Created: / 28-02-2013 / 23:17:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   215 ! !
   246 ! !
   216 
   247 
   217 !LintReport methodsFor:'testing'!
   248 !LintReport methodsFor:'testing'!
   218 
   249 
   219 isClassEnvironment: anEnvironment
   250 isClassEnvironment: anEnvironment
   236 
   267 
   237 version_SVN
   268 version_SVN
   238     ^ '§Id: Builder__LintReport.st 293 2011-11-25 21:42:31Z vranyj1 §'
   269     ^ '§Id: Builder__LintReport.st 293 2011-11-25 21:42:31Z vranyj1 §'
   239 ! !
   270 ! !
   240 
   271 
       
   272 
   241 LintReport initialize!
   273 LintReport initialize!