Whitespace and bullying
abartlet at samba.org
Sat Apr 7 08:18:29 UTC 2018
On Sat, 2018-04-07 at 16:44 +1000, Martin Schwenke wrote:
> On Sat, 07 Apr 2018 17:55:00 +1200, Andrew Bartlett via samba-technical
> <samba-technical at lists.samba.org> wrote:
> > On Sat, 2018-04-07 at 15:07 +1200, Douglas Bagnall wrote:
> > > On 07/04/18 11:36, Timur I. Bakeyev via samba-technical wrote:
> > > >
> > > > Just to up-vote for the automated git-hook solution - we are using Travis
> > > > and flake8 for our Python code(Samba also has some .py files, right?) on
> > > > commits and though it caused some anticipation in the beginning, now our
> > > > code looks much cleaner and consistent in style.
> > >
> > > We actually already have a test that rejects trailing whitespace in Python, at
> > > python/samba/tests/source.py:185, run by autobuild and `make tests TESTS=source`.
> > >
> > > There is also a `make pep8` that runs the less interesting subset of flake8.
> > > Anyone who runs it sees over seven thousand lines of complaint and decides to
> > > focus on something else.
> > I agree a process similar to the TESTS=source would be the best, and
> > like the warning-free builds we now enforce.
> > I suggest that it be done per-subsystem. If this is as serious as is
> > suggested, then it should not be a problem to make each subsystem
> > comply and then set (or remove) a flag so it can't regress, like we do
> > for warnings.
> One problem is that if a subsystem has a lot of failures (perhaps even
> just trailing whitespace in comments?), then the flag will be off for a
> long time (forever?) and we won't catch new problems.
We need to practice what we preach. Many contributors (myself if you
need a specific example) pattern far better by example of the code
nearby than rule-books.
If the majority of our code doesn't comply with README.Coding then the
rule shouldn't be in README.Coding.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical