{"id":13427858,"url":"https://github.com/pinterest/ktlint","last_synced_at":"2026-01-15T22:21:18.238Z","repository":{"id":37238904,"uuid":"64293719","full_name":"pinterest/ktlint","owner":"pinterest","description":"An anti-bikeshedding Kotlin linter with built-in formatter","archived":false,"fork":false,"pushed_at":"2026-01-10T13:52:40.000Z","size":90482,"stargazers_count":6632,"open_issues_count":18,"forks_count":520,"subscribers_count":52,"default_branch":"master","last_synced_at":"2026-01-13T03:35:51.046Z","etag":null,"topics":["kotlin","lint","linter"],"latest_commit_sha":null,"homepage":"https://pinterest.github.io/ktlint/","language":"Kotlin","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/pinterest.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2016-07-27T09:03:52.000Z","updated_at":"2026-01-11T11:02:14.000Z","dependencies_parsed_at":"2023-09-26T00:04:40.873Z","dependency_job_id":"5158b47f-b3c2-4ee2-a1d1-5b05c7af1cd7","html_url":"https://github.com/pinterest/ktlint","commit_stats":{"total_commits":2168,"total_committers":180,"mean_commits":"12.044444444444444","dds":0.6877306273062731,"last_synced_commit":"244aa392d57e75fece6a54eeb9271ec2507474db"},"previous_names":["shyiko/ktlint"],"tags_count":106,"template":false,"template_full_name":null,"purl":"pkg:github/pinterest/ktlint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinterest%2Fktlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinterest%2Fktlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinterest%2Fktlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinterest%2Fktlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinterest","download_url":"https://codeload.github.com/pinterest/ktlint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinterest%2Fktlint/sbom","scorecard":{"id":93588,"data":{"date":"2025-08-04","repo":{"name":"github.com/pinterest/ktlint","commit":"376ba94c3cabb8e6020716b6eea301f4eaf12db0"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":5.8,"checks":[{"name":"Code-Review","score":2,"reason":"Found 5/21 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 27 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/generate-changelog.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-release-build.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-release-docs.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-snapshot-build.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-snapshot-docs.yml:1","Warn: no topLevel permission defined: .github/workflows/pull-request-with-code.yml:1","Warn: no topLevel permission defined: .github/workflows/pull-request-without-code.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-changelog.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/pinterest/ktlint/generate-changelog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate-changelog.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/pinterest/ktlint/generate-changelog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate-changelog.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/pinterest/ktlint/generate-changelog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-release-build.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/pinterest/ktlint/publish-release-build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-release-build.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/pinterest/ktlint/publish-release-build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-release-build.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/pinterest/ktlint/publish-release-build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-release-docs.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/pinterest/ktlint/publish-release-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-snapshot-docs.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/pinterest/ktlint/publish-snapshot-docs.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/publish-release-docs.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/publish-snapshot-docs.yml:22","Info:   8 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/pinterest/.github/SECURITY.md:1","Info: Found linked content: github.com/pinterest/.github/SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: github.com/pinterest/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":8,"reason":"5 out of the last 5 releases have a total of 5 signed artifacts.","details":["Info: signed release artifact: ktlint.asc: https://github.com/pinterest/ktlint/releases/tag/1.7.1","Info: signed release artifact: ktlint.asc: https://github.com/pinterest/ktlint/releases/tag/1.7.0","Info: signed release artifact: ktlint.asc: https://github.com/pinterest/ktlint/releases/tag/1.6.0","Info: signed release artifact: ktlint.asc: https://github.com/pinterest/ktlint/releases/tag/1.5.0","Info: signed release artifact: ktlint.asc: https://github.com/pinterest/ktlint/releases/tag/1.4.1","Warn: release artifact 1.7.1 does not have provenance: https://api.github.com/repos/pinterest/ktlint/releases/233993264","Warn: release artifact 1.7.0 does not have provenance: https://api.github.com/repos/pinterest/ktlint/releases/232378456","Warn: release artifact 1.6.0 does not have provenance: https://api.github.com/repos/pinterest/ktlint/releases/219555735","Warn: release artifact 1.5.0 does not have provenance: https://api.github.com/repos/pinterest/ktlint/releases/189030500","Warn: release artifact 1.4.1 does not have provenance: https://api.github.com/repos/pinterest/ktlint/releases/183688914"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T08:23:53.375Z","repository_id":37238904,"created_at":"2025-08-15T08:23:53.375Z","updated_at":"2025-08-15T08:23:53.375Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28472626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:13:38.078Z","status":"ssl_error","status_checked_at":"2026-01-15T22:12:11.737Z","response_time":62,"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":["kotlin","lint","linter"],"created_at":"2024-07-31T01:00:41.396Z","updated_at":"2026-01-15T22:21:18.231Z","avatar_url":"https://github.com/pinterest.png","language":"Kotlin","readme":"\u003ch1 align=\"center\"\u003e\n\u003ca href=\"https://pinterest.github.io/ktlint/\"\u003e\n  \u003cimg src=\"https://cloud.githubusercontent.com/assets/370176/26518284/38b680da-4262-11e7-8d27-2b9e849fb55f.png\"/\u003e\n\u003c/a\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://kotlinlang.slack.com/messages/CKS3XG0LS\"\u003e\u003cimg src=\"https://img.shields.io/badge/slack-@kotlinlang/ktlint-yellow.svg?logo=slack\" alt=\"Join the chat at https://kotlinlang.slack.com\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/pinterest/ktlint/actions/workflows/publish-snapshot-build.yml\"\u003e\u003cimg src=\"https://github.com/pinterest/ktlint/actions/workflows/publish-snapshot-build.yml/badge.svg\" alt=\"Build status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://central.sonatype.com/artifact/com.pinterest.ktlint/ktlint-cli?smo=true\"\u003e\u003cimg src=\"https://img.shields.io/maven-central/v/com.pinterest.ktlint/ktlint-cli.svg\" alt=\"Maven Central\"\u003e\u003c/a\u003e\n\u003ca href=\"https://jitpack.io/#pinterest/ktlint\"\u003e\u003cimg src=\"https://jitpack.io/v/pinterest/ktlint.svg\" alt=\"JitPack\"\u003e\u003c/a\u003e\n\u003ca href=\"https://formulae.brew.sh/formula/ktlint\"\u003e\u003cimg src=\"https://img.shields.io/homebrew/v/ktlint.svg\" alt=\"HomeBrew\"\u003e\u003c/a\u003e\n\u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/pinterest/ktlint.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pinterest.github.io/ktlint/\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg\" alt=\"ktlint\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://kotlinlang.org/\"\u003eKotlin\u003c/a\u003e linter in spirit of \u003ca href=\"https://github.com/standard/standard\"\u003estandard/standard\u003c/a\u003e (JavaScript) and \u003ca href=\"https://golang.org/cmd/gofmt/\"\u003egofmt\u003c/a\u003e (Go).  \n\u003c/p\u003e\n\n## Key features\n\n- No configuration required\n- Built-in Rule sets\n- Built-in formatter\n- `.editorconfig` support\n- Several built-in reporters: `plain`, `json`, `html` and `checkstyle`\n- Executable jar\n- Allows extension with custom rule sets and reporters\n\n## Quick start\n\nFollow steps below for a quick start with latest ktlint release.\n\n* Step 1: Install with brew\n  ```shell\n  brew install ktlint\n  ```\n  See [download and verification from GitHub](https://pinterest.github.io/ktlint/latest/install/cli/#download-and-verification) or [other package managers](https://pinterest.github.io/ktlint/latest/install/cli/#package-managers) for alternative ways of installing ktlint. Or, use one of the [integrations like maven and gradle plugins](https://pinterest.github.io/ktlint/latest/install/integrations/).\n\n* Step 2: Lint and format your code  \n  All files with extension `.kt` and `.kts` in the current directory and below will be scanned. Problems will be fixed automatically when possible.\n  ```shell title=\"Autocorrect style violations\"\n  ktlint --format\n  # or\n  ktlint -F\n  ```\n  See [cli usage](https://pinterest.github.io/ktlint/latest/install/cli/#command-line-usage) for a more extensive description on using ktlint.\n\n## Documentation\n\n\u003ca href=\"https://pinterest.github.io/ktlint/\"\u003eUser guide\u003c/a\u003e\n\n\n### Legal\n\nThis project is not affiliated with nor endorsed by JetBrains.  \nAll code, unless specified otherwise, is licensed under the [MIT](https://opensource.org/licenses/MIT) license.  \nCopyright (c) 2019 Pinterest, Inc.  \nCopyright (c) 2016-2019 Stanley Shyiko.\n","funding_links":[],"categories":["Libraries","Supported Linters","Kotlin","Linters and Static Code Analysis","Linters","必备开发库"],"sub_categories":["Kotlin","Kotlin 基础"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinterest%2Fktlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinterest%2Fktlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinterest%2Fktlint/lists"}