Syntax patterns: more statistics.
rssh at gradsoft.com.ua
Fri Apr 24 09:57:28 PDT 2009
> 2009/4/24 Ruslan Shevchenko <rssh at gradsoft.com.ua>:
>> And what mean 'does not work' ?
>> Let's define some common small dataset.
> These are the patterns that need to be identified for Elvis:
> (a == null ? b : a)
> (a != null ? a : b)
> (null == a ? b : a)
> (null != a ? a : b)
> where a is any expression (occurs twice and is exactly the same in
> both cases), and b is any expression. Ideally, these same patterns
> should also be matched as if-statements, but that will be a lot
Under common small dataset I mean sourcebase.
I. e. while you think that such patterns does not works ?
May be they absent in you sourcebase. (I just scan jetty sources for such
patterns - only one matching per 187 files ). So 'clear elvis' is
So, let's define some common sources (well-known packet or just archive).
Show me, where this patterns is skipped and I will be able to debug this.
> The null-safe operator patterns are more complex.
>>> I should also note that the iterator remove() only catches remove()
>>> within a while-statement, and not within an iterator-driven
>> Yes. Will be fixed.
>> ═(I guess iterator-driven for statement does not exist
>> in life and usually written as while, but better check all, of course.)
> Not so. About 50% of the remove() are in while-statement and 50% in
> for-statement in the sourcebase I'm evaluating.
More information about the coin-dev