{"id":16304760,"url":"https://github.com/moznion/sbt-spotless","last_synced_at":"2025-07-21T13:34:46.001Z","repository":{"id":51140638,"uuid":"255125331","full_name":"moznion/sbt-spotless","owner":"moznion","description":"An sbt plugin for Spotless code formatter/checker","archived":false,"fork":false,"pushed_at":"2025-07-20T22:44:38.000Z","size":148,"stargazers_count":5,"open_issues_count":15,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-21T00:23:07.107Z","etag":null,"topics":["code-formatter","sbt","sbt-plugin","spotless"],"latest_commit_sha":null,"homepage":"https://search.maven.org/artifact/net.moznion.sbt/sbt-spotless","language":"Scala","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/moznion.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-04-12T16:35:25.000Z","updated_at":"2024-10-20T09:24:18.000Z","dependencies_parsed_at":"2024-07-26T21:16:15.007Z","dependency_job_id":"90841dfb-3974-4ecf-9dc3-41961c1545c0","html_url":"https://github.com/moznion/sbt-spotless","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":0.08571428571428574,"last_synced_commit":"fa2da0c3d53e1e1e91c6f9f98e0c6fc8fa213059"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/moznion/sbt-spotless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fsbt-spotless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fsbt-spotless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fsbt-spotless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fsbt-spotless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moznion","download_url":"https://codeload.github.com/moznion/sbt-spotless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fsbt-spotless/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266312188,"owners_count":23909745,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["code-formatter","sbt","sbt-plugin","spotless"],"created_at":"2024-10-10T21:04:44.195Z","updated_at":"2025-07-21T13:34:45.947Z","avatar_url":"https://github.com/moznion.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sbt-spotless [![Scala CI](https://github.com/moznion/sbt-spotless/workflows/Scala%20CI/badge.svg)](https://github.com/moznion/sbt-spotless/actions?query=workflow%3A%22Scala+CI%22) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.moznion.sbt/sbt-spotless/badge.svg?kill_cache=1)](https://search.maven.org/artifact/net.moznion.sbt/sbt-spotless/)\n\nAn sbt plugin for [Spotless](https://github.com/diffplug/spotless) code formatter/checker.\n\n## Installation\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.moznion.sbt/sbt-spotless/badge.svg?kill_cache=1)](https://search.maven.org/artifact/net.moznion.sbt/sbt-spotless/)\n\nin your `plugins.sbt`:\n\n```\naddSbtPlugin(\"net.moznion.sbt\" % \"sbt-spotless\" % \"0.1.3\")\n```\n\n### Supported sbt versions\n\n- sbt 1.3\n- sbt 0.13\n\nThis plugin supports the legacy sbt 0.13, but the legacy one has some issue on dynamic dependency resolution (see also [known issue](#known-issues)) and there might be some unexpected behavior potentially. Also an author doesn't motivate to maintenance the \"legacy sbt\" in the future continuously/positively, so there will a possibility to give up the support without notice. So I highly recommend considering to upgrade the sbt to 1.3.\n\n## Usage\n\n### Check the code format\n\n```\n$ sbt spotlessCheck\n```\n\n### Apply the code formatter\n\n```\n$ sbt spotlessApply\n```\n\n## Supported formatters\n\n|Format|Implemented|\n|------|:----:|\n|Java|✅|\n|Scala|✅|\n|Kotlin|✅|\n|Groovy|✅|\n|cpp|✅|\n|SQL|✅|\n\nSupporting other formats is under working. And of course, pull-request is welcome.\n\n## Configurations\n\nPlease refer to the following wiki page: [Configurations](https://github.com/moznion/sbt-spotless/wiki/Configurations)\n\n## Dynamic dependency\n\nSpotless tries to reduce the static dependencies of various formatters, so spotless resolves the dependencies for formatters on-the-fly if the formatter is needed.\n\nBasically, Spotless runner resolves the dynamic dependencies every time, that is not efficient. So this plugin caches the dynamic dependencies into files once that has resolved deps. And after that, it runs Spotless with cached libraries.\n\n## Known issues\n\n### (sbt 1.3) Some formatter cannot resolve the dynamic dependency\n\nOn some formatter, this plugin (i.e. Ivy2) cannot resolve dependencies of the formatter dynamically so it needs to declare the dependencies explicitly in your `build.sbt`.\n\n#### Groovy\n\n```scala\nlibraryDependencies ++= List(\n  \"org.eclipse.platform\" % \"org.eclipse.equinox.app\" % \"1.3.600\", // FIXME workaround for dynamic dependency resolution\n  \"com.diffplug.spotless\" % \"spotless-eclipse-groovy\" % \"3.5.0\", // FIXME workaround for dynamic dependency resolution\n),\n```\n\n#### cpp\n\n```scala\nlibraryDependencies ++= List(\n  \"org.eclipse.platform\" % \"org.eclipse.equinox.app\" % \"1.3.600\", // FIXME workaround for dependency resolution\n  \"com.diffplug.spotless\" % \"spotless-eclipse-cdt\" % \"9.9.0\", // FIXME workaround for dependency resolution\n),\n```\n\n### (sbt 0.13) Some formatter cannot resolve the dynamic dependency\n\nIn sbt 0.13, highly recommend disabling dynamic dependency resolution by setting [disableDynamicDependencyResolving](https://github.com/moznion/sbt-spotless/wiki/Plugin-Configuration#disabledynamicdependencyresolving-boolean) `true` and specify the required dependencies explicitly in your `build.sbt`.\n\nFor example, in case of Java, let's specify like `\"com.google.googlejavaformat\" % \"google-java-format\" % \"1.7\"`, and in case of Scala, please specify `\"org.scalameta\" %% \"scalafmt-core\" % \"2.0.1\"`.\n\n## For developers\n\n### How to run tests\n\n```\nsbt clean scripted\n```\n\nThis scripted test caches the result of resolved dynamic dependency.\n\nIf you would like to clear the cache, please remove the contents that are in a directory: `plugin/target/.dyn-dep-test/`. FYI, `sbt clean` also clears the cache.\n\n### How to release this plugin to maven central\n\n```\nsbt release\n```\n\n### How to try this plugin on local\n\n```\n$ sbt publishLocal\n```\n\n## Author\n\nmoznion (\u003cmoznion@gmail.com\u003e)\n\n## License\n\n```\nCopyright 2020 moznion (https://moznion.net)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fsbt-spotless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoznion%2Fsbt-spotless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fsbt-spotless/lists"}