{"id":18853415,"url":"https://github.com/zyactions/dotnet-format","last_synced_at":"2026-05-08T19:33:48.998Z","repository":{"id":138143436,"uuid":"577363833","full_name":"zyactions/dotnet-format","owner":"zyactions","description":"A GitHub Action that wraps the .NET CLI `dotnet format` command.","archived":false,"fork":false,"pushed_at":"2023-09-04T16:39:58.000Z","size":31,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-22T04:08:34.364Z","etag":null,"topics":["continuous-integration","dotnet","github-actions"],"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-12T15:17:18.000Z","updated_at":"2022-12-23T16:24:50.000Z","dependencies_parsed_at":"2024-11-10T07:16:33.012Z","dependency_job_id":null,"html_url":"https://github.com/zyactions/dotnet-format","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/zyactions/dotnet-format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zyactions","download_url":"https://codeload.github.com/zyactions/dotnet-format/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyactions%2Fdotnet-format/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32794716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["continuous-integration","dotnet","github-actions"],"created_at":"2024-11-08T03:44:17.472Z","updated_at":"2026-05-08T19:33:48.981Z","avatar_url":"https://github.com/zyactions.png","language":"YAML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .NET Format\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 that wraps the .NET CLI `dotnet format` command. \n\n## Features\n\n- Wraps the `dotnet format` [.NET CLI][dotnet-sdk] command\n  - Provides a structured way of using this command in a workflow\n- Supports all platforms (Linux, macOS, Windows)\n- No external GitHub Actions dependencies\n\n\u003e **Note**\n\u003e\n\u003e This action provides a wrapper around the `dotnet format` [.NET CLI][dotnet-sdk] command. \n\u003e For further details, please check out the [official documentation][dotnet-format].\n\n## Usage\n\n### Format\n\n```yaml\nsteps:\n  - name: Checkout\n    uses: actions/checkout@v3\n\n  - name: .NET Format\n    uses: zyactions/dotnet-format@v1\n    with:\n      workspace: test\n      implicit-restore: true\n```\n\n\u003e **Note**\n\u003e\n\u003e Unlike the wrapped 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### Format a specific Project- or Solution\n\n```yaml\nsteps:\nsteps:\n  - name: Checkout\n    uses: actions/checkout@v3\n\n  - name: .NET Format\n    uses: zyactions/dotnet-format@v1\n    with:\n      workspace: test/Test.csproj\n      implicit-restore: true\n```\n\n### Format 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 Format\n    uses: zyactions/dotnet-format@v1\n    with:\n      workspace: test/Test.csproj\n      include: '-'\n      pipe: ${{ steps.glob.outputs.pipe }}\n      implicit-restore: true\n```\n\n\u003e **Note**: Check out the [zyactions/glob][zyactions-glob] action for further details.\n\n### Check Formatting without performing Changes\n\n```yaml\nsteps:\n  - name: Checkout\n    uses: actions/checkout@v3\n\n  - name: .NET Format\n    uses: zyactions/dotnet-format@v1\n    with:\n      workspace: test\n      verify-no-changes: true\n      implicit-restore: true\n```\n\n\u003e **Note**\n\u003e\n\u003e Check out the [zyactions/dotnet-lint][zyactions-dotnet-lint] action action if you like to create pull request annotations for detected formatting violations.\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\nThe `dotnet restore` 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 fixing 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 fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn`.\n\n### `verify-no-changes`\n\nVerifies that no formatting changes would be performed. Terminates with a non zero exit code if any files would have been formatted.\n\n### `include`\n\nA newline-separated list of relative file or folder paths to include in formatting. 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 formatting.\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 formatting.\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\u003e **Note**\n\u003e\n\u003e Check out the instructions for [installing a development build][dotnet-format-dev-builds] of `dotnet-format`.\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 does not use external GitHub Actions dependencies.\n\n## Versioning\n\nVersions follow the [semantic versioning scheme][semver].\n\n## License\n\n.NET Format 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-format-dev-builds]: https://github.com/dotnet/format#how-to-install-development-builds\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[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-format/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-format/actions/workflows/ci.yml\n[zyactions-dotnet-lint]: https://github.com/zyactions/dotnet-lint\n[zyactions-dotnet-restore]: https://github.com/zyactions/dotnet-restore\n[zyactions-dotnet-setup]: https://github.com/zyactions/dotnet-setup\n[zyactions-glob]: https://github.com/zyactions/glob\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyactions%2Fdotnet-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyactions%2Fdotnet-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyactions%2Fdotnet-format/lists"}