{"id":15929524,"url":"https://github.com/tomtom-international/llvm-diagnostics","last_synced_at":"2026-01-21T19:34:56.732Z","repository":{"id":38206821,"uuid":"488154015","full_name":"tomtom-international/llvm-diagnostics","owner":"tomtom-international","description":"Python module for creating diagnostics using the LLVM diagnostics specification","archived":false,"fork":false,"pushed_at":"2025-08-12T12:07:14.000Z","size":85,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-20T07:47:45.562Z","etag":null,"topics":["diagnostics","llvm","logging","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/tomtom-international.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-03T09:49:10.000Z","updated_at":"2022-05-10T09:33:31.000Z","dependencies_parsed_at":"2024-01-31T15:00:26.816Z","dependency_job_id":null,"html_url":"https://github.com/tomtom-international/llvm-diagnostics","commit_stats":{"total_commits":40,"total_committers":5,"mean_commits":8.0,"dds":0.6,"last_synced_commit":"ba412808fd4b10564fce7e061eb8598809f7ed69"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/tomtom-international/llvm-diagnostics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom-international%2Fllvm-diagnostics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom-international%2Fllvm-diagnostics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom-international%2Fllvm-diagnostics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom-international%2Fllvm-diagnostics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomtom-international","download_url":"https://codeload.github.com/tomtom-international/llvm-diagnostics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom-international%2Fllvm-diagnostics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28641275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["diagnostics","llvm","logging","python"],"created_at":"2024-10-07T00:04:26.656Z","updated_at":"2026-01-21T19:34:56.715Z","avatar_url":"https://github.com/tomtom-international.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llvm-diagnostics\n\nPython module for creating diagnostics using the LLVM diagnostics specification\n\n# Installation\n\n```sh\n% pip install llvm-diagnostics\n```\n\n# Usage\n\n## Parsing a log file containing LLVM Diagnostics messages\n\nParsing a logging file can be done as follows:\n\n```python\nfrom llvm_diagnostics.parser import diagnostics_messages_from_file\n\nfor error in list(diagnostics_messages_from_file(\"test/resources/test.out\")):\n   print(f\"Diagnostics Message found:\")\n   print(f\"  File: {error.file_path}\")\n   print(f\"  Level: {error.level}\")\n   print(f\"  Message: {error.message}\")\n```\n\nWhich will result in output similar to:\n\n```sh\nDiagnostics Message found:\n  File: /code/supermarket-buyer-supplier/src/offers/convert_customer_receipt.cpp\n  Level: DiagnosticsLevel.WARNING\n  Message: 'fruit_section' is deprecated: 2021.Q2 Deprecated Use application::supermarket_app::receipt_engine::receipt::FruitInformation::fruit_section_labels [-Wdeprecated-declarations]\n```\n\n## Reporting on Diagnostics messages\n\nYou can use `llvm-diagnostics` to create your own Diagnostics messages.\n\n### Reporting a message in LLVM Diagnostics format\n\n```python\nimport llvm_diagnostics as logger\n\nmessage = logger.Warning(\n   file_path='fake_file.py',\n   line_number=logger.Range(start=10),\n   column_number=logger.Range(start=15, range=3),\n   line=\"mPercentage = 105\",\n   expectations=\"100\",\n   message='Value exceeds maximum, automatically capped to 100',\n).report()\n```\nThis will result in the following message on `stderr`:\n\n![example](resources/llvm_output_example.png)\n\n### Reporting a message in GitHub format\n\n```python\nimport llvm_diagnostics as logger\n\nlogger.config(logger.formatters.GitHub())\n\nmessage = logger.Warning(\n   file_path='fake_file.py',\n   line_number=logger.Range(start=10),\n   column_number=logger.Range(start=15, range=3),\n   line=\"mPercentage = 105\",\n   expectations=\"100\",\n   message='Value exceeds maximum, automatically capped to 100',\n).report()\n```\n\nThis will result in the following message on `stderr`:\n\n```sh\n::warning file=fake_file.py,line=10,col=15,endColumn=18::Value exceeds maximum, automatically capped to 100\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom-international%2Fllvm-diagnostics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomtom-international%2Fllvm-diagnostics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom-international%2Fllvm-diagnostics/lists"}