[squeak-dev] Re: SwaLint

Tobias Pape Das.Linux at gmx.de
Mon Mar 2 15:20:45 UTC 2009


Hello Mariano,

Am 2009-03-01 um 19:12 schrieb Mariano Martinez Peck:

> Tobias: I make get some time to try SwaLint. The truth is that for  
> me, this is very user friendly, intuitive and easy to use. In  
> addition, It is very customizable as you can modify your preferences  
> with the tests. In fact, I was very surprised and glad with it.

Thank you, in the name of my Team members. In fact, we are glad to  
here, that what we intended to accomplish actually works.
>
>
> Ahh I have some questions:

> 1) I see there is one test that checks the "length" of a method. I  
> like to document and put all the necessary comments in my tests. So,  
> in many tests, I get "long method" but actually most of those  
> methods are comments with "". So, the questions is, can be comments  
> ignored in this test?

In fact, we included comments intentionally. Albeit, I do not  
understand the "" command idea (please help me there).
Our reasoning was, commets normally serve the purpose of clarifying  
code, thus, if they were ommited, the code would not be easily  
understandable.
Therefore, we treat comments as code. IIRC, we assumed an "averagne"  
of 7 LOC per method in the beginning.
Yet, you might set your desired averange LOC in the Preferences.
>
> 2) I think when you have take care of the results and analyse them  
> to fix them, the common way doing this is going test for test. So,  
> It would be fantastic being able to browse a test. And when you do  
> this, this browse, takes all the classes that has occurrences.  
> Example: "long methods" , right button, "browse all". And this opens  
> the browser with all the classes that has the long method occurrences.

Ok, this might be useful. Did I got this right there? You'd like to  
right click on the test group and browse all of them?
Currenetly, you can select multiple (or one, depending on your  
personal settings) "occurences" of test results and
right-click -> browse them all.
By the way, you can sort the results pane by class, too. Then you can  
have a look at what classes are most affected by
the tests selected.
>
>
> 3) What does "Data class" mean ? are all the test detailed deeply  
> somewhere ? like a webpage, wiki, or just SwaLint browser ?

This notion has been taken from Michele Lanza's and Radu Marinescu's  
nice book "Object-Oriented Metrics in Practice".
If you like to see the underlying metrics used to "calculate" the Data  
class, just enable them in the Preferences. You will
notice, that they are named after the ones described in the book.
Our mechanism of reusing results allows for simple creation of new  
Test Plugins. Just play around with them.
There has been plans to cover all Metrics described in the book,  
however, time is short and I'll be able to Implement them not before  
summer, I presume.

As you mention the Wiki, I'm looking forward to bring it up aroung mid  
March, again, or late March, depending on how my new server is running.
>
>
> 4) What does "Dot after return consistency" mean ? I don't  
> understand the % and when it is average, low or high.

Oh that's a nice one :)
This is a Style tests. It simply tests, how many returns are written

^ anObject aMessage

and how many are written

^ anObject aMessage.

Where 100% is "all with" and 0% "all without" dot after return.
Thus, 50% is the worst value you can get in this test, as it implies,  
that every second return statement
is written in the opposing style.
>
>
> Thanks a lot.

You're welcome.
>

Have a nice day
	-Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: Signierter Teil der Nachricht
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090302/1b5ad3c0/PGP.pgp


More information about the Squeak-dev mailing list