Hi,

Regarding PEP8 and PyFlakes, you could consider using the git hook from 
Flake8: http://flake8.readthedocs.org/en/latest/vcs.html#git-hook

with ignore="E501,E265"

strict=True means that it will block you from doing the commit 
operation if errors are found;
strict=False will let you commit and then display the errors. Up to you 
to correct and amend the fixes or to perform another commit for the 
formatting fixes (something the strict option doesn't allow and will 
pass the kwalitee checks).

This git hook is basically what is done by the service (modulo the 
commit message checks).

Cheers,

--
Yoan

Le jeu 27 mar 2014 18:43:44 CET, Jiri Kuncar a écrit :
> Dear (‘pu’) developers,
>
> in last weeks we have been experimenting with GitHub hook
> that checks your pull requests. In first round we focused on
> well formatted commit messages as described in:
>
> <http://invenio-software.org/wiki/Tools/Git/Workflow#R2.Remarksoncommitlogmessages>
>
> Please note that we don’t run any spell/grammar checker ;)
>
> Now we are experimenting with PEP8/Pyflakes checker for each
> python file in pull request. It’s *optional* but personally,
> I would be happy if you try to check your files before creating
> pull request:
>
>   $ git diff --name-only pu.. | \
>   xargs pep8 --ignore=E123,E226,E24,E501,E265.
>
> In case you see too many issues and you are willing to help
> making the code “nicer” you can try to run `autopep8` (on your
> own risk).
>
>   $ git status # please make sure your code is committed!
>   $ git checkout -b pu-pep8-improvements
>   $ git diff --name-only pu.. | xargs \
>   autopep8 --ignore E123 --ignore E226 --ignore E24 --ignore E501 \
>   --ignore E265 --range 20 99999 --diff
>   # see the proposed changes
>   $ git diff --name-only pu.. | xargs \
>   autopep8 --ignore E123 --ignore E226 --ignore E24 --ignore E501 \
>   --ignore E265 --range 20 99999 --in-place
>   # check the result
>   $ git diff --name-only pu.. | \
>   xargs pep8 --ignore=E123,E226,E24,E501,E265.
>   # fix the rest and commit :)
>   $ git add ...
>   $ git commit -s …
>   # make a pull request
>
> In case of problems or if you have any proposal please check:
> <https://github.com/jirikuncar/invenio-kwalitee/issues>
>
> Best regards,


Reply via email to