reports/Builder__LintReportFormat.st
changeset 253 0b7dd037aeb2
parent 66 7d2a9fc67612
child 266 2ca2606e89e8
equal deleted inserted replaced
252:0543437ef38a 253:0b7dd037aeb2
    31     ^self == LintReportFormat
    31     ^self == LintReportFormat
    32 
    32 
    33     "Created: / 04-08-2011 / 11:44:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    33     "Created: / 04-08-2011 / 11:44:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    34 ! !
    34 ! !
    35 
    35 
       
    36 !LintReportFormat methodsFor:'writing'!
       
    37 
       
    38 writeSource: source to: sourceFilename
       
    39     (report outputDirectory / sourceFilename) writingFileDo:[ :s |
       
    40         source fileOutOn: s
       
    41     ].
       
    42 
       
    43     "Created: / 07-10-2011 / 10:19:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    44     "Modified: / 15-12-2014 / 11:19:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    45 ! !
       
    46 
    36 !LintReportFormat::CheckStyle class methodsFor:'accessing'!
    47 !LintReportFormat::CheckStyle class methodsFor:'accessing'!
    37 
    48 
    38 symbolicNames
    49 symbolicNames
    39     "Returns a collection of symbolic names for this format"
    50     "Returns a collection of symbolic names for this format"
    40 
    51 
    76 
    87 
    77     stream nextPutAll: '<?xml version="1.0" encoding="UTF-8"?>'; nextPut: Character lf.
    88     stream nextPutAll: '<?xml version="1.0" encoding="UTF-8"?>'; nextPut: Character lf.
    78     stream nextPutAll: '<checkstyle version="5.4">'; nextPut: Character lf.
    89     stream nextPutAll: '<checkstyle version="5.4">'; nextPut: Character lf.
    79 
    90 
    80     "Modified: / 06-10-2011 / 23:50:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    91     "Modified: / 06-10-2011 / 23:50:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    81 !
       
    82 
       
    83 writeSource: source to: sourceFilename
       
    84 
       
    85     | sourceFile sourceStream |
       
    86 
       
    87     sourceFile := report outputDirectory / sourceFilename.
       
    88     [
       
    89         sourceStream := sourceFile writeStream.
       
    90         sourceStream nextPutAll: source
       
    91     ] ensure:[
       
    92         sourceStream notNil ifTrue:[
       
    93             sourceStream close.
       
    94         ]
       
    95     ]
       
    96 
       
    97     "Created: / 07-10-2011 / 10:19:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    98 !
    92 !
    99 
    93 
   100 writeViolation:rule class: aClass selector: aSelector startLine:line column:column stopLine:lineStop column:columnStop
    94 writeViolation:rule class: aClass selector: aSelector startLine:line column:column stopLine:lineStop column:columnStop
   101 
    95 
   102     | severity |
    96     | severity |
   164         nextPut: Character lf.
   158         nextPut: Character lf.
   165 
   159 
   166     "Modified: / 25-11-2011 / 19:39:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   160     "Modified: / 25-11-2011 / 19:39:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   167 !
   161 !
   168 
   162 
   169 writeSource: source to: sourceFilename
       
   170 
       
   171     | sourceFile sourceStream |
       
   172 
       
   173     sourceFile := report outputDirectory / sourceFilename.
       
   174     [
       
   175         sourceStream := sourceFile writeStream.
       
   176         sourceStream nextPutAll: source
       
   177     ] ensure:[
       
   178         sourceStream notNil ifTrue:[
       
   179             sourceStream close.
       
   180         ]
       
   181     ]
       
   182 
       
   183     "Created: / 07-10-2011 / 10:19:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   184 !
       
   185 
       
   186 writeViolation:rule class: aClass selector: aSelector startLine:beginLine column:beginColumn stopLine:endLine column:endColumn
   163 writeViolation:rule class: aClass selector: aSelector startLine:beginLine column:beginColumn stopLine:endLine column:endColumn
   187 
   164 
   188     | priority |
   165     | priority |
   189 
   166 
   190     rule severity = #information ifTrue:[
   167     rule severity = #information ifTrue:[
   231 version_CVS
   208 version_CVS
   232     ^ '$Header$'
   209     ^ '$Header$'
   233 !
   210 !
   234 
   211 
   235 version_SVN
   212 version_SVN
   236     ^ '§Id: Builder__LintReportFormat.st 294 2011-11-27 11:08:02Z vranyj1 §'
   213     ^ '$Id$'
   237 ! !
   214 ! !
       
   215