{"id":27933434,"url":"https://github.com/timescale/pg_ladybug","last_synced_at":"2026-01-15T23:06:04.049Z","repository":{"id":284446077,"uuid":"953935735","full_name":"timescale/pg_ladybug","owner":"timescale","description":"Static C code checker for postgres API","archived":false,"fork":false,"pushed_at":"2025-04-21T06:15:41.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-22T15:07:46.577Z","etag":null,"topics":["clang-tidy","postgresql"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"postgresql","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timescale.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}},"created_at":"2025-03-24T10:09:22.000Z","updated_at":"2025-05-17T10:23:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa1fe71e-cf7c-41f2-b7de-a72856c98865","html_url":"https://github.com/timescale/pg_ladybug","commit_stats":null,"previous_names":["svenklemm/pg_ladybug","timescale/pg_ladybug"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/timescale/pg_ladybug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpg_ladybug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpg_ladybug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpg_ladybug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpg_ladybug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timescale","download_url":"https://codeload.github.com/timescale/pg_ladybug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpg_ladybug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28473974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:27:41.514Z","status":"ssl_error","status_checked_at":"2026-01-15T21:54:47.910Z","response_time":62,"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":["clang-tidy","postgresql"],"created_at":"2025-05-07T04:58:41.809Z","updated_at":"2026-01-15T23:06:04.022Z","avatar_url":"https://github.com/timescale.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## pg_ladybug\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/timescale/pgspot/blob/main/LICENSE\"\u003e\u003cimg alt=\"License: PostgreSQL\" src=\"https://img.shields.io/github/license/timescale/pgspot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nStatic C code checker for postgres API\n\npg_ladybug checks C code using the postgres API for problematic patterns. It is implemented as a clang-tidy plugin.\n\npg_ladybug checks for the following patterns:\n\n- passing large int into Bitmapset\n- missing assignment for return value of Bitmapset functions\n\n## Installation\n\n```\napt-get install llvm-19 llvm-19-dev clang-19 libclang-19-dev clang-tidy-19\ngit clone https://github.com/timescale/pg_ladybug\ncd pg_ladybug\ncmake -S . -B build\nmake -C build\nsudo make -C build install\n```\n\n## Requirements\n\n- clang\n- clang-tidy\n- llvm\n\n### Usage\n\nVerify checks are present:\n```\nclang-tidy --load=/usr/local/lib/libPostgresCheck.so --checks='-*,postgres-*' --list-checks\nEnabled checks:\n    postgres-bitmapset\n```\n\n```\n% clang-tidy --load /usr/local/lib/libPostgresCheck.so --checks='-*,postgres-*' file.c\n2 warnings and 2 errors generated.\nError while processing file.c.\nfile.c:224:30: error: potential wrong function argument. bms_add_member called with datatype Oid [postgres-bitmapset-member]\n  224 |                 uncompressed_attrs_found = bms_add_member(uncompressed_attrs_found, ladybug_test);\n      |                                            ^\nfile.c:227:30: error: potential wrong function argument. bms_add_member called with datatype Oid [postgres-bitmapset-member]\n  227 |                 uncompressed_attrs_found = bms_add_member(uncompressed_attrs_found, ladybug_test);\n      |                                            ^\nSuppressed 2 warnings (2 in non-user code).\nUse -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimescale%2Fpg_ladybug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimescale%2Fpg_ladybug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimescale%2Fpg_ladybug/lists"}