{"id":51678897,"url":"https://github.com/gocanto/java-spotless","last_synced_at":"2026-07-15T10:33:32.678Z","repository":{"id":370373025,"uuid":"1155893762","full_name":"gocanto/java-spotless","owner":"gocanto","description":"Go-based wrapper around Spotless for Java projects.","archived":false,"fork":false,"pushed_at":"2026-02-26T07:15:40.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-09T02:27:42.322Z","etag":null,"topics":["git","go","java","spotless"],"latest_commit_sha":null,"homepage":"https://oullin.io/about","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gocanto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-12T02:50:35.000Z","updated_at":"2026-02-26T07:15:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gocanto/java-spotless","commit_stats":null,"previous_names":["gocanto/java-spotless"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gocanto/java-spotless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fjava-spotless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fjava-spotless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fjava-spotless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fjava-spotless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gocanto","download_url":"https://codeload.github.com/gocanto/java-spotless/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fjava-spotless/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35501664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["git","go","java","spotless"],"created_at":"2026-07-15T10:33:31.748Z","updated_at":"2026-07-15T10:33:32.671Z","avatar_url":"https://github.com/gocanto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jave-spotless\n\nGo-based wrapper around Spotless for Java projects.\n\n## What It Does\n\n- Default flow (`check` / `apply`) runs only Java files changed vs `--base-branch`.\n- Whole-project flow is explicit with `--all`.\n- Runner parity:\n  - CI (`CI` env var set): direct Maven\n  - Local: Docker Compose\n- Local runs default to offline mode (`--offline=true`).\n\n## Project Structure\n\n- `cmd/spotless`: CLI entrypoint\n- `pkg/spotless`: reusable package and runner logic\n- `dev/scripts/entrypoint.spotless.sh`: guardrail entrypoint for Spotless containers\n- `dev/docker/Dockerfile.spotless`: Java/Maven image used by Spotless compose services\n- `docker-compose.spotless.yml`: Spotless check/apply local services\n- `Makefile`: compatibility wrapper targets\n- `Dockerfile`: multi-stage Alpine image for the `spotless` Go binary\n\n## CLI Usage\n\n```bash\n# Changed-files mode (default)\nspotless check --repo-dir /path/to/repo --base-branch main\nspotless apply --repo-dir /path/to/repo --base-branch main\n\n# Whole-project mode\nspotless check --repo-dir /path/to/repo --all\nspotless apply --repo-dir /path/to/repo --all\n```\n\nCommon flags:\n\n- `--repo-dir` (default `.`)\n- `--offline` (default `true`)\n- `--runner` (`auto|docker|maven`)\n- `--remote` (default `origin`)\n\nValidation:\n\n- `--all` and `--base-branch` are mutually exclusive.\n- `--base-branch` is required unless `--all` is used.\n\n## Make Targets\n\n```bash\n# Changed-files mode\nmake spotless-check TARGET_BASE_BRANCH=main\nmake spotless-apply TARGET_BASE_BRANCH=main\n\n# Whole-project mode\nmake spotless-check-all\nmake spotless-apply-all\n\n# Help and image\nmake spotless-help\nmake spotless-build\n```\n\nOptional variables:\n\n- `REPO_DIR` (default `.`)\n- `SPOTLESS_OFFLINE` (default `true`)\n\nShortcuts:\n\n- `make spotless-main`\n- `make spotless-staging`\n- `make spotless-qa`\n- `make spotless-apply-main`\n- `make spotless-apply-staging`\n- `make spotless-apply-qa`\n- `make spotless-online TARGET_BASE_BRANCH=\u003cbranch\u003e`\n- `make spotless-offline TARGET_BASE_BRANCH=\u003cbranch\u003e`\n- `make spotless-apply-online TARGET_BASE_BRANCH=\u003cbranch\u003e`\n- `make spotless-apply-offline TARGET_BASE_BRANCH=\u003cbranch\u003e`\n\n## Docker\n\n### Spotless formatter services (Java/Maven)\n\nThese are used for local formatting runs:\n\n- `docker-compose.spotless.yml`\n- `dev/docker/Dockerfile.spotless`\n\nBuild with:\n\n```bash\nmake spotless-build\n```\n\n### Go CLI image (multi-stage, Alpine)\n\nBuild the `spotless` CLI image:\n\n```bash\ndocker build -t jave-spotless:latest .\n```\n\nExample:\n\n```bash\ndocker run --rm jave-spotless:latest help\n```\n\n## Troubleshooting\n\n- If Docker Compose is missing, install `docker-compose` or `docker compose`.\n- If `CODE_STYLE_ENV_ENABLED` errors appear, use Make targets (they set it automatically).\n- If Maven offline mode misses dependencies, rerun with `SPOTLESS_OFFLINE=false` once.\n- If `origin/\u003cbranch\u003e` is missing locally, changed-files mode may resolve to no files; fetch remotes first when needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocanto%2Fjava-spotless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgocanto%2Fjava-spotless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocanto%2Fjava-spotless/lists"}