This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
CI-Report-Converter is a PHP library that converts error reports between different formats for better integration with CI systems and IDEs. It transforms reports from tools like PHPcs, PHPmd, Psalm, PHPStan into formats compatible with TeamCity, GitHub Actions, JetBrains IDEs, and other platforms.
make build- Install dependencies and build phar filemake test- Run PHPUnit testsmake test-all- Run tests and code style checksmake codestyle- Run code style analysis (via jbzoo/codestyle)
php ./vendor/bin/phpunit- Run PHPUnit tests directlyphp ./vendor/bin/phpunit --configuration ./phpunit.xml.dist- Run with specific configmake test-example- Run example tests and generate fixtures
make build-phar- Build standalone phar executablemake build-docker- Build Docker imagemake create-symlink- Create symlink for testing
./ci-report-converter- Main CLI executable (symlinked via make create-symlink)./vendor/bin/ci-report-converter- Alternative path to CLI
-
Converters (
src/Converters/) - Transform input formats to internal representation- Input converters: CheckStyle, JUnit, PHPmd-JSON, PHPmnd, Psalm-JSON, PMD-CPD
- Output converters: TeamCity Tests/Inspections, GitHub CLI, GitLab JSON, JUnit, Plain Text
- Stats converters: Extract metrics for TeamCity statistics
-
Formats (
src/Formats/) - Define data structures for different report formatsSource/- Internal canonical format (SourceSuite, SourceCase, SourceCaseOutput)JUnit/- JUnit XML format classesTeamCity/- TeamCity service messages formatGithubActions/- GitHub Actions annotations formatMetricMaps/- Metric extraction from various tools
-
Commands (
src/Commands/) - CLI command implementationsConvert- Main conversion commandTeamCityStats- Extract and report code metricsAbstractCommand- Base command class
- Input format → Internal Source format (SourceSuite/SourceCase)
- Internal format → Target output format
- Output written to file or stdout
Map- Registry of available input/output convertersHelper- Utility functions for path manipulation and validationAbstractConverter- Base converter with common functionality
- Tests located in
tests/directory - PHPUnit configuration:
phpunit.xml.dist - Coverage reports generated in
build/coverage_* - Fixture files in
tests/fixtures/for various input/output formats
- PHP 8.3+ required
- Symfony Console for CLI interface
- JBZoo packages (cli, data, utils, markdown)
- Development dependencies include jbzoo/toolbox-dev for code quality tools
src/- Main source codetests/- Test files and fixturesci-report-converter- Main executable (shell script wrapper)Makefile- Build and development commandscomposer.json- Dependency and autoload configuration