Install & Compatibility
Where this runs
tested against v0.3.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.0s · import 0.000s · 32MB
29MB installed
● package 29MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
JUnitReporter
✓ pylint --output-format=pylint_junit.JUnitReporter your_module.py
This is how the reporter class is invoked via the Pylint command line. It's not a standard Python import in user code.
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.
Debug
Known issues
gotchaOlder or alternative JUnit reporters for Pylint (e.g., `pylint2junit`) sometimes produced invalid XML, especially when no issues were found. `pylint-junit` was developed to specifically address these 'empty result' scenarios, ensuring valid JUnit XML is always generated.fixEnsure you are using `pylint-junit` for reliable JUnit XML generation.
affects: <0.3.0 (for pylint-junit), potentially all versions of pylint2junit
gotchaWhen configuring `pylint-junit` in your `.pylintrc` file using `output-format=junit`, it sets the default output for all Pylint runs. If you sometimes need the standard Pylint output, you should omit this from your `.pylintrc` and instead specify `--output-format=junit` (or `--output-format=pylint_junit.JUnitReporter`) on the command line only when a JUnit report is desired.fixPrefer using the `--output-format` command-line argument for granular control over Pylint's output per invocation.
affects: All versions
gotchaThere have been reported compatibility issues with `pylint-junit` and specific `pylint` versions, particularly `pylint 2.15` and newer at certain points. While the project aims to stay compatible, users experiencing unexpected behavior should check the GitHub issues for known compatibility problems with their specific `pylint` version.fixConsult the `pylint-junit` GitHub repository for known compatibility issues and ensure both `pylint` and `pylint-junit` are updated to recent, compatible versions.
affects: Potentially Pylint versions >= 2.15 (at time of issue, may be resolved in newer pylint-junit)
Upgrade
Version history
0.3.5latest on PyPI · released Jan 21, 2025
Audit
Dependencies
junit_xmlrequiredUsed to generate the JUnit XML output format.