{"id":28716416,"url":"https://github.com/goelhardik/ignore","last_synced_at":"2025-07-16T07:37:42.608Z","repository":{"id":39617393,"uuid":"319509955","full_name":"goelhardik/ignore","owner":"goelhardik","description":".gitignore based parser implemented in C# according to the .gitignore spec 2.29.2.","archived":false,"fork":false,"pushed_at":"2024-07-18T14:53:57.000Z","size":77,"stargazers_count":55,"open_issues_count":5,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-15T03:01:47.145Z","etag":null,"topics":["csharp","gitignore","glob","nuget","parser"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goelhardik.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":"2020-12-08T03:04:53.000Z","updated_at":"2025-05-17T16:10:17.000Z","dependencies_parsed_at":"2025-06-15T03:01:11.251Z","dependency_job_id":"319859ad-fb05-426b-b07f-5b0e3fc386e8","html_url":"https://github.com/goelhardik/ignore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/goelhardik/ignore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goelhardik%2Fignore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goelhardik%2Fignore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goelhardik%2Fignore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goelhardik%2Fignore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goelhardik","download_url":"https://codeload.github.com/goelhardik/ignore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goelhardik%2Fignore/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265424570,"owners_count":23762881,"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":["csharp","gitignore","glob","nuget","parser"],"created_at":"2025-06-15T03:00:54.897Z","updated_at":"2025-07-16T07:37:42.562Z","avatar_url":"https://github.com/goelhardik.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ignore\n\n![Build](https://github.com/goelhardik/ignore/workflows/Build/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/goelhardik/ignore/branch/main/graph/badge.svg?token=5YE7LBW8K0)](https://codecov.io/gh/goelhardik/ignore)\n[![NuGet](https://img.shields.io/nuget/v/Ignore)](https://www.nuget.org/packages/Ignore)\n\n.gitignore based parser implemented in C# according to the [.gitignore spec 2.29.2](https://git-scm.com/docs/gitignore).\n\nThe library is tested against real `git status` outputs. The tests use `LibGit2Sharp` for that.\n\n## Installation\n\nIgnore can be installed from NuGet.\n\n```PowerShell\nInstall-Package Ignore\n```\n\n## Usage\n\n```cs\n// Initialize ignore\nvar ignore = new Ignore();\n\n// Add a rule\nignore.Add(\".vs/\");\n\n// Add multiple rules\nignore.Add(new[] { \"*.user\", \"obj/*\" });\n\n// Add rules fluently\nignore\n    .Add(\".vs/\")\n    .Add(new[] { \"*.user\", \"obj/*\" });\n\n// Filter paths to exclude paths ignored as per the rules\nvar filteredFiles = ignore.Filter(new[] { \".vs/a.txt\", \"x.user\", \"obj/a.dll\" });\n\n// Check if a path is ignored\nvar isIgnored = ignore.IsIgnored(\"x.user\");\n```\n\n## Developing\n\nIgnore targets `netstandard2.0` and `net8.0` for the main library and uses `net6.0` and `net8.0` for the unit tests (Xunit).\n\n### Build\n\nFrom the root directory\n\n```console\ndotnet build\n```\n\n### Test\n\nFrom the root directory\n\n```console\ndotnet test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoelhardik%2Fignore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoelhardik%2Fignore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoelhardik%2Fignore/lists"}