{"id":20589959,"url":"https://github.com/doist/detekt-rules","last_synced_at":"2025-07-10T10:34:44.788Z","repository":{"id":44940682,"uuid":"513161793","full_name":"Doist/detekt-rules","owner":"Doist","description":"Detekt rules for Doist Kotlin projects","archived":false,"fork":false,"pushed_at":"2025-03-19T13:41:07.000Z","size":283,"stargazers_count":3,"open_issues_count":7,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-28T10:21:36.570Z","etag":null,"topics":["detekt-plugin","detekt-rules","kotlin"],"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/Doist.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":"2022-07-12T13:52:10.000Z","updated_at":"2024-11-15T21:21:32.000Z","dependencies_parsed_at":"2023-11-05T01:23:55.060Z","dependency_job_id":"f54a8a36-a04e-4b14-a64f-aa93c428e4d9","html_url":"https://github.com/Doist/detekt-rules","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":"detekt/detekt-custom-rule-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fdetekt-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fdetekt-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fdetekt-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fdetekt-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Doist","download_url":"https://codeload.github.com/Doist/detekt-rules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248970026,"owners_count":21191366,"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":["detekt-plugin","detekt-rules","kotlin"],"created_at":"2024-11-16T07:33:08.733Z","updated_at":"2025-04-14T22:24:25.687Z","avatar_url":"https://github.com/Doist.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Doist detekt rules\n\nThis repository contains custom detekt rules based on Doist internal coding conventions.\n\n## How to use it\n\nFirst add [detekt](https://github.com/detekt/detekt) to your repository. Then follow\n[adding more rule sets](https://github.com/detekt/detekt#adding-more-rule-sets) instructions and add this\ndetekt plugin in your gradle file:\n```\ndependencies {\n    detektPlugins(\"com.doist.detekt:detekt-rules:[version]\")\n}\n```\n\n## Release\n\nTo release, update the version in the `build.gradle.kts` file and run:\n```\ngit add build.gradle.kts\ngit commit -m \"Release X.Y.Z\"\ngit tag vX.Y.Z\ngit push --tags\n```\nAfter that GitHub actions will automatically create new release and publish it.\n\n## Rules\n\n### NoBlankNewLineAfterClassHeader\n\nThis rule reports every class that has an empty line between a class header and its body.\n\n### ConsistentWhenEntries\n\nThis rule reports when statements that have some entries single line and some multiline. \n\n### SingleLineWhenEntryExpressionsAreWrapped\n\nThis rule reports every when entry expression that is on a separate line and is not wrapped with \nbrackets.\n\nFor example this is incorrect:\n```kotlin\nval a = when {\n    c == b -\u003e\n        true\n    else -\u003e\n        false\n}\n```\nInstead it should be:\n```kotlin\nval a = when {\n    c == b -\u003e true\n    else -\u003e false\n}\n// or\nval a = when {\n    c == b -\u003e {\n        true\n    }\n    else -\u003e {\n        false\n    }\n}\n```\n\n### MutableObservablePropertyIsPrivate\n\nThis rule reports exposed `MutableLive...` and `MutableStateFlow` properties. They should be \nprivate.\n\n### NoNotNullOperator\n\nThis rule reports `!!` usage. `requireNotNull` should be used instead.\n\n### TodoPattern\n\nReports when TODO comment does not match a pattern. Default pattern is `// TODO(.+): .*`.\n\n\n### NewLineAfterSuperCall\n\nThis rule reports if an override function does not have a new line after the super call.\n\nFor example this is incorrect:\n```kotlin\n override fun foo() {\n    super.foo()\n    bar.bazinga()\n}\n```\nInstead it should be:\n```kotlin\n override fun foo() {\n    super.foo()\n    \n    bar.bazinga()\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoist%2Fdetekt-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoist%2Fdetekt-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoist%2Fdetekt-rules/lists"}