From f8729dde4f0c8d4a1bdbf992e5f1ee1da0a215b4 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 2 May 2018 00:06:15 +0200 Subject: [PATCH] :rocket: Adds CodeClimate --- .codeclimate.yml | 23 ++++++++++++ .editorconfig | 19 ++++++++++ .gitignore | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ .mdlrc | 1 + .pylintrc | 46 +++++++++++++++++++++++ 5 files changed, 184 insertions(+) create mode 100644 .codeclimate.yml create mode 100755 .editorconfig create mode 100644 .gitignore create mode 100755 .mdlrc create mode 100644 .pylintrc diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..682b239 --- /dev/null +++ b/.codeclimate.yml @@ -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/ diff --git a/.editorconfig b/.editorconfig new file mode 100755 index 0000000..7a12570 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8519ac6 --- /dev/null +++ b/.gitignore @@ -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 diff --git a/.mdlrc b/.mdlrc new file mode 100755 index 0000000..2b0128d --- /dev/null +++ b/.mdlrc @@ -0,0 +1 @@ +rules "~MD024" \ No newline at end of file diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..d6454d5 --- /dev/null +++ b/.pylintrc @@ -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