Last modified: 2013-06-20 19:51:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50020, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48020 - make puppet-lint/puppet-pep8 ignore "W191 indentation contains tabs"
make puppet-lint/puppet-pep8 ignore "W191 indentation contains tabs"
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Unprioritized normal (vote)
: ---
Assigned To: Andrew Bogott
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-02 21:30 UTC by Daniel Zahn
Modified: 2013-06-20 19:51 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Zahn 2013-05-02 21:30:14 UTC
could we make the puppet syntax check / operations-puppet-pep8 in jenkins ignore this error:

"W191 indentation contains tabs"

but still show all the others?

reasoning: 

We will likely never agree on a indentation style.
While it/puppet-lint expect 2-space soft tabs we are largely still using actual tabs.

This way we kill a huge percentage of errors at once and seeing the other, possibly more important, errors would be much easier.

recently the stats were: "We get 35344 warnings or errors on 27982 lines of code"
Comment 1 Daniel Zahn 2013-05-02 21:31:04 UTC
 By far the most common error is: "tab character found on line" with 20362.
Comment 2 Antoine "hashar" Musso (WMF) 2013-05-06 08:45:08 UTC
Technically pep8 let you ignore specific errors and warnings using the 'ignore' parameter.  That can be put in a .pep8 file at the root of the repository, something like:

 [pep8]
 # Ignore W191 indentation contains tabs
 ignore = W191


If that is done, that means python files hosted in the repository could use either spaces or tabs.  The files using tabs should probably be tagged properly for the editors to use the "proper" spacing.  Aka for vim a modeline such as:  vim: set noet:


<bikeshed>For consistency, I would advise sticking to the pep8 standard :)</bikeshed>
Comment 3 Antoine "hashar" Musso (WMF) 2013-06-20 19:51:38 UTC
Andrew Bogott wrote a bunch of changes in operations/puppet.git that makes its pass pep8.

An important change is https://gerrit.wikimedia.org/r/#/c/66552/ (in integration/jenkins.git) which let us sneak pep8 configuration files in sub directories and thus finely tune pep8 behavior.

Anyway, fixed :-)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links