{"id":18853419,"url":"https://github.com/zyactions/dotnet-lint","last_synced_at":"2025-04-14T10:23:45.297Z","repository":{"id":65162479,"uuid":"581574737","full_name":"zyactions/dotnet-lint","owner":"zyactions","description":"A GitHub Action to lint .NET projects.","archived":false,"fork":false,"pushed_at":"2023-09-04T21:36:58.000Z","size":30,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T22:35:21.693Z","etag":null,"topics":["continuous-integration","dotnet","github-actions","lint"],"latest_commit_sha":null,"homepage":"","language":"YAML","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/zyactions.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}},"created_at":"2022-12-23T15:41:26.000Z","updated_at":"2024-08-11T15:47:10.000Z","dependencies_parsed_at":"2024-11-08T03:44:26.917Z","dependency_job_id":"9e18dd90-0262-4c00-b218-3c904fbc2686","html_url":"https://github.com/zyactions/dotnet-lint","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"fc52e699c65e71ed4f2c59079caaca03277cdaa5"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zyactions","download_url":"https://codeload.github.com/zyactions/dotnet-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860593,"owners_count":21173465,"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":["continuous-integration","dotnet","github-actions","lint"],"created_at":"2024-11-08T03:44:19.095Z","updated_at":"2025-04-14T10:23:45.276Z","avatar_url":"https://github.com/zyactions.png","language":"YAML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .NET Lint\n\n![License: MIT][shield-license-mit]\n[![CI][shield-ci]][workflow-ci]\n[![Ubuntu][shield-platform-ubuntu]][job-runs-on]\n[![macOS][shield-platform-macos]][job-runs-on]\n[![Windows][shield-platform-windows]][job-runs-on]\n\nA GitHub Action to lint .NET projects. \n\n## Features\n\n- Lints .NET projects using the official [dotnet format][dotnet-format] .NET CLI tool\n- Creates pull request annotations for detected code style violations\n- Registers a [problem matcher][problem-matchers] for error output\n- Supports all platforms (Linux, macOS, Windows)\n\n## Usage\n\n### Lint\n\n```yaml\nsteps:\n  - name: Checkout\n    uses: actions/checkout@v3\n\n  - name: .NET Lint\n    uses: zyactions/dotnet-lint@v1\n    with:\n      workspace: test\n      implicit-restore: true\n```\n\n\u003e **Note**\n\u003e\n\u003e Unlike the wrapped `dotnet format` command, this action does not perform an implicit package restore by default. A manual package restore (e.g. using [zyactions/dotnet-restore][zyactions-dotnet-restore]) is required by design.\n\u003e\n\u003e Set `implicit-restore` to `true` to switch back to the original behavior.\n\n### Lint a specific Project- or Solution\n\n```yaml\nsteps:\nsteps:\n  - name: Checkout\n    uses: actions/checkout@v3\n\n  - name: .NET Lint\n    uses: zyactions/dotnet-lint@v1\n    with:\n      workspace: test/Test.csproj\n      implicit-restore: true\n```\n\n### Lint only specific Files using a Glob Pattern\n\n```yaml\nsteps:\n  - name: Checkout\n    uses: actions/checkout@v3\n\n  - name: Glob Match\n    id: glob\n    uses: zyactions/glob@v2\n    with:\n      pattern: |\n        test/*.cs\n        !test/*.AutoGenerated.cs\n      return-pipe: true\n\n  - name: .NET Lint\n    uses: zyactions/dotnet-lint@v1\n    with:\n      workspace: test/Test.csproj\n      include: '-'\n      pipe: ${{ steps.glob.outputs.pipe }}\n      implicit-restore: true\n```\n\n## Inputs\n\n### `working-directory`\n\nThe working-directory for the action.\n\nDefaults to the repository root directory (`github.workspace`).\n\n\u003e **Note**\n\u003e\n\u003e If a specific .NET SDK version is to be used, the working directory must point to the directory that contains the `global.json` or a subdirectory of it.\n\n### `workspace`\n\nThe Visual Studio workspace (directory, project- or solution-file).\n\nThis path is relative to the `working-directory` unless an absolute path is used.\n\nThe `dotnet format` command automatically searches for a Visual Studio Solution file (`*.sln`) in the specified workspace directory, if no explicit solution- or project- file is specified.\n\nExample values:\n\n- `path/to/workspace`\n- `path/to/Solution.sln`\n- `path/to/Project.csproj`\n\n### `diagnostics`\n\nA newline-separated list of diagnostic IDs to use as a filter when linting code style or third-party issues. Default value is whichever IDs are listed in the `.editorconfig` file. For a list of built-in analyzer rule IDs that you can specify, see the [list of IDs for code-analysis style rules][style-rules].\n\n### `severity`\n\nThe minimum severity of diagnostics to lint. Allowed values are `info`, `warn`, and `error`. The default value is `warn`.\n\n### `include`\n\nA newline-separated list of relative file or folder paths to include in linting. The default is all files in the solution or project.\n\nUse `-` to read the list of files from the `pipe` input.\n\n### `exclude`\n\nA newline-separated list of relative file or folder paths to exclude from linting.\n\nThe default is none.\n\nUse `-` to read the list of files from the `pipe` input.\n\n### `report-path`\n\nProduces a JSON report in the specified directory.\n\n### `implicit-restore`\n\nExecute an implicit restore before linting.\n\n### `use-standalone-tool`\n\nUses the standalone version of the `dotnet-format` tool instead of the version bundled with the .NET SDK.\n\n### `pipe`\n\nAn optional pipe input from which the `include` or `exclude` filenames are to be read.\n\nThis must be set to a valid shell command line (bash) that can be used for piping. The command must output to `stdout` and separate the individual filenames by line breaks.\n\n\u003e **Warning**\n\u003e\n\u003e The command passed to this input will be evaluated and should not come from untrusted sources.\n\n## Requirements\n\nThe [.NET CLI][dotnet-sdk] needs to be installed on the runner. To be independent from the GitHub defaults, it's recommended to install a specific version of the SDK prior to calling this action.\n\nTo install the .NET SDK in your workflow, the following actions can be used:\n\n- [zyactions/dotnet-setup][zyactions-dotnet-setup]\n- [actions/setup-dotnet][actions-setup-dotnet]\n\n## Dependencies\n\nThis action uses the following GitHub Actions dependencies:\n\n- [zyactions/dotnet-format][zyactions-dotnet-format] (pinned)\n\n## Versioning\n\nVersions follow the [semantic versioning scheme][semver].\n\n## License\n\n.NET Lint Action is licensed under the MIT license.\n\n[actions-setup-dotnet]: https://github.com/actions/setup-dotnet\n[dotnet-format]: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format\n[dotnet-sdk]: https://github.com/dotnet/sdk\n[job-runs-on]: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on\n[problem-matchers]: https://github.com/actions/runner/blob/main/docs/adrs/0276-problem-matchers.md\n[semver]: https://semver.org\n[shield-license-mit]: https://img.shields.io/badge/License-MIT-blue.svg\n[shield-ci]: https://github.com/zyactions/dotnet-lint/actions/workflows/ci.yml/badge.svg\n[shield-platform-ubuntu]: https://img.shields.io/badge/Ubuntu-E95420?logo=ubuntu\\\u0026logoColor=white\n[shield-platform-macos]: https://img.shields.io/badge/macOS-53C633?logo=apple\\\u0026logoColor=white\n[shield-platform-windows]: https://img.shields.io/badge/Windows-0078D6?logo=windows\\\u0026logoColor=white\n[style-rules]: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules\n[workflow-ci]: https://github.com/zyactions/dotnet-lint/actions/workflows/ci.yml\n[zyactions-dotnet-format]: https://github.com/zyactions/dotnet-format\n[zyactions-dotnet-restore]: https://github.com/zyactions/dotnet-restore\n[zyactions-dotnet-setup]: https://github.com/zyactions/dotnet-setup\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyactions%2Fdotnet-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyactions%2Fdotnet-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyactions%2Fdotnet-lint/lists"}