{"id":26005403,"url":"https://github.com/precice/precice-pre-commit-hooks","last_synced_at":"2025-03-05T20:53:53.750Z","repository":{"id":43205540,"uuid":"511123558","full_name":"precice/precice-pre-commit-hooks","owner":"precice","description":"preCICE specific hooks to use with pre-commit","archived":false,"fork":false,"pushed_at":"2024-02-21T12:26:27.000Z","size":10,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-03-26T07:17:10.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/precice.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-07-06T12:14:15.000Z","updated_at":"2022-07-06T12:35:59.000Z","dependencies_parsed_at":"2024-02-21T13:38:01.659Z","dependency_job_id":null,"html_url":"https://github.com/precice/precice-pre-commit-hooks","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fprecice-pre-commit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fprecice-pre-commit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fprecice-pre-commit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fprecice-pre-commit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/precice","download_url":"https://codeload.github.com/precice/precice-pre-commit-hooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242103971,"owners_count":20072369,"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-03-05T20:53:53.127Z","updated_at":"2025-03-05T20:53:53.743Z","avatar_url":"https://github.com/precice.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pre-commit hooks for preCICE\n\nThis repo contains [pre-commit](https://github.com/pre-commit/pre-commit) hooks for [preCICE](https://github.com/precice/precice).\n\n## Versioning of this repo\n\nHooks cover a major version of preCICE.\nThe version is `vX.Y`, where `X` is the major version of preCICE and `Y` is the release of the hook.\n\nThus, if you plan to use these hooks with preCICE version `2.3.1`, then only the `2` is important for the hook version.\n\n## Using the hooks\n\nAdd this to your `.pre-commit-config.yaml` in the root of your project:\n\n```yaml\n-   repo: https://github.com/precice/precice-pre-commit-hooks\n    rev: ''  # Use the tag you want to use\n    hooks:\n    -   id: format-precice-config\n        exclude: '^thridparty' # optionally exclude directories here\n    -   id: check-image-prefix\n        files: 'docs/images/.*'\n        args: [ --prefix=docs-myspecialcomponent- ]\n```\n\n**Note:**\nThe hook will treat every `.xml` file as a preCICE configuration file.\nYou may need to exclude directories using `exclude`.\n\n## Hooks\n\n### format-precice-config\n\nFormats given preCICE configuration files.\nReturns 0 on success, 1 on error, and 2 if a file was modified.\n\n### check-image-prefix\n\nThis hook is only relevant for repositories integrated into [the website](https://github.com/precice/precice.github.io)\n\nChecks if given images have the requested prefix.\nOnly takes images into account that are inside a folder called `images/`.\nPass the prefix to the hook by defining `args: [ --prefix=my-prefix- ]`.\nReturns 0 on success, 1 on incorrect prefix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Fprecice-pre-commit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprecice%2Fprecice-pre-commit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Fprecice-pre-commit-hooks/lists"}