{"id":27158871,"url":"https://github.com/activecollab/baseline","last_synced_at":"2025-04-08T22:39:16.387Z","repository":{"id":56940227,"uuid":"190325958","full_name":"activecollab/baseline","owner":"activecollab","description":"Building blocks for automatic code quality checks during development","archived":false,"fork":false,"pushed_at":"2024-01-21T11:54:21.000Z","size":103,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T23:17:13.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://activecollab.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/activecollab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-05T04:30:17.000Z","updated_at":"2022-02-15T12:58:24.000Z","dependencies_parsed_at":"2022-08-21T06:20:49.318Z","dependency_job_id":null,"html_url":"https://github.com/activecollab/baseline","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fbaseline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fbaseline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fbaseline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fbaseline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/activecollab","download_url":"https://codeload.github.com/activecollab/baseline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247941718,"owners_count":21022035,"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","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":[],"created_at":"2025-04-08T22:39:15.856Z","updated_at":"2025-04-08T22:39:16.378Z","avatar_url":"https://github.com/activecollab.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ActiveCollab Baseline\n\n## Checking Code Quality\n\n### Checks\n\nChecks are grouped into two groups:\n\n1. Fixers - they check and modify the code. Modified files are automatically staged,\n2. Analyzers - they check the code, perform analysis without changing the code.\n\nIntnetion for this type of separation is to clearly communicate what user can expect from a particular check.\n\n### Running Checks Before each Commit\n\nIn order to add quality code checker as mandatory step prior to code being committed, you can use `pre-commit` hook. Open:\n\n```bash\nvi .git/hooks/pre-commit\n```\n\nand put:\n\n```php\n#!/usr/bin/php\n\u003c?php\n\n$qc_file_path = dirname(__DIR__, 2) . '/.php_qc.php';\n\nif (is_file($qc_file_path)) {\n    print \"Quality checker found at {$qc_file_path}. Running checks...\\n\\n\";\n\n    try {\n        $quality_checker = require_once $qc_file_path;\n        $quality_checker-\u003echeck();\n    } catch (\\Throwable $e) {\n        $quality_checker-\u003ecommunicateFailure($e);\n        \n        exit(1);\n    }\n} else {\n    print \"Quality checker not found at {$qc_file_path}\\n\";\n}\n\nexit(0);\n```\n\nDon't forget to set `pre-commit` hook as executable:\n\n```bash\nchmod +x .git/hooks/pre-commit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivecollab%2Fbaseline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivecollab%2Fbaseline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivecollab%2Fbaseline/lists"}