🚀 Adds CodeClimate

This commit is contained in:
Franck Nijhof 2018-05-02 00:06:15 +02:00
parent 295d6bc7af
commit f8729dde4f
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
5 changed files with 184 additions and 0 deletions

23
.codeclimate.yml Normal file
View file

@ -0,0 +1,23 @@
---
engines:
duplication:
enabled: true
config:
languages:
- python
fixme:
enabled: true
markdownlint:
enabled: true
pep8:
enabled: true
radon:
enabled: true
exclude_paths:
- .vscode
- .idea
- bin/
- dist/
- include/
- lib/
- venv/

19
.editorconfig Executable file
View file

@ -0,0 +1,19 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
ident_size = 4
[*.md]
ident_size = 2
trim_trailing_whitespace = false
[*.json]
ident_size = 2
[{.gitignore,.gitkeep,.editorconfig}]
ident_size = 2

95
.gitignore vendored Normal file
View file

@ -0,0 +1,95 @@
# Hide sublime text stuff
*.sublime-project
*.sublime-workspace
# Hide some OS X stuff
.DS_Store
.AppleDouble
.LSOverride
Icon
# Thumbnails
._*
# IntelliJ IDEA
.idea
*.iml
# pytest
.pytest_cache
.cache
# GITHUB Proposed Python stuff:
*.py[cod]
# C extensions
*.so
# Logs
*.log
pip-log.txt
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
.python-version
# emacs auto backups
*~
*#
*.orig
# venv stuff
pyvenv.cfg
pip-selfcheck.json
venv
.venv
Pipfile*
share/*
# vimmy stuff
*.swp
*.swo
# Visual Studio Code
.vscode
# Windows Explorer
desktop.ini
/home-assistant.pyproj
/home-assistant.sln
/.vs/*
# mypy
/.mypy_cache/*
# Packages
*.egg
*.egg-info
dist
build
eggs
.eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
# Virtualenv
.Python
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
[Ss]cripts
pyvenv.cfg
.venv
pip-selfcheck.json

1
.mdlrc Executable file
View file

@ -0,0 +1 @@
rules "~MD024"

46
.pylintrc Normal file
View file

@ -0,0 +1,46 @@
[MASTER]
reports=no
# Reasons disabled:
# locally-disabled - it spams too much
# duplicate-code - unavoidable
# cyclic-import - doesn't test if both import on load
# abstract-class-little-used - prevents from setting right foundation
# abstract-class-not-used - is flaky, should not show up but does
# unused-argument - generic callbacks and setup methods create a lot of warnings
# global-statement - used for the on-demand requirement installation
# redefined-variable-type - this is Python, we're duck typing!
# too-many-* - are not enforced for the sake of readability
# too-few-* - same as too-many-*
# abstract-method - with intro of async there are always methods missing
# inconsistent-return-statements - doesn't handle raise
generated-members=botocore.errorfactory
disable=
abstract-class-little-used,
abstract-class-not-used,
abstract-method,
cyclic-import,
duplicate-code,
global-statement,
inconsistent-return-statements,
locally-disabled,
not-context-manager,
redefined-variable-type,
too-few-public-methods,
too-many-arguments,
too-many-branches,
too-many-instance-attributes,
too-many-lines,
too-many-locals,
too-many-public-methods,
too-many-return-statements,
too-many-statements,
unused-argument
# Maximum number of characters on a single line.
max-line-length=79
[EXCEPTIONS]
overgeneral-exceptions=Exception,HomeAssistantError