Skip to content

Commit

Permalink
sonarcloud setup
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Aug 14, 2018
1 parent 43b6f99 commit f75d23b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ install:
- pip install tox-travis codecov
script:
- tox
- sed -i 's/filename="/filename=".\//g' coverage.xml
- sonar-scanner
after_success:
- codecov
Expand Down
22 changes: 21 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ description-file = README.md
test=pytest

[coverage:run]
#source=bitshares*
source=bitsharesbase,bitsharesapi,bitshares
branch=True
omit=
tests/*
.tox/*
Expand All @@ -15,6 +16,16 @@ omit=
include=bitshares*
ignore_errors=True
show_missing=True
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
if sys.version > '3':

[flake8]
ignore = E501,F401
Expand All @@ -26,3 +37,12 @@ exclude =
# The conf file is mostly autogenerated, ignore it
docs/conf.py,
max-complexity = 15

# [nosetests]
# with-coverage=1
# with-xunit=1
# #cover-branches=1
# cover-xml=1
# cover-inclusive=1
# detailed-errors=1
# cover-package=graphenebase,grapheneapi,graphenestorage,graphene
34 changes: 28 additions & 6 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
sonar.projectKey=bitshares:python-bitshares
# Metadata
sonar.projectKey=python-bitshares
sonar.projectName=Python BitShares Library
sonar.projectVersion=1.0
sonar.organization=bitshares

# Upload to sonar cloud
sonar.host.url=https://sonarcloud.io

sonar.sources=.

#sonar.sourceEncoding=UTF-8
# Language
sonar.language=py

# Sources
sonar.sources=bitshares,bitsharesapi,bitsharesbase

# Unit tests
sonar.tests=./tests/

# Linter
#sonar.python.pylint=/usr/local/bin/pylint
#sonar.python.pylint_config=.pylintrc
#sonar.python.pylint.reportPath=pylint-report.txt

sonar.links.homepage=https://bitshares.org
sonar.links.ci=https://travis-ci.org/bitshares/python-bitshares/
sonar.links.issue=https://github.com/bitshares/python-bitshares/issues
sonar.links.scm=https://github.com/bitshares/python-bitshares/tree/master

sonar.exclusions=htmlcov/*,docs/*,build/*,graphene*,dist/*,*.py,tests/*
sonar.sources=bitshares,bitsharesapi,bitsharesbase
sonar.exclusions=htmlcov/*,docs/*,build/*,dist/*,*.py,tests/*,graphene*/*

# coverage
# sonar.python.xunit.reportPath=test-reports/*.xml
#sonar.python.coverage.reportPath=coverage.xml

sonar.python.xunit.reportPath=nosetests.xml
sonar.python.coverage.reportPath=coverage.xml
#sonar.python.coveragePlugin=cobertura
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ skip_missing_interpreters = true
[testenv]
deps=-rrequirements-test.txt
commands=
coverage run -a setup.py test
coverage run setup.py test
coverage report
coverage html
coverage xml -i
Expand Down

0 comments on commit f75d23b

Please sign in to comment.