Skip to content

Commit

Permalink
Merge 28eb2ea into 69c7d41
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Apr 9, 2018
2 parents 69c7d41 + 28eb2ea commit 849db8e
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 59 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ install:
# command to run tests
script: tox

after_success: coveralls
# create coverage badge
after_success:
- pip install coveralls
- coveralls
5 changes: 3 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ name = "pypi"

pytest = "*"
"pytest-flake8" = "*"
pytest-isort = "*"
pytest-cov = "*"
"flake8-pytest" = "*"
"flake8-builtins" = "*"
"pep8-naming" = "*"
Expand All @@ -23,5 +25,4 @@ pytest = "*"
"flake8-pep3101" = "*"
"flake8-coding" = "*"
"flake8-docstrings" = "*"
pytest-isort = "*"
pytest-cov = "*"
"flake8-bugbear" = "*"
88 changes: 51 additions & 37 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# JonesComplexity [![Build Status](https://travis-ci.org/Miserlou/JonesComplexity.svg)](https://travis-ci.org/Miserlou/JonesComplexity)
# JonesComplexity [![Build Status](https://travis-ci.org/Miserlou/JonesComplexity.svg)](https://travis-ci.org/Miserlou/JonesComplexity) [![Coverage Status](https://coveralls.io/repos/github/Miserlou/JonesComplexity/badge.svg)](https://coveralls.io/github/Miserlou/JonesComplexity)

Flake8 extension to calculate per-line complexity and total code density.

Expand Down Expand Up @@ -39,30 +39,30 @@ Itself:
$ python jones_complexity.py jones_complexity.py
Line counts:
{
"39": 19,
"46": 15,
"137": 12,
"115": 12,
"39": 19,
"46": 15,
"137": 12,
"115": 12,
[...]
"18": 1,
"9": 1,
"18": 1,
"9": 1,
"148": 1
}
Jones Score:
4.0

[PyEsprima](https://raw.githubusercontent.com/PiotrDabkowski/Js2Py/master/examples/pyesprima.py):

$ p jones_complexity.py pyesprima.py
$ p jones_complexity.py pyesprima.py
Line counts:
{
"4182": 265,
"3688": 190,
"4186": 189,
"48": 189,
"4181": 164,
"4182": 265,
"3688": 190,
"4186": 189,
"48": 189,
"4181": 164,
[...]
"1201": 1,
"1201": 1,
"3728": 1
}
Jones Score:
Expand Down
12 changes: 8 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ statistics = true
max-line-length = 80
doctests = True

ignore =
# Disable some pydocstyle checks:
*.py D100 D104 D106 D401

# Flake plugins:
inline-quotes = single
accept-encodings = utf-8
Expand All @@ -26,10 +30,10 @@ accept-encodings = utf-8
python_files =
test_*.py

flake8-ignore =
# Disable some pydocstyle checks:
*.py D100 D104 D106 D401

# py.test options:
console_output_style = classic
norecursedirs = tests/fixtures *.egg .eggs dist build docs .tox .git __pycache__

addopts =
--cov=jones_complexity
--cov-report=term
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ recreate = False
deps =
pipenv
commands =
pipenv install --dev --ignore-pipfile
pipenv install --dev --deploy --ignore-pipfile
pip install -e .
pytest {posargs}

0 comments on commit 849db8e

Please sign in to comment.