Comments (4)
Edit: I am using the global py
launcher that is installed by default on Windows. It is a convenient way to use multiple Python versions without having to worry about which program is python
in the path: https://www.python.org/dev/peps/pep-0397/. If python
is correctly pointing to Python 3, you could also run python -m venv venv
as the first step below.
@ncook-hxgn cppcheck_junit
uses setuptools
to install a console entry point into the Python environment in which it is installed. I think perhaps that the way you installed it on Windows with --user
perhaps didn't get it into Windows PATH
. I've not tried installing this globally on Windows before like this.
A good practice is to use virtual environments: https://docs.python.org/3/tutorial/venv.html
Please try this:
> py -m venv venv
> venv\Scripts\activate
(venv) > python -m pip install --upgrade pip
(venv) > python -m pip install cppcheck_junit
(venv) > cppcheck_junit --help
usage: cppcheck_junit [-h] input_file output_file
Converts Cppcheck XML version 2 to JUnit XML format.
Usage:
$ cppcheck --xml-version=2 --enable=all . 2> cppcheck-result.xml
$ cppcheck_junit cppcheck-result.xml cppcheck-junit.xml
positional arguments:
input_file Cppcheck XML version 2 stderr file.
output_file JUnit XML output file.
optional arguments:
-h, --help show this help message and exit
Whenever you have that venv
virtual environment activated the cppcheck_junit
tool will be in the PATH
. This also keeps cppcheck_junit
isolated from other tools you may want to install in the future.
from cppcheck-junit.
@johnthagen it works perfectly when installed from 3.9's pip, when there's no cruft from a previous attempt in Python 2.x.
I will look into venv
, I think it will probably save us a lot of headaches. I've avoided it for now because there's not a great need for it my this particular case, but it's something I think I need to know about and I can see how it would save me some hassle in the future - thank you for enlightening me to that :)
from cppcheck-junit.
Further, I see the python file, but no .bat or .cmd wrapper. Possibly this is just a documentation issue..
C:\>where /R C:\python39 cppcheck_junit
C:\Python39\Lib\site-packages\cppcheck_junit.py
C:\>
Indeed, using the full path to cppcheck_junit.py works - 🥳 - but this is a little unwieldy. Possibly pip should have put site-packages on the path. Is this a pip bug/config error?
E:\repos\Project>python C:\Python39\Lib\site-packages\cppcheck_junit.py cppcheck-results-all.xml cppcheck-junit.xml
E:\repos\Project>dir *.xml
Volume in drive E is Data
Volume Serial Number is CCA5-58EE
Directory of E:\repos\Project
13/01/2021 17:22 74,299 cppcheck-junit.xml
13/01/2021 16:55 227,275 cppcheck-results-all.xml
2 File(s) 301,574 bytes
0 Dir(s) 716,797,235,200 bytes free
E:\repos\Project>
from cppcheck-junit.
New machine: installed Visual Studio's Python 3.9 and no other pythons. No Pip. (╯°□°)╯︵ ┻━┻
OK I guess I will install Python like a normal person 😁
from cppcheck-junit.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppcheck-junit.