Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[report-converter] Improve documentation maintainability #4424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions tools/report-converter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# CodeChecker Report Converter

A Python tool to parse and convert various code analyzer outputs into CodeChecker format. It can create HTML reports from analyzer outputs and store them in a CodeChecker server.

## Quick Start

```bash
# Create a Python virtualenv and set it as your environment
make venv
source $PWD/venv/bin/activate

# Build and install report-converter package
make package
```

## Basic Usage

```bash
# Convert analyzer output to CodeChecker format
report-converter --type clang-tidy --output /path/to/reports clang-tidy-output.txt

# Generate HTML report
plist-to-html --input /path/to/reports/*.plist --output /path/to/html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find this plist-to-html script.

Copy link
Collaborator Author

@gamesh411 gamesh411 Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an entry point defined for the report-converter package, which is named plist-to-html:
/tools/report-converter/setup.py
This is a way for Python packages to provide a CLI script once installed.
I just went ahead and included this one in the docs as well.

```

## Documentation

For comprehensive documentation, including:
- Complete list of supported analyzers
- Detailed usage examples
- Configuration options
- Troubleshooting guide

Please visit our [official documentation](https://codechecker.readthedocs.io/en/latest/tools/report-converter/).

## Requirements

- Python >= 3.8

## License

This project is licensed under the Apache License 2.0 - see the LICENSE.txt file for details.

## Authors

CodeChecker Team (Ericsson)
21 changes: 13 additions & 8 deletions tools/report-converter/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@
import setuptools
import codechecker_report_converter

readme_file_path = os.path.join(
"..", "..", "docs", "tools", "report-converter.md")
# Use a focused description for PyPI while pointing to full documentation
description = """
CodeChecker Report Converter is a Python tool that converts various code analyzer outputs
into CodeChecker format and generates HTML reports. It supports multiple analyzers including:
- Clang-based tools (Clang-Tidy, Sanitizers)
- Static analyzers (Cppcheck, GCC)
- Language-specific linters (ESLint, Pylint, TSLint)

with open(readme_file_path, "r", encoding="utf-8", errors="ignore") as fh:
long_description = fh.read()
For comprehensive documentation, visit:
https://codechecker.readthedocs.io/en/latest/tools/report-converter/
"""

setuptools.setup(
name=codechecker_report_converter.__title__,
version=codechecker_report_converter.__version__,
author='CodeChecker Team (Ericsson)',
description="Parse and create HTML files from one or more '.plist' "
"result files.",
long_description=long_description,
description="Parse and create HTML files from various code analyzer outputs",
long_description=description,
long_description_content_type="text/markdown",
url="https://github.com/Ericsson/CodeChecker",
keywords=['report-converter', 'codechecker', 'plist'],
keywords=['report-converter', 'codechecker', 'static-analysis', 'linter'],
license='LICENSE.txt',
packages=setuptools.find_packages(),
include_package_data=True,
Expand Down
Loading