{"slug":"kotlin","title":"Kotlin","extensions":[".kt",".kts"],"entry_languages":["Kotlin"],"prompts":28,"repos":2,"sample":[{"repository":"facebook/react-native","slug":"facebook-react-native","checks":4},{"repository":"JetBrains/kotlin","slug":"jetbrains-kotlin","checks":0}],"tools":[],"headline":[],"raw_md":"https://awesomereviewers.com/raw/verify/kotlin.md","raw_json":"https://awesomereviewers.com/raw/verify/kotlin.json","url":"https://awesomereviewers.com/verify/kotlin/","baseline":{"slug":"every-change","title":"Any change","topics":["Code Style","Naming Conventions"],"checks":[{"kind":"formatting","title":"Formatting","method":"formatting","method_slug":"formatting","catches":"Layout drift that buries the real change in the diff.","tool":null,"alternatives":[],"note":null},{"kind":"linting","title":"Linting","method":"static_analysis","method_slug":"static-analysis","catches":"Bug-prone patterns, unused code and conventions the formatter does not cover.","tool":null,"alternatives":[],"note":null},{"kind":"type-checking","title":"Type checking","method":"static_analysis","method_slug":"static-analysis","catches":"Wrong types, unhandled null or None, call signatures broken across modules.","tool":null,"alternatives":[],"note":"The compiler type-checks on every build and test run; a failing build is this check failing."},{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"kotlin-names-express-clear-intent","title":"Names express clear intent","description":"Choose names that clearly express intent and follow established conventions. Prefer explicit, descriptive names over abbreviations or ambiguous terms. Align with platform-specific naming patterns and maintain consistency with existing codebase conventions.","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Naming Conventions","language":"Kotlin","updated":"2024-01-31","comments":11,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-names-express-clear-intent.md"},{"slug":"react-native-prefer-kotlin-idioms","title":"prefer Kotlin idioms","description":"Use Kotlin-specific constructs and syntax patterns instead of Java-style code to improve readability and maintainability. This includes leveraging Kotlin's expressive syntax features and standard library functions.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Code Style","language":"Kotlin","updated":"2025-06-12","comments":9,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-prefer-kotlin-idioms.md"},{"slug":"kotlin-keep-code-clearly-organized","title":"Keep code clearly organized","description":"Maintain code readability and organization by extracting focused, well-named functions and using appropriate scoping. Break down complex logic into smaller, focused functions and utilize extension functions when appropriate to improve code clarity.","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Code Style","language":"Kotlin","updated":"2024-10-21","comments":7,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-keep-code-clearly-organized.md"},{"slug":"react-native-avoid-hungarian-notation","title":"avoid Hungarian notation","description":"Do not use Hungarian notation prefixes (like `m`, `s`) in variable and field names. Use descriptive, semantic names that clearly indicate the variable's purpose without encoding type or scope information in the name.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Naming Conventions","language":"Kotlin","updated":"2025-06-06","comments":5,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-avoid-hungarian-notation.md"},{"slug":"continue-avoid-duplicated-code","title":"Avoid duplicated code","description":"Identify and extract shared functionality between classes into reusable components. Code duplication increases maintenance burden and risk of inconsistent behavior when changes are needed.","repository":"continuedev/continue","domain":"ai-agents","topic":"Code Style","language":"Kotlin","updated":"2025-07-10","comments":2,"stars":27819,"raw":"https://awesomereviewers.com/raw/continue-avoid-duplicated-code.md"}],"prompt_count":5},"changes":[{"slug":"security","title":"Authentication, input handling, secrets, permissions","topics":["Security"],"checks":[{"kind":"security-scanning","title":"Security scanning","method":"static_analysis","method_slug":"static-analysis","catches":"Injection, unsafe APIs and tainted data reaching a sink.","tool":null,"alternatives":[],"note":null},{"kind":"secret-scanning","title":"Secret scanning","method":"static_analysis","method_slug":"static-analysis","catches":"Credentials and tokens committed to the repository.","tool":null,"alternatives":[],"note":null},{"kind":"dependency-audit","title":"Dependency audit","method":"supply_chain","method_slug":"supply-chain","catches":"Known-vulnerable or disallowed dependencies and licenses.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"kotlin-document-security-implementations","title":"Document security implementations","description":"Always document non-obvious security implementations, especially authentication mechanisms, with explanatory comments and references to underlying implementation details or documentation. Security-related code should be explicit and clear to prevent misunderstandings that could lead to vulnerabilities.","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Security","language":"Kotlin","updated":"2021-05-17","comments":1,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-document-security-implementations.md"}],"prompt_count":1},{"slug":"interfaces","title":"Public APIs, signatures, error paths, nullability","topics":["API","Error Handling","Null Handling"],"checks":[{"kind":"type-checking","title":"Type checking","method":"static_analysis","method_slug":"static-analysis","catches":"Wrong types, unhandled null or None, call signatures broken across modules.","tool":null,"alternatives":[],"note":"The compiler type-checks on every build and test run; a failing build is this check failing."},{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"react-native-avoid-operator","title":"avoid !! operator","description":"Avoid using the not-null assertion operator (`!!`) as it can cause runtime crashes if the assumption about non-nullability is incorrect. Instead, use safer alternatives that provide better error handling and code clarity.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Null Handling","language":"Kotlin","updated":"2025-06-03","comments":7,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-avoid-operator.md"},{"slug":"kotlin-design-extensible-stable-apis","title":"Design extensible stable APIs","description":"When designing public APIs, prioritize extensibility while maintaining backward compatibility and implementation hiding. This ensures APIs can evolve without breaking existing clients while allowing for future enhancements.","repository":"JetBrains/kotlin","domain":"runtimes","topic":"API","language":"Kotlin","updated":"2024-01-30","comments":7,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-design-extensible-stable-apis.md"},{"slug":"kotlin-prefer-descriptive-errors","title":"Prefer descriptive errors","description":"When handling errors in your code, always provide detailed context in error messages to aid debugging. Use Kotlin's standard error handling functions instead of directly throwing exceptions or using non-null assertions.","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Error Handling","language":"Kotlin","updated":"2024-07-05","comments":6,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-prefer-descriptive-errors.md"},{"slug":"kotlin-use-defensive-null-checks","title":"Use defensive null checks","description":"When working with properties or methods that could potentially be null, use Kotlin's null safety features defensively even if you believe the value should never be null. This prevents runtime exceptions when assumptions change or when interacting with Java/third-party code.","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Null Handling","language":"Kotlin","updated":"2024-08-19","comments":4,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-use-defensive-null-checks.md"},{"slug":"react-native-catch-specific-exceptions","title":"catch specific exceptions","description":"Always catch specific exception types rather than generic `Exception` to avoid masking unexpected errors and ensure intentional error handling. This practice helps distinguish between expected failure scenarios that should be handled gracefully and unexpected errors that indicate bugs.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Error Handling","language":"Kotlin","updated":"2025-05-27","comments":3,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-catch-specific-exceptions.md"},{"slug":"spring-framework-leverage-kotlin-null-safety","title":"Leverage Kotlin null-safety","description":"Utilize Kotlin''s null-safety features effectively to create cleaner, more robust code: 1. For class properties that will be initialized before use, prefer `lateinit var` over nullable types with `?`:","repository":"spring-projects/spring-framework","domain":"app-frameworks","topic":"Null Handling","language":"Kotlin","updated":"2025-05-13","comments":3,"stars":58382,"raw":"https://awesomereviewers.com/raw/spring-framework-leverage-kotlin-null-safety.md"},{"slug":"deeplearning4j-preserve-api-compatibility","title":"Preserve API compatibility","description":"When evolving APIs, prioritize backward compatibility to protect existing client code. Make new parameters optional whenever possible to allow existing code to continue functioning. If breaking changes are necessary, evaluate how users typically interact with your API before proceeding.","repository":"deeplearning4j/deeplearning4j","domain":"ml-systems","topic":"API","language":"Kotlin","updated":"2021-08-05","comments":2,"stars":14036,"raw":"https://awesomereviewers.com/raw/deeplearning4j-preserve-api-compatibility.md"}],"prompt_count":7},{"slug":"services","title":"Service and framework code","topics":["Fastify","NestJS","Spring","Axum","Celery","Temporal"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"algorithms","title":"Algorithms, parsers, data transforms","topics":["Algorithms"],"checks":[{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null},{"kind":"fuzzing","title":"Fuzzing","method":"testing","method_slug":"testing","catches":"Crashes, panics and hangs on malformed input, especially in parsers and decoders.","tool":null,"alternatives":[],"note":null},{"kind":"mutation-testing","title":"Mutation testing","method":"testing","method_slug":"testing","catches":"Tests that keep passing whatever the code does.","tool":null,"alternatives":[],"note":null},{"kind":"proofs","title":"Proofs and specifications","method":"formal","method_slug":"formal","catches":"Design-level bugs in protocols and algorithms, checked against a specification.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"kotlin-consider-operation-time-complexity","title":"Consider operation time complexity","description":"When implementing operations that manipulate collections or perform repeated actions, carefully consider the time complexity implications. Avoid operations that could result in unexpected quadratic or worse complexity. Pay special attention to:","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Algorithms","language":"Kotlin","updated":"2023-09-12","comments":5,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-consider-operation-time-complexity.md"}],"prompt_count":1},{"slug":"concurrency","title":"Threads, async code, locks, shared state","topics":["Concurrency"],"checks":[{"kind":"concurrency-model-checking","title":"Concurrency model checking","method":"formal","method_slug":"formal","catches":"Races and orderings that fail only under specific interleavings.","tool":null,"alternatives":[],"note":null},{"kind":"ub-detection","title":"Undefined-behaviour detection","method":"formal","method_slug":"formal","catches":"Memory-safety and aliasing violations in unsafe code.","tool":null,"alternatives":[],"note":null},{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"react-native-proper-synchronization-practices","title":"proper synchronization practices","description":"Ensure thread safety by using appropriate synchronization mechanisms and understanding thread context. When working with shared mutable state, protect critical sections with proper synchronization to prevent race conditions and concurrent modifications. Choose the right synchronization approach for your use case - prefer language-provided utilities over...","repository":"facebook/react-native","domain":"app-frameworks","topic":"Concurrency","language":"Kotlin","updated":"2025-05-29","comments":4,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-proper-synchronization-practices.md"},{"slug":"maplibre-native-structured-coroutine-management","title":"Structured coroutine management","description":"Always bind coroutine scopes to appropriate lifecycles and follow consistent patterns for asynchronous operations. Prefer suspending functions over class-based approaches when possible, and ensure proper job cancellation to prevent memory leaks.","repository":"maplibre/maplibre-native","domain":"app-frameworks","topic":"Concurrency","language":"Kotlin","updated":"2024-08-09","comments":4,"stars":1411,"raw":"https://awesomereviewers.com/raw/maplibre-native-structured-coroutine-management.md"}],"prompt_count":2},{"slug":"networking","title":"Network calls, retries, timeouts, protocols","topics":["Networking","Axios"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"fuzzing","title":"Fuzzing","method":"testing","method_slug":"testing","catches":"Crashes, panics and hangs on malformed input, especially in parsers and decoders.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"ui","title":"UI components and pages","topics":["React","Next","Next.js","Vue","Angular"],"checks":[{"kind":"browser-tests","title":"End-to-end browser tests","method":"testing","method_slug":"testing","catches":"User flows broken across components, routing and the network.","tool":null,"alternatives":[],"note":null},{"kind":"linting","title":"Linting","method":"static_analysis","method_slug":"static-analysis","catches":"Bug-prone patterns, unused code and conventions the formatter does not cover.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"react-native-avoid-unnecessary-component-complexity","title":"avoid unnecessary component complexity","description":"When designing React components and their APIs, resist the temptation to add features, props, or methods that provide limited or no real value to developers. Components should expose only functionality that serves genuine use cases and avoids introducing maintenance burden or developer confusion.","repository":"facebook/react-native","domain":"app-frameworks","topic":"React","language":"Kotlin","updated":"2025-01-27","comments":2,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-avoid-unnecessary-component-complexity.md"}],"prompt_count":1},{"slug":"data","title":"Databases, migrations, caching","topics":["Database","Migrations","Caching"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"react-native-leverage-framework-cache-mechanisms","title":"leverage framework cache mechanisms","description":"When implementing caching functionality, prefer using framework-provided cache mechanisms over manual cache management. Frameworks typically offer optimized cache handling that includes automatic error propagation, efficient multi-level cache checking, and built-in performance optimizations that are difficult to replicate manually.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Caching","language":"Kotlin","updated":"2024-11-08","comments":3,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-leverage-framework-cache-mechanisms.md"}],"prompt_count":1},{"slug":"performance","title":"Hot paths and performance","topics":["Performance Optimization"],"checks":[],"prompts":[{"slug":"kotlin-minimize-unnecessary-work","title":"Minimize unnecessary work","description":"Optimize performance by reducing the amount of computation performed, especially on data that won''t appear in the final result. Apply these strategies:","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Performance Optimization","language":"Kotlin","updated":"2025-04-09","comments":7,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-minimize-unnecessary-work.md"},{"slug":"react-native-avoid-unnecessary-conversions","title":"avoid unnecessary conversions","description":"Choose direct, efficient methods over approaches that require additional parsing, conversion, or processing steps. This reduces computational overhead and improves performance by eliminating intermediate operations.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Performance Optimization","language":"Kotlin","updated":"2025-06-24","comments":3,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-avoid-unnecessary-conversions.md"}],"prompt_count":2},{"slug":"ai","title":"Model, prompt and LLM code","topics":["AI","Pytorch"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"observability","title":"Logging, metrics, tracing","topics":["Logging","Observability"],"checks":[],"prompts":[],"prompt_count":0},{"slug":"ci-config","title":"CI workflows and configuration files","topics":["CI/CD","Configurations"],"checks":[{"kind":"workflow-linting","title":"CI workflow linting","method":"static_analysis","method_slug":"static-analysis","catches":"Broken GitHub Actions syntax, script injection, over-broad token permissions.","tool":null,"alternatives":[],"note":null},{"kind":"file-hygiene","title":"File hygiene","method":"formatting","method_slug":"formatting","catches":"Invalid JSON, YAML or TOML, merge markers, trailing whitespace, oversized files.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"kotlin-use-configuration-property-providers","title":"Use configuration property providers","description":"Always use Gradle's Provider API when accessing project, system, or Gradle properties in your build configuration. This ensures proper handling of configuration cache and allows for dynamic property updates.","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Configurations","language":"Kotlin","updated":"2020-07-17","comments":7,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-use-configuration-property-providers.md"},{"slug":"react-native-feature-flag-isolation","title":"Feature flag isolation","description":"Feature flags should be properly isolated and scoped to avoid mixing configuration concerns with core interfaces. When implementing feature flags, ensure they only affect behavior when explicitly enabled and don't leak into unrelated system components.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Configurations","language":"Kotlin","updated":"2025-06-30","comments":3,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-feature-flag-isolation.md"},{"slug":"maplibre-native-externalize-configuration-values","title":"Externalize configuration values","description":"Use environment variables and external configuration mechanisms instead of hard-coding values in build scripts. This makes your build system more flexible, maintainable, and adaptable to different environments.","repository":"maplibre/maplibre-native","domain":"app-frameworks","topic":"Configurations","language":"Kotlin","updated":"2024-11-28","comments":3,"stars":1411,"raw":"https://awesomereviewers.com/raw/maplibre-native-externalize-configuration-values.md"}],"prompt_count":3},{"slug":"dependencies","title":"Dependencies and lockfiles","topics":[],"checks":[{"kind":"dependency-audit","title":"Dependency audit","method":"supply_chain","method_slug":"supply-chain","catches":"Known-vulnerable or disallowed dependencies and licenses.","tool":null,"alternatives":[],"note":null},{"kind":"lockfile-check","title":"Lockfile consistency","method":"supply_chain","method_slug":"supply-chain","catches":"A lockfile that no longer matches its manifest.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"tests","title":"The tests themselves","topics":["Testing"],"checks":[{"kind":"mutation-testing","title":"Mutation testing","method":"testing","method_slug":"testing","catches":"Tests that keep passing whatever the code does.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"kotlin-test-edge-cases","title":"Test edge cases","description":"Ensure tests verify both basic functionality and edge cases. Tests that only cover the happy path can miss critical bugs in boundary conditions and special scenarios.","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Testing","language":"Kotlin","updated":"2025-03-10","comments":7,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-test-edge-cases.md"},{"slug":"react-native-use-kotlin-testing-idioms","title":"Use Kotlin testing idioms","description":"When writing tests in Kotlin, prefer Kotlin-specific testing libraries and language features over their Java equivalents. Use Mockito Kotlin instead of standard Mockito for more idiomatic syntax, and leverage Kotlin language features like `apply` blocks to make test setup code more concise and readable.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Testing","language":"Kotlin","updated":"2025-01-27","comments":2,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-use-kotlin-testing-idioms.md"}],"prompt_count":2},{"slug":"docs","title":"Documentation and comments","topics":["Documentation"],"checks":[{"kind":"docs-build","title":"Docs build","method":"static_analysis","method_slug":"static-analysis","catches":"Broken cross-references, links and markup in documentation.","tool":null,"alternatives":[],"note":null},{"kind":"spelling","title":"Spelling","method":"formatting","method_slug":"formatting","catches":"Typos in identifiers, comments and docs.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"kotlin-effective-api-samples","title":"Effective API samples","description":"Create clear, comprehensive, and properly structured code samples to\\ \\ document API usage. Follow these principles:\\n\\n1. **Organize samples properly:**\\n\\ \\   - Place samples after doc blocks","repository":"JetBrains/kotlin","domain":"runtimes","topic":"Documentation","language":"Kotlin","updated":"2025-03-10","comments":8,"stars":50857,"raw":"https://awesomereviewers.com/raw/kotlin-effective-api-samples.md"},{"slug":"react-native-use-proper-documentation-format","title":"Use proper documentation format","description":"Use the appropriate documentation format for the target programming language. In Kotlin files, use KDoc formatting instead of Javadoc formatting for consistency and proper tooling support.","repository":"facebook/react-native","domain":"app-frameworks","topic":"Documentation","language":"Kotlin","updated":"2025-06-09","comments":2,"stars":123178,"raw":"https://awesomereviewers.com/raw/react-native-use-proper-documentation-format.md"},{"slug":"maplibre-native-accurate-documentation-references","title":"Accurate documentation references","description":"Ensure all code documentation includes appropriate reference links that are current and accurate. When porting code or migrating between frameworks, preserve all documentation comments with their external references. For API documentation, verify that links point to the correct and up-to-date specification documentation.","repository":"maplibre/maplibre-native","domain":"app-frameworks","topic":"Documentation","language":"Kotlin","updated":"2024-10-09","comments":2,"stars":1411,"raw":"https://awesomereviewers.com/raw/maplibre-native-accurate-documentation-references.md"}],"prompt_count":3}]}
