> On May 6, 2014, 10:29 a.m., Dominic Hamon wrote: > > 3rdparty/libprocess/include/process/pid.hpp, line 44 > > <https://reviews.apache.org/r/19967/diff/1/?file=546925#file546925line44> > > > > my preference would be c, but then i don't like the style guidance in > > this case ;) > > > > a means adding NOLINT to every overloaded operator, right?
At the moment, no. Cpplint currently only complains about the following unary operator patterns: "!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;]", which translates to 3 failures, one for "operator ! ()" and two for "operator ++ ()". However, if the cpplint rule is expanded in the future, it may cover other (binary/assignment) operator overloads. There are over 100 operator overloads in libprocess, and since the rule is really intended to target normal operator use, not operator overload definitions, I don't think we should apply this weird style guidance to every operator overload. Since it's only 3 failures, I'm inclined to just tell cpplint to NOLINT(whitespace/operators) these lines. - Adam ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19967/#review42318 ----------------------------------------------------------- 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 > >
