{"id":44538051,"url":"https://github.com/blaahaj/lint-git-tree","last_synced_at":"2026-02-13T18:52:42.810Z","repository":{"id":291357162,"uuid":"977383905","full_name":"blaahaj/lint-git-tree","owner":"blaahaj","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-13T20:31:36.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T22:25:54.264Z","etag":null,"topics":["github-action","tool"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blaahaj.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-04T04:39:06.000Z","updated_at":"2026-01-13T20:31:40.000Z","dependencies_parsed_at":"2025-05-04T09:19:52.868Z","dependency_job_id":"53acd739-ebd1-4c49-aaca-00e76c8121c0","html_url":"https://github.com/blaahaj/lint-git-tree","commit_stats":null,"previous_names":["blaahaj/tree","blaahaj/lint-git-tree"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/blaahaj/lint-git-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaahaj%2Flint-git-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaahaj%2Flint-git-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaahaj%2Flint-git-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaahaj%2Flint-git-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blaahaj","download_url":"https://codeload.github.com/blaahaj/lint-git-tree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaahaj%2Flint-git-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["github-action","tool"],"created_at":"2026-02-13T18:52:42.066Z","updated_at":"2026-02-13T18:52:42.798Z","avatar_url":"https://github.com/blaahaj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @blaahaj/lint-git-tree\n\nCheck that the file / directory names in a Git repository:\n\n- are valid, normalised UTF-8;\n- are case-insensitively unique within each directory.\n\n## How to run it\n\n`lint-git-tree` can be run via GitHub Actions, or via `npx`.\n\n### As a GitHub action\n\nThe key is to have a step which includes:\n\n```yaml\nuses: blaahaj/lint-git-tree@v1.1.0\n```\n\nFor example, you could have a `.github/workflows/lint-git-tree.yml` file with the following:\n\n```yaml\n---\nname: lint-git-tree\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    types:\n      - opened\n      - synchronize\n      - reopened\n\njobs:\n  build:\n    name: lint-git-tree\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: lint-git-tree\n        uses: blaahaj/lint-git-tree@v1.1.0\n```\n\n### Via `npx`\n\nSimply invoke using `npx` from the root of your git working tree:\n\n```shell\nnpx @blaahaj/lint-git-tree@v1.1.0\n```\n\n## What is checked\n\n`lint-git-tree` _only_ checks the file and directory names in a Git repository. It does not look inside the files at all. In other words, it's essentially checking the output of `git ls-tree -r --name-only HEAD`.\n\n### Names must be valid UTF-8\n\nEach file / directory name must be valid UTF-8. Any name that fails this check will be reported like this:\n\n```text\nERROR: invalid utf-8 in 'n�r' \u003cBuffer 6e c3 72\u003e (full path: 'a/n�r')\n```\n\nIn this example, inside the directory `a`, there is a file or directory whose name consists of the three bytes `6e c3 72`. This is not valid UTF-8.\n\nSolution: rename the item to have a valid UTF-8 name.\n\n### Names must be normalized UTF-8\n\nEach file / directory name must be normalized UTF-8. Any name that fails this check will be reported like this:\n\n```text\nERROR: non-normalised utf-8 encoding når' \u003cBuffer 6e 61 cc 8a 72\u003e (full path: 'a/når')\n```\n\nIn this example, inside the directory `a`, there is a file or directory whose name is \"når\", encoded as the five bytes `6e 61 cc 8a 72`. While this is valid UTF-8, it is not normalized UTF-8.\n\nSolution: rename the item to use normalized encoding.\n\nNote: when trying to fix this error, some tools might not recognised that anything has actually changed, and therefore they might not let you commit. If this happens, you might find it helpful to solve this by renaming twice: rename to some temporary name, then commit; then rename to the correct name, and commit again.\n\n### Names must be case-insensitively unique within each directory\n\nWithin each directory, each file or directory must have a unique name, ignoring case.\n\nFor example, it is not permitted to have both a \"foo\" and a \"Foo\" in the same directory.\n\nAny combination of names that fails this check will be reported like this:\n\n```text\nERROR: case clash between 'FOO' and 'foo' under directory 'x'\n```\n\nSolution: Ensure there are no case clashes.\n\nNote: if `lint-git-tree` is reporting this error, but when looking at your files and directories, you can't see the problem, try looking using `git ls-tree HEAD`.\n\nFor example, if `git ls-tree` shows:\n\n```text\n100644 blob 98797936214eb95b087a9b842bc9c30b1f29a018  A-FILE\n100644 blob 18aa34a98515b843471406d4677c2b02fc5f482a  a-file\n```\n\nOnce you can see the problem, you should be able to rectify it by manipulating the git index directly: `git rm --cached thing-to-remove`,\nthen commit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaahaj%2Flint-git-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblaahaj%2Flint-git-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaahaj%2Flint-git-tree/lists"}