Add codecov command to dev instructions (#711)

* Add codecov command

* Process review feedback
This commit is contained in:
Jean-Paul van Ravensberg 2020-11-02 01:47:26 +01:00 committed by GitHub
parent d3ac04fb1c
commit 3213be0db1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,12 @@ You can also run linting tests against all changed files, as reported by `git di
script/lint script/lint
``` ```
In case you want to check the code coverage for your new component, run the following from the root of the repository:
````shell
pytest ./tests/components/<your_component>/ --cov=homeassistant.components.<your_component> --cov-report term-missing -vv
````
### Preventing linter errors ### Preventing linter errors
Save yourself the hassle of extra commits just to fix style errors by enabling the Flake8 git commit hook. Flake8 will check your code when you try to commit to the repository and block the commit if there are any style errors, which gives you a chance to fix them! Save yourself the hassle of extra commits just to fix style errors by enabling the Flake8 git commit hook. Flake8 will check your code when you try to commit to the repository and block the commit if there are any style errors, which gives you a chance to fix them!