> On April 3, 2014, 10:10 a.m., Dominic Hamon wrote: > > 3rdparty/libprocess/include/process/pid.hpp, line 44 > > <https://reviews.apache.org/r/19967/diff/1/?file=546925#file546925line44> > > > > i'm surprised this is necessary given the implicit bool conversion > > operator above. > > > > How does lint want this formatted? > > > > bool operator!() const ?
The lint check is pretty dumb. It's just verifying that '!' is never followed by a space, so "bool operator !()" would pass. Since rebasing, this check also fails twice on "operator ++ ()" because '++' shouldn't have spaces on both sides, so that's "fixable" by removing the space on either side. We can either (listed in order of my decreasing preference) a) NOLINT these 3 cases, b) disable the rule about "Extra space" (keeping the other operators rules for "Missing spaces"), c) fix the spacing in these (and a hundred other?) operator definitions, or d) forget about trying to enable this rule. - Adam ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19967/#review39427 ----------------------------------------------------------- On April 2, 2014, 4:54 p.m., Adam B wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19967/ > ----------------------------------------------------------- > > (Updated April 2, 2014, 4:54 p.m.) > > > Review request for mesos and Dominic Hamon. > > > Bugs: MESOS-1181 > https://issues.apache.org/jira/browse/MESOS-1181 > > > Repository: mesos-git > > > Description > ------- > > Enabled whitespace/operators rule for cpplint, which covers the following: > 'Missing spaces around =' > # You should always have whitespace around binary operators. > # Check <= and >= first to avoid false positives with < and >, then > # check non-include lines for spacing around < and >. > # We allow no-spaces around << when used like this: 10<<20, but > # not otherwise (particularly, not when used as streams) > # Also ignore using ns::operator<<; > 'Missing spaces around <' > 'Missing spaces around >' > # There shouldn't be space around unary operators > > > Diffs > ----- > > 3rdparty/libprocess/include/process/pid.hpp fbd512f > src/common/type_utils.hpp 784a808 > support/mesos-style.py edd41f926d6df30513f8fa6c928960e6495af70a > > Diff: https://reviews.apache.org/r/19967/diff/ > > > Testing > ------- > > Ran mesos-style.py over entire source base with whitespace/operators enabled. > > > Thanks, > > Adam B > >
