{"id":25399139,"url":"https://github.com/alexandergh/presubmitchecks","last_synced_at":"2026-04-24T23:34:24.961Z","repository":{"id":267080763,"uuid":"900129652","full_name":"AlexanderGH/presubmitchecks","owner":"AlexanderGH","description":"A single extensible tool for linting and fixing your code in several contexts (manual, git pre-commit, GitHub Action).","archived":false,"fork":false,"pushed_at":"2025-02-12T22:30:49.000Z","size":198,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T22:33:17.705Z","etag":null,"topics":["actions","developer-tools","linter","pre-commit","presubmit"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexanderGH.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":"2024-12-07T23:56:17.000Z","updated_at":"2025-02-03T03:54:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9217f77-022c-4a66-967e-ab09c57b64c7","html_url":"https://github.com/AlexanderGH/presubmitchecks","commit_stats":null,"previous_names":["alexandergh/presubmitchecks"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderGH%2Fpresubmitchecks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderGH%2Fpresubmitchecks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderGH%2Fpresubmitchecks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderGH%2Fpresubmitchecks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexanderGH","download_url":"https://codeload.github.com/AlexanderGH/presubmitchecks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248412105,"owners_count":21099050,"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":["actions","developer-tools","linter","pre-commit","presubmit"],"created_at":"2025-02-15T23:29:16.665Z","updated_at":"2026-04-24T23:34:24.919Z","avatar_url":"https://github.com/AlexanderGH.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pre-Submit Checks for Repositories\n\nA single extensible tool for linting and fixing your code in several\ncontexts (manual, git pre-commit, GitHub Action).\n\n## Supported Checks\n\n- [Content Patterns](presubmitchecks-core/src/main/kotlin/org/undermined/presubmitchecks/checks/ContentPatternChecker.md)\n- [LINT.DoNotSubmitIf](presubmitchecks-core/src/main/kotlin/org/undermined/presubmitchecks/checks/DoNotSubmitIfChecker.md)\n- [LINT.IfChange](presubmitchecks-core/src/main/kotlin/org/undermined/presubmitchecks/checks/IfChangeThenChangeChecker.md)\n- [Keep Sorted](presubmitchecks-core/src/main/kotlin/org/undermined/presubmitchecks/checks/KeepSortedChecker.md)\n- [New Line](presubmitchecks-core/src/main/kotlin/org/undermined/presubmitchecks/checks/NewLineChecker.md)\n- [Valid JSON](presubmitchecks-core/src/main/kotlin/org/undermined/presubmitchecks/checks/ValidJsonChecker.md)\n\n## Usage\n\nInstall the checker CLI:\n\n```shell\n# From Source\ngit clone https://github.com/AlexanderGH/presubmitchecks.git\ncd presubmitchecks\n./gradlew :presubmitchecks-cli:installDist\n./presubmitchecks-cli/build/install/presubmitchecks-cli/bin/presubmitchecks-cli\n\n# Download Release Artifact presubmitchecks-cli-standalone.jar\nwget https://github.com/AlexanderGH/presubmitchecks/releases/download/\u003crelease\u003e/presubmitchecks-cli-standalone.jar\njava -jar presubmitchecks-cli-standalone.jar\n\n# Download Release Artifact presubmitchecks-cli.zip\nwget https://github.com/AlexanderGH/presubmitchecks/releases/download/\u003crelease\u003e/presubmitchecks-cli.zip\nunzip presubmitchecks-cli.zip\n./presubmitchecks-cli/bin/presubmitchecks-cli\n```\n\nYou can verify the integrity and provenance of an artifact using its associated cryptographically\nsigned attestations (not available for pre-release/SNAPSHOT artifacts):\n\n```shell\ngh attestation verify presubmitchecks-cli-standalone.jar\ngh attestation verify presubmitchecks-cli.zip\n```\n\n### Check Files\n\n```shell\n./presubmitchecks-cli files '**.json' '!**/dist/**'\n```\n\n### Git Pre-Commit\n\n```shell\n# Automatic diff:\n./presubmitchecks-cli git-pre-commit\n\n# From stdin:\ngit diff main | ./presubmitchecks-cli git-pre-commit --diff -\n\n# From a file:\n./presubmitchecks-cli git-pre-commit --diff changes.diff\n```\n\n### GitHub Action\n\nTo run the presubmit checks as part of a GitHub Action `pull_request` trigger:\n\n```shell\n./presubmitchecks-cli github-action\n```\n\nOr, use our pre-configured GitHub Action:\n\n```yaml\n    steps:\n      - name: Run Presubmit Checks\n        uses: 'AlexanderGH/presubmitchecks@main'\n        id: presubmitchecks\n        with:\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\nSee [GitHub Action Setup](presubmitchecks-cli/src/main/kotlin/org/undermined/presubmitchecks/GitHubAction.md) for\nmore examples.\n\n### Fixes\n\nBy default, `presubmitchecks` operates in report-only mode and will only list issues. In order for\nit to make changes that attempt to fix issues, you must pass `--fix` to the CLI or the `apply-fixes`\ninput for the GitHub Action.\n\n## Configuration\n\nA configuration file can be specified with `--config`, e.g. `--config .github/presubmitchecks.json`.\nWhen using the GitHub action, it can be specified using the `config-file` input.\n\nThe default configuration can be found\n[here](presubmitchecks-core/src/main/resources/presubmitchecks.defaults.json). A [more complex\nconfiguration](.github/presubmitchecks.json) is used by this repo's own presubmit checks.\n\n### Example Configuration\n\n```json5\n{\n  \"checkerConfigs\": {\n    // One of more checker configurations can be set here.\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandergh%2Fpresubmitchecks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandergh%2Fpresubmitchecks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandergh%2Fpresubmitchecks/lists"}