{"id":34521935,"url":"https://github.com/secondlife/git-hooks","last_synced_at":"2026-05-25T13:31:20.355Z","repository":{"id":138610479,"uuid":"560981319","full_name":"secondlife/git-hooks","owner":"secondlife","description":"Git hooks that enforce LL coding style","archived":false,"fork":false,"pushed_at":"2024-03-01T20:54:26.000Z","size":84,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-03-01T21:44:14.068Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/secondlife.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-11-02T17:19:29.000Z","updated_at":"2022-11-19T00:40:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f886059-c45a-485b-8a52-715e52186f9a","html_url":"https://github.com/secondlife/git-hooks","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/secondlife/git-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fgit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fgit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fgit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fgit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secondlife","download_url":"https://codeload.github.com/secondlife/git-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fgit-hooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33477426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T06:32:55.349Z","status":"ssl_error","status_checked_at":"2026-05-25T06:32:35.322Z","response_time":57,"last_error":"SSL_read: 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":[],"created_at":"2025-12-24T04:59:09.304Z","updated_at":"2026-05-25T13:31:20.329Z","avatar_url":"https://github.com/secondlife.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linden Lab Pre-commit Hooks\n\n[![codecov](https://codecov.io/gh/secondlife/git-hooks/branch/main/graph/badge.svg?token=GR8A4SWE6C)](https://codecov.io/gh/secondlife/git-hooks)\n\nA collection of [pre-commit][] scripts used for checking commits and files against [Linden coding standards][standards].\n\n## Use\n\n**Requirements:**\n\n- [pre-commit][] - an open source program for managing git pre-commit behavior\n\nYou should have [pre-commit][] installed on your machine. Be sure you have your user-level Python Scripts directory on your `PATH`. ex. `C:\\Users\\USERNAME\\Roaming\\Python\\Python39\\Scripts` on Windows or `~/.local/bin` everywhere else. After doing so, you can run `pre-commit install` in any git project containing a `.pre-commit-config.yaml` file to install hooks and dependencies.\n\n### Instructions for Second Life Viewer Development\n\nCheckout the [viewer][] as normal. Then run:\n\n```text\npre-commit install -f\npre-commit install -f -t commit-msg\n```\n\nIf you need to manually run any hooks, you can do so:\n\nRun a specific hook (by ID) over all files\n```text\npre-commit run --all-files opensource-license\n```\n\nRun all hooks over all files\n```text\npre-commit run --all-files\n```\n\n### Configuration File\n\nTo add these hooks to your own repository create a `.pre-commit-config.yaml` file in its root:\n\nExample `.pre-commit-config.yaml`:\n```yaml\nrepos:\n  - repo: https://github.com/secondlife/git-hooks.git\n    rev: v1.0.0\n    hooks:\n      - id: opensource-license\n      - id: jira-issue\n      - id: llsd\n      - id: no-trigraphs\n      - id: copyright\n      - id: end-of-file\n        files: \\.(cpp|c|h|py|glsl|cmake|txt)$\n        exclude: language.txt\n  - repo: https://github.com/pre-commit/pre-commit-hooks\n    rev: v4.1.0\n    hooks:\n      - id: check-xml\n      - id: mixed-line-ending\n```\n\n### Provided hooks\n\n- `copyright` - Check code for a copyright notice\n- `end-of-file` - Check and fix any files that do not end in a newline.\n- `indent-with-spaces` - Check if files that should be indented with spaces are (Python, etc.)\n- `indent-with-tabs` - Check if files that should be indented with tabs are (Makefile, etc.)\n- `jira-issue` - Check commit message for a valid Linden Jira ticket number\n- `license` - Check code for a more generic license. Used on internal projects.\n- `llsd` - Check that llsd files can be parsed\n- `no-trigraphs` - Check C/C++ code for trigraphs\n- `opensource-license` - Check code for an opensource license (MIT, LGPL, etc.)\n\n### Use without pre-commit\n\nIt is also possible to use these scripts without [pre-commit][] by installing and running them yourself:\n\n```text\n# Clone this repository\ngit clone https://bitbucket.org/lindenlab/git-hooks.git\ncd git-hooks\n# Install the project using pip. This requires that $HOME/.local/bin is on your path\npip install .\n\n# Run checks manually\ncheck-linden-copyright [PATH TO FILE]\n```\n\nSee `setup.cfg`'s `[options.entry_points]` for a full list of scripts.\n\n### Development\n\nTo set up your development environment run\n\n```text\npip install -e .[dev]\npre-commit install\n```\n\n[standards]: https://wiki.secondlife.com/wiki/Coding_standard\n[pre-commit]: https://pre-commit.com/\n[viewer]: https://bitbucket.org/lindenlab/viewer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondlife%2Fgit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecondlife%2Fgit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondlife%2Fgit-hooks/lists"}