Pylint JUnit Reporter

0.3.5 · active · verified Mon Apr 13

Pylint plugin that generates JUnit based report that can be consumed by CI environments like Jenkins, Azure DevOps, and similar environments. This project was created to address shortcomings in other tools at the time, specifically around handling 'empty' results (no Pylint issues) and better mapping multiple issues per file. The current version is 0.3.5, last released on January 21, 2025.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to run Pylint with the `pylint-junit` plugin to generate a JUnit XML report. The example Python code contains minor Pylint issues (e.g., unused import, missing docstring, unused variable) to ensure the report contains findings. The output is redirected to `pylint_report.xml`.

import os

def check_me():
    x = 1
    y = 2
    z = x + y
    return 'result'

# To run Pylint with the JUnit reporter:
# 1. Save the above code as 'my_module.py'
# 2. Run in your terminal:
#    pip install pylint pylint-junit
#    pylint --output-format=pylint_junit.JUnitReporter my_module.py > pylint_report.xml
# 3. View the generated pylint_report.xml file.

view raw JSON →