From 412fee43ad57bc1ee80773a4060ce8ac2b55191f Mon Sep 17 00:00:00 2001 From: Johann Kellerman Date: Thu, 25 Aug 2016 22:05:31 +0200 Subject: [PATCH] Lint script dev help (#840) --- source/developers/development_testing.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/developers/development_testing.markdown b/source/developers/development_testing.markdown index d706d585d68..3b3a7156010 100644 --- a/source/developers/development_testing.markdown +++ b/source/developers/development_testing.markdown @@ -41,6 +41,12 @@ $ pylint homeassistant/core.py $ py.test tests/test_core.py ``` +You also run linting tests against all changed files, as reported by `git diff upstream/dev --name-only` using the `lint` script: + +```bash +home-assistant$ script/lint --changed +``` + ### {% linkable_title Prevent Linter Errors %} You can save yourself the hassle of extra commits just to fix style errors by enabling the flake8 git commit hook. It will check your code when you attempt to commit to the repository. It will block the commit if there are any style issues, giving you a chance to fix it.