Skip to content

mastiggia/checkpatch-junit

Repository files navigation

checkpatch-junit

Python Version PyPI OS License CodeStyle Test

A Python program to generate JUnit XML test result from Linux script checkpatch.pl output.

Then, this result can be consumed by continuous integration tools (Jenkins, GitLab CI ...) to provide nice information display.

Installation

Install from PyPI

pip install checkpatch-junit

Clone and install from GitHub

git clone https://github.com/mastiggia/checkpatch-junit
python setup.py install

Usage

checkpatch-junit [-h] [-V] [-c checkpatch.pl] [--checkpatch-args arg1,arg2,...]
                 [-o outfile.xml] [--ignore-check] [--ignore-warning]
                 FILE [FILE ...]

Provide JUnit output to Linux checkpatch.pl script

positional arguments:
  FILE                  patch to analyze with checkpatch.pl

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -c checkpatch.pl      path to the checkpatch.pl script to use
  --checkpatch-args arg1,arg2,...
                        extra arguments to pass to checkpatch.pl, separated by
                        commas instead of spaces
  -o outfile.xml        output JUnit XML file
  --ignore-check        ignore checkpatch.pl check messages
  --ignore-warning      ignore checkpatch.pl warning messages

Basic example:

checkpatch-junit -c scripts/checkpatch.pl --checkpatch-args=--no-tree *.patch -o checkpatch.xml

CI example

GitLab

The following screenshot shows a GitLab merge request which fixes 2 patches:

MergeRequest

Contribute

A development environment, using virtual environment, can be prepared with the following commands:

python3 -m venv .venv
source .venv/bin/activate

pip install -r requirements-dev.txt
pre-commit install
pip install -e .

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages