{"id":30752541,"url":"https://github.com/igorbayerl/adlercov","last_synced_at":"2025-09-04T08:09:50.494Z","repository":{"id":305231180,"uuid":"1022325935","full_name":"IgorBayerl/AdlerCov","owner":"IgorBayerl","description":"Cli tool to generate coverage reports in a human readable way","archived":false,"fork":false,"pushed_at":"2025-09-01T17:07:03.000Z","size":4068,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-01T19:09:12.957Z","etag":null,"topics":["coverage-report","go","gocover","golang","report-generator","reporting","test-automation","testcoverage"],"latest_commit_sha":null,"homepage":"https://igorbayerl.github.io/AdlerCov/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IgorBayerl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-18T21:11:54.000Z","updated_at":"2025-08-26T19:45:52.000Z","dependencies_parsed_at":"2025-08-02T19:14:45.438Z","dependency_job_id":"5ac2eec9-fa6f-431c-a877-e9564d33b116","html_url":"https://github.com/IgorBayerl/AdlerCov","commit_stats":null,"previous_names":["igorbayerl/adlercov"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IgorBayerl/AdlerCov","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorBayerl%2FAdlerCov","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorBayerl%2FAdlerCov/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorBayerl%2FAdlerCov/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorBayerl%2FAdlerCov/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IgorBayerl","download_url":"https://codeload.github.com/IgorBayerl/AdlerCov/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorBayerl%2FAdlerCov/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273574155,"owners_count":25129883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverage-report","go","gocover","golang","report-generator","reporting","test-automation","testcoverage"],"created_at":"2025-09-04T08:09:46.692Z","updated_at":"2025-09-04T08:09:50.483Z","avatar_url":"https://github.com/IgorBayerl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\n\u003cimg src=\"docs/docs/imgs/adlercov.png\" alt=\"AdlerCov\" width=\"200\"/\u003e\n\u003cbr/\u003e\nAdlerCov\n\u003c/h1\u003e\n\n\n\u003cdiv align=\"center\"\u003e\n    \n\u003cb\u003ePowerful code coverage visualization\u003c/b\u003e\n  \n\u003c/div\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/IgorBayerl/AdlerCov)](https://goreportcard.com/report/github.com/IgorBayerl/AdlerCov)\n\n**AdlerCov** converts coverage reports generated by Cobertura, GoCover or GCov into human-readable reports in various formats.\n\nThe reports show the coverage quotas and also visualize which lines of your source code have been covered.\n\n**AdlerCov** supports merging several coverage files into a single report, giving you a unified view of your project's test coverage across different test suites (e.g., unit and integration tests).\n\nOriginally a Go port of the excellent [ReportGenerator](https://github.com/danielpalme/ReportGenerator) by Daniel Palme, **AdlerCov** has evolved into something different. Built in Go, it focuses on performance, simplicity, and a clean architecture tailored for today’s development workflows.\n\n![alt text](docs/docs/imgs/adlercov_input_output.png)\n\n## Motivation\n\n[ReportGenerator](https://github.com/danielpalme/ReportGenerator) is a mature and feature-rich tool that has served the .NET ecosystem for over **14 years**. Its robustness and design inspired this project.\n\nThe motivations for creating **AdlerCov**:\n\n1.  **For Study:** To explore the architectural challenges of translating a large project to a new language while keeping the result idiomatic and aligned with modern best practices of the target language.\n2.  **Dependency-Free:** A lightweight, native binary that runs anywhere without external runtimes—ideal for containers and CI/CD pipelines.\n3.  **Modern Extensibility:** Designed with a clean, multi-stage pipeline in Go, enabling rapid extension for new report formats and language-specific analysis.\n\n## Feature Status\n\nWhile AdlerCov began by mirroring ReportGenerator’s capabilities, it is now diverging with Go-native enhancements and a growing list of planned features.\n\n| Feature Category   | Feature               | ReportGenerator | AdlerCov | Notes                  |\n|:-------------------|:----------------------|:---------------:|:--------:|:-----------------------|\n| **Input Formats**  | Cobertura             |        ✅        |    ✅     | Core support.          |\n|                    | Go Cover              |        ❌        |    ✅     |                        |\n|                    | OpenCover             |        ✅        |    ❌     | Planned.               |\n|                    | JaCoCo                |        ✅        |    ❌     | Planned.               |\n|                    | Merge Reports         |        ✅        |    ✅     |                        |\n| **Output Formats** | HTML (SPA)            |        ✅        |    ✅     | Angular frontend.      |\n|                    | TextSummary           |        ✅        |    ✅     | Fully supported.       |\n|                    | lcov                  |        ✅        |    ✅     | Fully supported.       |\n|                    | RawJSON               |        ✅        |    ✅     | Coming soon.           |\n|                    | Badge                 |        ✅        |    ❌     | Coming soon.           |\n|                    | XML                   |        ✅        |    ❌     | Coming soon.           |\n| **Core Features**  | File Filtering        |        ✅        |    ✅     |                        |\n|                    | Branch Coverage       |        ✅        |    ✅     |                        |\n|                    | Method Coverage       |        ✅        |    ✅     |                        |\n|                    | Cyclomatic Complexity |        ✅        |    ✅     | Go-native; C++/C# WIP. |\n|                    | History Charts        |        ✅        |    ❌     | Coming soon.           |\n|                    | Patch Coverage        |        ✅        |    ❌     | Coming soon.           |\n|                    | Risk Hotspots         |        ✅        |    ❌     | Coming soon.           |\n\n## Command Line Interface\n\nAdlerCov mirrors the familiar command-line interface of ReportGenerator while following idiomatic Go CLI patterns.\n\n| Argument      | AdlerCov | Description                                   |\n|:--------------|:--------:|:----------------------------------------------|\n| `report`      |    ✅     | Input coverage reports (semicolon-separated). |\n| `output`      |    ✅     | Output directory.                             |\n| `sourcedirs`  |    ✅     | Source directories (semicolon-separated).     |\n| `reporttypes` |    ✅     | Output formats (comma-separated).             |\n| `filefilters` |    ✅     | Include/exclude file filters.                 |\n| `verbosity`   |    ✅     | Log level (e.g., Verbose, Info, Error).       |\n| `tag`         |    ✅     | Optional label for the report.                |\n| `title`       |    ✅     | Custom report title.                          |\n| `historydir`  |    ❌     | TODO                                          |\n\n## Why \"AdlerCov\"?\n\nThe name **AdlerCov** combines **“Adler”** (German for **eagle**) with **coverage**, evoking the image of a high-flying, sharp-eyed bird analyzing your entire codebase. It reflects the project's mission: to help developers detect weaknesses and gaps in their test coverage with clarity and accuracy.\n\n## How to Contribute\n\nThis project is actively evolving. Your contributions are highly valued! Whether you're adding new input formats, improving a language processor, or enhancing the documentation, I would love your help.\n\n### System Design\n\nAdlerCov is built around a clean, four-stage pipeline that makes it easy to extend and maintain.\n\n*   **1. Parsing (`internal/parsers`):** Each parser has one job: to translate a specific report format (like Cobertura XML) into a standardized, raw `ParserResult` struct. It extracts line and branch hits but does no further analysis.\n\n*   **2. Tree Building (`internal/tree`):** The `TreeBuilder` takes all the `ParserResult` and merges them into a single, hierarchical `SummaryTree`. This tree mirrors the project's file structure and correctly sums coverage data for files that appear in multiple reports. The tree is still \"raw\" at this stage with just Line and Branch coverage extracted from the report.\n\n*   **3. Hydration (`internal/hydrator`):** The `Hydrator` takes the raw tree and enriches it. For each file, it reads the source code, uses a `language.Processor` to perform static analysis (like finding method boundaries and calculating cyclomatic complexity), and populates the tree with this rich data.\n\n*   **4. Reporting (`internal/reporter`):** The final, hydrated `SummaryTree` is passed to one or more `Reporter` components. Each reporter is responsible for transforming this complete data model into a user-facing format, like an HTML report or a text summary.\n\nThis modular design ensures that each component has a single and clear responsibility.\n\n\n## Getting Started \u0026 Development\n\nThis section guides you through setting up the project for local development and contribution.\n\n### Development Environment Prerequisites\n\nTo work on this project, you will need certain tools installed depending on what you want to do.\n\n*   **Go (Required):** You must have Go version 1.23 or higher installed to build and run the core AdlerCov application.\n*   **Python (Optional):** Needed to run the `generate_reports.py` script located in the `Testprojects` directory. This script is used to generate sample coverage reports for testing.\n*   **Node.js \u0026 Angular CLI (Optional):** If you plan to modify the frontend of the HTML report, you will need Node.js and the Angular CLI to build the Angular single-page application located in the `internal/assets/angular_frontend_spa` directory.\n*   **.NET SDK (Optional):** Required by the `generate_reports.py` script to build the C# test project and generate its coverage data.\n\n### 1. Clone the Repository\n\nFirst, clone the project to your local machine using git:\n\n```bash\ngit clone https://github.com/IgorBayerl/AdlerCov.git\ncd AdlerCov\n```\n\n### 2. Run Locally\n\nYou can run the application directly without building a binary using `go run`. This is the recommended approach for development and quick testing.\n\nTo see all available command-line flags:\n```bash\ngo run ./cmd/main.go --help\n```\n\nTo run with a sample report (you may need to generate it first using the `generate_reports.py` script):\n```bash\ngo run ./cmd/main.go --report=\"Testprojects/Go/coverage.cobertura.xml\" --output=\"reports/go_report\"\n```\n\n### 3. Build the Binary\n\nTo compile the project into a single executable binary, use the `go build` command:\n\nLinux / Mac\n```bash\ngo build -o adlercov ./cmd/main.go\n```\n\nWindows\n```powershell\ngo build -o adlercov.exe ./cmd/main.go\n```\nThis will create an executable file named `adlercov` (or `adlercov.exe` on Windows) in the root directory. You can then run it directly:\n\n```bash\n./adlercov --report=\"path/to/your/coverage.xml\" --output=\"your_report_directory\"\n```\n\n### Feature Requests\n\nIf you're missing a feature from the original ReportGenerator or have new ideas, please [open an issue](https://github.com/IgorBayerl/AdlerCov/issues) and include:\n\n1. Feature description\n2. Reference (link or example from ReportGenerator)\n3. Sample CLI usage\n4. Sample input/output if possible\n\nThis context makes implementation much smoother.\n\n\n## License\n- **AdlerCov** is licensed under the [Apache License, Version 2.0](https://opensource.org/licenses/Apache-2.0)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorbayerl%2Fadlercov","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorbayerl%2Fadlercov","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorbayerl%2Fadlercov/lists"}