[openstack-dev] anyway to pep8 check on a specified file
tox -e pep8 usually takes several minutes on my test server, actually I only changes one file and I knew something might wrong there anyway to only check that file? Thanks a lot Best Regards! Kevin (Chen) Ji 纪 晨 Engineer, zVM Development, CSTL Notes: Chen CH Ji/China/IBM@IBMCN Internet: jiche...@cn.ibm.com Phone: +86-10-82454158 Address: 3/F Ring Building, ZhongGuanCun Software Park, Haidian District, Beijing 100193, PRC___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] anyway to pep8 check on a specified file
Le 15/12/2014 10:04, Chen CH Ji a écrit : tox -e pep8 usually takes several minutes on my test server, actually I only changes one file and I knew something might wrong there anyway to only check that file? Thanks a lot That's really non necessary to check all the files if you only modified a single one. You can just take the files you modified and run a check by doing this : git diff HEAD^ --name-only | xargs tools/with_venv.sh flake8 Hope it helps, -Sylvain Best Regards! Kevin (Chen) Ji 纪 晨 Engineer, zVM Development, CSTL Notes: Chen CH Ji/China/IBM@IBMCN Internet: jiche...@cn.ibm.com Phone: +86-10-82454158 Address: 3/F Ring Building, ZhongGuanCun Software Park, Haidian District, Beijing 100193, PRC ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] anyway to pep8 check on a specified file
Le 15/12/2014 10:27, Sylvain Bauza a écrit : Le 15/12/2014 10:04, Chen CH Ji a écrit : tox -e pep8 usually takes several minutes on my test server, actually I only changes one file and I knew something might wrong there anyway to only check that file? Thanks a lot That's really non necessary to check all the files if you only modified a single one. You can just take the files you modified and run a check by doing this : git diff HEAD^ --name-only | xargs tools/with_venv.sh flake8 Eh, just replying to myself, I just saw there is a recent commit which added a -8 flag to run_tests for checking PEP8 only against HEAD. https://review.openstack.org/#/c/110746/ That's worth it :-) Hope it helps, -Sylvain Best Regards! Kevin (Chen) Ji 纪 晨 Engineer, zVM Development, CSTL Notes: Chen CH Ji/China/IBM@IBMCN Internet: jiche...@cn.ibm.com Phone: +86-10-82454158 Address: 3/F Ring Building, ZhongGuanCun Software Park, Haidian District, Beijing 100193, PRC ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] anyway to pep8 check on a specified file
On Mon, Dec 15, 2014 at 05:04:59PM +0800, Chen CH Ji wrote: tox -e pep8 usually takes several minutes on my test server, actually I only changes one file and I knew something might wrong there anyway to only check that file? Thanks a lot Use ./run_tests.sh -8 That will only check pep8 against the files listed in the current commit. If you want to check an entire branch patch series then git rebase -i master -x './run_tests.sh -8' Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] anyway to pep8 check on a specified file
On Mon, Dec 15, 2014 at 09:37:23AM +, Daniel P. Berrange wrote: On Mon, Dec 15, 2014 at 05:04:59PM +0800, Chen CH Ji wrote: tox -e pep8 usually takes several minutes on my test server, actually I only changes one file and I knew something might wrong there anyway to only check that file? Thanks a lot Use ./run_tests.sh -8 That will only check pep8 against the files listed in the current commit. If you want to check an entire branch patch series then git rebase -i master -x './run_tests.sh -8' Really useful point! s. Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev