Whitespace and bullying
abartlet at samba.org
Sat Apr 7 05:55:00 UTC 2018
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
This would allow good control so we don't cover third_party, heimdal
etc, where we would wish to keep code identical.
The implementation detail that is key is ensuring that whatever we do:
- handles exceptions (above)
- works via autobuild, so it shows up in manual autobuild, travis CI
and gitlab CI, ideally via make test
(The git commit hook will be too late as we are trying to solve this
with emotionless computers so it needs to be automated).
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