diff -r 67563f72d36b -r 9c47ccc9e9b5 reports/Builder__Report.st --- a/reports/Builder__Report.st Mon Jun 28 13:41:53 2021 +0100 +++ b/reports/Builder__Report.st Fri Dec 03 13:24:20 2021 +0000 @@ -1,3 +1,6 @@ +" +COPYRIGHT (c) 2021 LabWare +" "{ Package: 'stx:goodies/builder/reports' }" "{ NameSpace: Builder }" @@ -9,6 +12,14 @@ category:'Builder-Reports' ! +!Report class methodsFor:'documentation'! + +copyright +" +COPYRIGHT (c) 2021 LabWare + +" +! ! !Report class methodsFor:'initialization'! @@ -296,9 +307,7 @@ ! loadPackageIfNotAlready: pkg - "Loads a package, if it is not loaded already. - Raises an error if package cannot be loaded" - + "Loads a package, if it is not loaded already." | def | def := ProjectDefinition definitionClassForPackage:pkg. def isNil ifTrue:[ @@ -307,9 +316,6 @@ ]. def := ProjectDefinition definitionClassForPackage:pkg. ]. - def isNil ifTrue:[ - self error:'Package loaded but project definition not found: ', pkg. - ]. "Created: / 13-01-2012 / 12:56:48 / Jan Vrany " ! ! @@ -317,15 +323,20 @@ !Report methodsFor:'running'! run + | status | self setUp. format writeHeader. - [ self runReport ] ensure:[ + [ + status := self runReport + ] ensure:[ format writeFooter. self tearDown. - ] + ]. + ^ status "return exit code" "Modified: / 04-08-2011 / 12:42:32 / Jan Vrany " + "Modified: / 03-12-2021 / 13:12:26 / Jan Vrany " ! runClasses:classes named:aString @@ -360,11 +371,17 @@ runReport "Actually run the report. What to do (what classes/packages to check) - must be stored instance variables" + must be stored instance variables before calling this method. + + Return an exit code (a zero when everything went fine, non-zero + in case of some erorr, failure). This exit code is used as program + exit code when running from command line. + " ^ self subclassResponsibility "Created: / 04-08-2011 / 12:39:43 / Jan Vrany " + "Modified (comment): / 03-12-2021 / 13:09:31 / Jan Vrany " ! setUp