Skip to content

Commit

Permalink
Adding sonarqube
Browse files Browse the repository at this point in the history
  • Loading branch information
lightswitch05 committed Jul 10, 2019
1 parent 431ed51 commit de9b826
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -7,4 +7,5 @@ htmlcov/
secrets.json
venv/
cron.log

coverage.xml
results.xml
5 changes: 5 additions & 0 deletions .travis.yml
Expand Up @@ -10,6 +10,11 @@ matrix:
- python: 3.7
dist: xenial
sudo: true
addons:
sonarcloud:
organization: lightswitch05
token:
secure: KOv9+N5rhDqCtZoGXr3D99509MxCnMIb19NNdyotp1b8Rda+pKdfs+WaFyQFSXEyuhee5pyUPUuB4048CTqCoaV2MkgbKx56e4JAhX2mz4S1J20DN1UALdLfW40VpRGEtnRsDuJFs53oKmiojsrTJ5czD+5b0Ijf+5dBR34P05sUmSUXjbMqexhgxHX++X4A1P775QR9Y47kUEDS9KTXgERblDNliuxtNftVBjR62VLIJ+pLbQPuy9k0ZsJK8My9eyZiddspBWuMf96fHxEeume3KM/L80jXVQ/6FJAx2WJPuTY8oPQW5BW7VrZrhll0PLrcF1Px1bPFXlQS8JeVe0EzMVuwgZlkvmTpXbNIjrhR94pnjFmHuYSWqKbH6vnG9l/Ip0RmiMNrzTzyT0RZ2+FauT2b4tov3y/GNvlYz9t+CzmY9RSzZxBGOs2Rh22dnIc7d3dc+gtpvy+tSRDI9iYQW/FDqRC56+PM8h/g6cotDwhTzz2jFh/s11XjriF8qP6pZsPWz71wWKLW8s8rSFhnrVdxHpbgle12Pv6bR+ZWInovdkBVJ27B7N+lsW7fP2VCWmGqlMnC5xhWJrCQVaEKbVX6pWjpLSgAoe1iUZPO+ESmfKJxtQVpybj/ciNfs3o2vKg/190VULFkjm/IEendxIRB1H6gNi2FjtmdpvE=
install:
- make setup
script:
Expand Down
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -16,6 +16,7 @@ setup:

test-travis:
@$(PYTEST)
@sonar-scanner

test:
@$(PYTHON) -m $(PYTEST)
2 changes: 1 addition & 1 deletion pytest.ini
@@ -1,3 +1,3 @@
[pytest]
addopts = --pep8 --cov=HostsTools tests/ --cov-report html --cov-report term
addopts = --pep8 --junitxml=results.xml --cov=HostsTools tests/ --cov-report html --cov-report term --cov-report xml
pep8maxlinelength = 120
15 changes: 15 additions & 0 deletions sonar.properties
@@ -0,0 +1,15 @@
sonar.projectKey=lightswitch05_hosts
# this is the name and version displayed in the SonarCloud UI.
sonar.projectName=hosts

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=.
sonar.tests=./tests
sonar.inclusions=**/*.py

# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

sonar.python.coverage.reportPaths=./coveraage.xml
sonar.python.xunit.reportPath=./results.xml

0 comments on commit de9b826

Please sign in to comment.