{"id":13679581,"url":"https://github.com/badsyntax/vscode-spotless-gradle","last_synced_at":"2026-02-26T15:39:41.517Z","repository":{"id":37983578,"uuid":"260485448","full_name":"badsyntax/vscode-spotless-gradle","owner":"badsyntax","description":"A VS Code extension to lint \u0026 format your source files using Spotless \u0026 Gradle.","archived":false,"fork":false,"pushed_at":"2026-02-14T10:24:33.000Z","size":3496,"stargazers_count":17,"open_issues_count":54,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-14T19:22:18.006Z","etag":null,"topics":["gradle","gradle-tasks","spotless","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle","language":"TypeScript","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/badsyntax.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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":"2020-05-01T14:56:17.000Z","updated_at":"2025-05-28T04:28:12.000Z","dependencies_parsed_at":"2026-01-03T21:03:58.682Z","dependency_job_id":null,"html_url":"https://github.com/badsyntax/vscode-spotless-gradle","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/badsyntax/vscode-spotless-gradle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fvscode-spotless-gradle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fvscode-spotless-gradle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fvscode-spotless-gradle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fvscode-spotless-gradle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badsyntax","download_url":"https://codeload.github.com/badsyntax/vscode-spotless-gradle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fvscode-spotless-gradle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29863621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"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":["gradle","gradle-tasks","spotless","vscode","vscode-extension"],"created_at":"2024-08-02T13:01:07.116Z","updated_at":"2026-02-26T15:39:41.502Z","avatar_url":"https://github.com/badsyntax.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Spotless Gradle\n\n[![Marketplace Version](https://vsmarketplacebadge.apphb.com/version-short/richardwillis.vscode-spotless-gradle.svg)](https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle)\n[![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/richardwillis.vscode-spotless-gradle)](https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle)\n[![Build \u0026 Publish](https://github.com/badsyntax/vscode-spotless-gradle/workflows/Build%20\u0026%20Publish/badge.svg)](https://github.com/badsyntax/vscode-spotless-gradle/actions?query=workflow%3A\"Build+%26+Publish\")\n[![CodeQL](https://github.com/badsyntax/vscode-spotless-gradle/workflows/CodeQL/badge.svg)](https://github.com/badsyntax/vscode-spotless-gradle/actions?query=workflow%3ACodeQL)\n[![GitHub bug issues](https://img.shields.io/github/issues/badsyntax/vscode-spotless-gradle/bug?label=bug%20reports)](https://github.com/badsyntax/vscode-spotless-gradle/issues?q=is%3Aissue+is%3Aopen+label%3Abug)\n\nA VS Code extension to lint \u0026 format your code using [Spotless](https://github.com/diffplug/spotless) (via Gradle).\n\n\u003cimg src=\"./images/spotless-gradle-screencast.gif\" width=\"800\" alt=\"Spotless Gradle Screencast\" /\u003e\n\n## Features\n\n- Provides diagnostics to show invalid formatting (with quick fixes)\n- Provides a Spotless fixAll code action (`Format on Save`)\n- Provides a Spotless formatter (`Format Document`)\n- Supports all languages that Spotless supports\n\n## Requirements\n\n- [VS Code \u003e= 1.45.0](https://code.visualstudio.com/download)\n- [Gradle for Java Extension \u003e= 3.5.2](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle)\n- [Spotless Gradle Plugin \u003e= 3.30.0](https://github.com/diffplug/spotless/tree/main/plugin-gradle)\n- [Java \u003e= 8](https://adoptopenjdk.net/)\n\n## Usage\n\nBefore using this extension, ensure you've [configured Spotless](https://github.com/diffplug/spotless/tree/main/plugin-gradle) correctly in your Gradle build file. (Run `./gradlew spotlessDiagnose` to prepare \u0026 validate Spotless.)\n\n### Enabling Spotless\n\nSpotless formatting \u0026 diagnostics are _disabled by default_. Change the settings to adjust this behavior:\n\n```json\n{\n  \"[java]\": {\n    \"spotlessGradle.format.enable\": true,\n    \"spotlessGradle.diagnostics.enable\": true\n  }\n}\n```\n\n#### Formatting\n\nFormat on save:\n\n```json\n{\n  \"[java]\": {\n    \"spotlessGradle.format.enable\": true,\n    \"editor.codeActionsOnSave\": {\n      \"source.fixAll.spotlessGradle\": true\n    }\n  }\n}\n```\n\nIf there are multiple formatters for a language type, set Spotless to be the default:\n\n```json\n{\n  \"[java]\": {\n    \"spotlessGradle.format.enable\": true,\n    \"editor.defaultFormatter\": \"richardwillis.vscode-spotless-gradle\"\n  }\n}\n```\n\nDisable other formatters to improve the performance, for example:\n\n```json\n{\n  \"[java]\": {\n    \"spotlessGradle.format.enable\": true,\n    \"files.trimTrailingWhitespace\": false\n  }\n}\n```\n\n### Typical Usage\n\nAs Spotless formatting is not a global feature, you should enable Spotless on a per-project basis, which is achieved by adding a `.vscode/settings.json` file to the root of the project\n\nEnable for specific languages:\n\n```json\n{\n  \"java.format.enabled\": false,\n  \"[java]\": {\n    \"files.trimTrailingWhitespace\": false,\n    \"spotlessGradle.diagnostics.enable\": true,\n    \"spotlessGradle.format.enable\": true,\n    \"editor.defaultFormatter\": \"richardwillis.vscode-spotless-gradle\",\n    \"editor.codeActionsOnSave\": {\n      \"source.fixAll.spotlessGradle\": true\n    }\n  },\n  \"[gradle]\": {\n    \"files.trimTrailingWhitespace\": false,\n    \"spotlessGradle.diagnostics.enable\": true,\n    \"spotlessGradle.format.enable\": true,\n    \"editor.defaultFormatter\": \"richardwillis.vscode-spotless-gradle\",\n    \"editor.codeActionsOnSave\": {\n      \"source.fixAll.spotlessGradle\": true\n    }\n  }\n}\n```\n\nEnable for all languages:\n\n```json\n{\n  \"java.format.enabled\": false,\n  \"files.trimTrailingWhitespace\": false,\n  \"spotlessGradle.diagnostics.enable\": true,\n  \"spotlessGradle.format.enable\": true,\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.spotlessGradle\": true\n  },\n  \"[java]\": {\n    \"editor.defaultFormatter\": \"richardwillis.vscode-spotless-gradle\"\n  },\n  \"[gradle]\": {\n    \"editor.defaultFormatter\": \"richardwillis.vscode-spotless-gradle\"\n  }\n}\n```\n\n## How it Works\n\nThis extension runs the `spotlessApply` Gradle task on the focused file using the Spotless [IDE hook](https://github.com/diffplug/spotless/blob/main/plugin-gradle/IDE_HOOK.md) feature. Untitled/Unsaved files are ignored.\n\nThe vscode =\u003e Spotless interface is provided by the [Gradle for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle) extension.\n\n👉 [Architecture Overview](./ARCHITECTURE.md)\n\n## Troubleshooting\n\nView logs by selecting `Spotless Gradle` and/or `Gradle for Java` in the output panel.\n\n## Support\n\n- 👉 [Submit a bug report](https://github.com/badsyntax/vscode-spotless-gradle/issues/new?assignees=badsyntax\u0026labels=bug\u0026template=bug_report.md\u0026title=)\n- 👉 [Submit a feature request](https://github.com/badsyntax/vscode-spotless-gradle/issues/new?assignees=badsyntax\u0026labels=enhancement\u0026template=feature_request.md\u0026title=)\n\n## Credits\n\n- Thanks to [Ned Twigg](https://github.com/nedtwigg) for adapting Spotless for better IDE integration\n- Thanks to all the [Spotless contributors](https://github.com/diffplug/spotless#acknowledgements)\n\n## Release Notes\n\nSee [CHANGELOG.md](./CHANGELOG.md).\n\n## License\n\nSee [LICENSE.md](./LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadsyntax%2Fvscode-spotless-gradle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadsyntax%2Fvscode-spotless-gradle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadsyntax%2Fvscode-spotless-gradle/lists"}