<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
&nbsp;&nbsp;&nbsp; I uploaded to Squeak Map a package to deal with the SmallLint
failures. The package name is: <a
 href="http://map.squeak.org/accountbyid/ce6957eb-c5ff-4a6e-a575-a1467238905e/package/25c17dc0-bf31-4215-8ba9-bf0df8157449">Small
Lint Failure</a><br>
&nbsp;&nbsp;&nbsp; The idea of this module is to declare smalllint failures as
expected, so when SmallLint is run again, the expected failures will
not appear.<br>
&nbsp;&nbsp;&nbsp; For example, let's say that there is a long method in
ClassA&gt;&gt;method1. If SmallLint is ran, it will detect that error
(long method) and it will report it. But suppose that the method, for
some reason, can not be refactored in smaller ones... the next time
SmallLint is run, it will report the same error even though you know it
is not.<br>
&nbsp;&nbsp;&nbsp; The problem with this behavior is that the programmer gets tired of
this "expected" smalllint failures and he will stop running SmallLint
because of that.... SmallLint it is not prepared to be run
continuously, in an automatic process because this expected failures
will pop up.<br>
&nbsp;&nbsp;&nbsp;&nbsp; This module let's the programmer declare this expected failures so
they are not reported when SmallLint is run. To declare this "expected"
long method failure, it is very simple as it is shown below:<br>
<br>
&nbsp;&nbsp;&nbsp; ClassA class&gt;&gt;expectedSmallLintFailures<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; "Each class that has expected SmallLint failures has to declared
this method which returns a collection of expected failures"<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ^Array with: (ExpectedSmallLintFailure <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; longMethodsFailedClass: self<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; failedMethod: 'method1' asSymbol<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; reasonDescription: 'The method can not be refactored in
smaller ones'<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; definedBy: 'Hernan')<br>
<br>
&nbsp;&nbsp;&nbsp; As you can see in the example, an ExpectedSmallLintFailure is
created for the longMethods failure. The failure is for ClassA (self),
the failedMethod: is #method1 (see that I wrote 'method1' asSymbol
because I don't want to have references to #method1 because SmallLint
will treat it as a sender when it is not), the reason because it is
declare as expected is that the method can not be refactored and Hernan
(me) declared it. <br>
&nbsp;&nbsp;&nbsp; This module helps the programmer to treat this smalllint failures,
but it also allows the programmer to document the reason of the failure.<br>
&nbsp;&nbsp;&nbsp; For each smallLint failure, there is a message to create it in the
class ExpectedSmallLintFailure. The module has a test for each failure
so you can see how it works also.<br>
<p>&nbsp;&nbsp;&nbsp; To be able to run it from the refactoring browser, the following
methods have to be changed:<br>
RefactoringBrowser&gt;&gt;addClassSubMenuTo: aMenu <br>
"Added to to support the small lint failure model"<br>
lintSubMenu<br>
addLine;<br>
add: 'expected failures on class...' translated action:
#expectedSmallLintOnClass;<br>
add: 'expected failures on class category...' translated action:
#expectedSmallLintOnClassCategory;<br>
add: 'expected failures on class hierarchy...' translated action:
#expectedSmallLintOnClassHierarchy.<br>
pkg ifNotNil: [lintSubMenu add: 'expected failures on package...'
translated action: #expectedSmallLintOnPackageWithClassCategory].<br>
"End of small lint failure model support"
</p>
<p>
RefactoringBrowser&gt;&gt;systemCategoryMenu: aMenu <br>
"Added to integrate the browser with the small lint failures model -
Hernan" <br>
lintSubMenu<br>
addLine;<br>
add: 'expected failures on class category...' translated action:
#expectedSmallLintOnClassCategory;<br>
add: 'expected failures on package...' translated action:
#expectedSmallLintOnPackageWithClassCategory.<br>
"End of addition"<br>
<br>
</p>
&nbsp;&nbsp;&nbsp; Well, I hope you will enjoy it!. We use it at work in our
integration process and it is very helpful. We don't do it with all the
modules, but with those we mark as "stable". Having no smalllint
failure give us a lot of confidence in our code, like the unit test do.<br>
<br>
&nbsp;&nbsp;&nbsp; Hernan.<br>
<br>
<pre class="moz-signature" cols="72">-- 
______________________________
Lic. Hern&aacute;n A. Wilkinson
Gerente de Desarrollo y Tecnolog&iacute;a
Mercap S.R.L.
Tacuari 202 - 7mo Piso - Tel: 54-11-4878-1118
Buenos Aires - Argentina
<a class="moz-txt-link-freetext" href="http://www.mercapsoftware.com">http://www.mercapsoftware.com</a>
--------------------------------------------------------------------- 
Este mensaje es confidencial. Puede contener informacion amparada 
por el secreto profesional. Si usted ha recibido este e-mail por error, 
por favor comuniquenoslo inmediatamente via e-mail y tenga la 
amabilidad de eliminarlo de su sistema; no debera copiar el mensaje 
ni divulgar su contenido a ninguna persona. Muchas gracias. 
 
This message is confidential. It may also contain information that is 
privileged or otherwise legally exempt from disclosure. If you have 
received it by mistake please let us know by e-mail immediately and 
delete it from your system; you should also not copy the message nor 
disclose its contents to anyone. Thanks. 
 --------------------------------------------------------------------- </pre>
</body>
</html>