From deb832953a659e71d4fb68e658327bb413beaa4c Mon Sep 17 00:00:00 2001 From: Devyn S Date: Thu, 25 May 2017 13:18:35 -0700 Subject: [PATCH] chore(pylint): add pylint to travis CI In the current implementation, not fatal, critical or warning errors are tolerated. Closes #2 --- .travis.yml | 6 ++++-- requirements.txt | 5 ++++- starter/starter.py | 11 +++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 18cb7e7..cadcd33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ install: - pip install -r requirements.txt - pip install codecov # command to run tests -script: python -m pytest . --cov=starter --cov-report term --cov-report xml +script: + - pylint --ignore-patterns=test* starter || [[ $? == 0 || $? -ge 8 ]] + - python -m pytest . --cov=starter --cov-report term-missing --cov-report xml after_success: - - codecov \ No newline at end of file + - codecov diff --git a/requirements.txt b/requirements.txt index f68adf4..473ffa8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,4 @@ -pytest-cov \ No newline at end of file +pytest +pytest-cov +mock +pylint \ No newline at end of file diff --git a/starter/starter.py b/starter/starter.py index 895108e..c414e0f 100644 --- a/starter/starter.py +++ b/starter/starter.py @@ -16,11 +16,22 @@ class StartExample(object): """ def __init__(self): + """ + Starter Example constructor. Used to setup before running. + """ self.location = "World" def run(self): + """ + Run your application. + :return: + """ self.print_version() print("Hello {}!".format(self.location)) def print_version(self): + """ + Print the version + :return: + """ print("Version: {}".format(__version__))