Coder Social home page Coder Social logo

coverage2clover's People

Contributors

decaz avatar gauravojha avatar johnthagen avatar pyup-bot avatar tumb1er avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

coverage2clover's Issues

TypeError: expected str, bytes or os.PathLike object, not NoneType

Using your tool creates above error message right away.

Steps to reproduce:

coverage run --source=<my-package> -m xmlrunner discover -o test-reports
coverage xml
coverage2clover -i coverage.xml -o clover.xml

Error:

coverage2clover -i coverage.xml -o clover.xml
Traceback (most recent call last):
  File "/Users/miay/anaconda3/envs/greta/bin/coverage2clover", line 8, in <module>
    sys.exit(main())
  File "/Users/miay/anaconda3/envs/greta/lib/python3.7/site-packages/clover/coverage2clover.py", line 23, in main
    cov.open(inputfile)
  File "/Users/miay/anaconda3/envs/greta/lib/python3.7/site-packages/clover/__init__.py", line 137, in open
    c.count_loc(sources)
  File "/Users/miay/anaconda3/envs/greta/lib/python3.7/site-packages/clover/__init__.py", line 65, in count_loc
    filename = os.path.join(source, self.filename)
  File "/Users/miay/anaconda3/envs/greta/lib/python3.7/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Deprecation Warning: pygount.source_analysis

Running the tool throws the following deprecation warning.

py3 run-test: commands[2] | python -m unittest tests
/Users/gojha/Documents/personal/coverage2clover/clover/__init__.py:72: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
  analysis = pygount.source_analysis(
/Users/gojha/Documents/personal/coverage2clover/clover/__init__.py:72: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
  analysis = pygount.source_analysis(
/Users/gojha/Documents/personal/coverage2clover/tests.py:78: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
  clover_analysis = pygount.source_analysis(
/Users/gojha/Documents/personal/coverage2clover/tests.py:83: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
  clover_bin_analysis = pygount.source_analysis(
./Users/gojha/Documents/personal/coverage2clover/clover/__init__.py:72: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
  analysis = pygount.source_analysis(
/Users/gojha/Documents/personal/coverage2clover/clover/__init__.py:72: DeprecationWarning: Call to deprecated function source_analysis (use SourceAnalysis.from_file).
  analysis = pygount.source_analysis(

Probably should be looked at and fixed.

[Question]: EOL Python Support

Python 3.5 reached its EOL on 13th Sept, 2020

DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.

Just curious as to the release support for the packages. Do you plan to continue publishing packages for EOL Python versions as well?

Move CI to GitHub Actions

travis-ci does not leave comments under PR, so it's time waste going to travis-ci.org and check every PR

pip emits a deprecation warning against use of distutils

From Windows 10 on Python 3.5 with pip 8.0.2:

pip uninstall coverage2clover
DEPRECATION: Uninstalling a distutils installed project (coverage2clover) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.

Statements count is incorrect

for line in class_info.iter('lines'):
    statements += 1
    if line.get('hits') == '1':
        covered_statements += 1
    if line.get('branch') == 'true':
        cc = line.get('condition-coverage')
        m = re.match(r'([\d]+)%[\s]+\(([\d]+)/([\d]+)\)', cc)
        conditions += int(m.group(3))
        covered_conditions += int(m.group(2))

Seems that lines here is invalid tag since hits attribute appears in line tag

No console support on Windows

When coverage2clover is installed on Windows, it does not create a command line program for execution. I suggest using the entry_points option in setuptools.setup:

    entry_points={
        'console_scripts': [
            'coverage2clover = cppcheck_junit:main',
        ],

rather than:

try:
    copy("bin/coverage2clover.py", "bin/coverage2clover")
except (OSError, IOError):
    pass

support for coverage >= 7.0

hello

thanks for your package

could you please prepare a new release in order to support coverage >= 7.0

at the moment, the requirements expect coverage < 7.0

regards

ValueError: I/O operation on closed file

after the 2.0.0 update we are getting this error:

Traceback (most recent call last):
File "/opt/project/venv/bin/coverage2clover", line 10, in
sys.exit(main())
File "/opt/project/venv/lib/python3.6/site-packages/clover/coverage2clover.py", line 23, in main
cov.open(inputfile)
File "/opt/project/venv/lib/python3.6/site-packages/clover/init.py", line 137, in open
c.count_loc(sources)
File "/opt/project/venv/lib/python3.6/site-packages/clover/init.py", line 70, in count_loc
fallback_encoding='utf-8')
File "/opt/project/venv/lib/python3.6/site-packages/pygount/analysis.py", line 512, in source_analysis
elif not has_lexer(source_path):
File "/opt/project/venv/lib/python3.6/site-packages/pygount/analysis.py", line 465, in has_lexer
result = bool(pygments.lexers.find_lexer_class_for_filename(source_path))
File "/opt/project/venv/lib/python3.6/site-packages/pygments/lexers/init.py", line 168, in find_lexer_class_for_filename
for cls in find_plugin_lexers():
File "/opt/project/venv/lib/python3.6/site-packages/pygments/plugin.py", line 53, in find_plugin_lexers
yield entrypoint.load()
File "/opt/project/venv/lib/python3.6/site-packages/pkg_resources/init.py", line 2291, in load
return self.resolve()
File "/opt/project/venv/lib/python3.6/site-packages/pkg_resources/init.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/opt/project/venv/lib/python3.6/site-packages/IPython/init.py", line 55, in
from .terminal.embed import embed
File "/opt/project/venv/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "/opt/project/venv/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 80, in
if not _stream or not hasattr(_stream, 'isatty') or not _stream.isatty():
ValueError: I/O operation on closed file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.