wicket-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Thomerson <jer...@wickettraining.com>
Subject Re: spring cleaning wicket?
Date Tue, 23 Mar 2010 22:31:46 GMT
True, "false == foo" is better.  But I still disagree with the general
"rule" that you should use ! instead.  Rather, there should be a rule that
checks for accidental assignment (i.e. "foo = false").

Anyway, I agree with Igor (a later post on this thread) - let's not tweak
just to tweak.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Mar 23, 2010 at 8:31 AM, tetsuo <ronald.tetsuo@gmail.com> wrote:

> Taking specifically your example, 'foo == false' is too similar to 'foo =
> false', which also compiles, and is probably an error (not just checking
> the
> value, but changing it. '!foo' or 'false == foo' ('false = foo' doesn't
> compile) may be better choices.
>
> But yes, most of these warnings are just about taste or rules without
> context, and I don't think they should even be cosidered 'fixes'.
>
>
>
> On Tue, Mar 23, 2010 at 10:14 AM, Jeremy Thomerson <
> jeremy@wickettraining.com> wrote:
>
> > I would reject patchs to fix some of those.  Some of those so-called
> > "violations" are just their coding style not being the same as ours.
> >
> > For instance, they say there are 218 "violations" where we have 'if (foo
> ==
> > false)' - which they say should be simplified, I'm assuming to be 'if
> > (!foo)'.  Personally, I write mine as "foo == false" because it is much
> > harder to miss that than it is to miss "!" as you're reading through the
> > code.
> >
> > Another example: "empty method in abstract class should be abstract".
>  No,
> > it shouldn't.  It's a method designed to be overridden for additional
> > functionality if you so desire.
> >
> > There might be some that are worth fixing.  But as I mention, there are
> > some
> > that are better left alone.
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Tue, Mar 23, 2010 at 6:39 AM, nino martinez wael <
> > nino.martinez.wael@gmail.com> wrote:
> >
> > > Hi I wondered
> > >
> > > if it would be interesting if I started to make wicket more in
> > > compliance with the rules defined here:
> > > http://nemo.sonarsource.org/drilldown/violations/44196?priority=MAJOR
> > > ?
> > >
> > > I'd of course start by submitting patches..
> > >
> > > So are it interesting?
> > >
> > > regards Nino
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message