AGENTS.md and CODE_STYLE.md 2026 June update#3689
Draft
cursor[bot] wants to merge 2 commits into
Draft
Conversation
- Add custom detekt rule ForbiddenPublicEnum to flag public enum classes that break binary compatibility in SDK API surface - Wire rule in RevenueCatRuleSetProvider and enable in detekt.yml - Add unit tests for the new rule - Add Code Style notes to AGENTS.md for June 2026 recurring review themes: @SerialName for snake_case fields, naming conventions, log levels, thread safety patterns, Exception vs RuntimeException Co-authored-by: Cesar de la Vega <vegaro@users.noreply.github.com>
Existing public enum classes pre-date the new ForbiddenPublicEnum rule. Baselined so detektAll only flags newly introduced public enums. Co-authored-by: Cesar de la Vega <vegaro@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Analyzed 918 comments across 164 PRs from June 1–30, 2026 in
RevenueCat/purchases-android.Human reviewers (16): AlvaroBrey, JayShortway, MonikaMateska, aboedo, ajpallares, alexrepty, davedelong, facumenzella, fire-at-will, joshdholtz, peterporfy, polmiro, rickvdl, skydoves, tonidero, vegaro
Bots (5): RevenueCat-Danger-Bot, codecov[bot], cursor[bot], emerge-tools[bot], socket-security[bot]
New guidelines added
ForbiddenPublicEnumdetekt ruleForbiddenPublicSealedClass.@SerialNamefor snake_case wire fieldsDefault/Implsuffix overTypefor implementationsTypenaming is not really common in Android".Logger.vfor polling)verbose, notdebug.synchronizedblock.ExceptionoverRuntimeExceptionfor domain errorsRuntimeExceptioncrashes the app;Exceptionis for catchable domain errors.Checklist
ForbiddenPublicEnumdetekt rule (8 test cases)./gradlew :detekt-rules:testpasses./gradlew detektAllpasses (24 existing public enums baselined)purchases-iosand hybridsTest plan
./gradlew :detekt-rules:test— all tests pass (existing + 8 new)./gradlew detektAll— passes with the updated baselineCLAUDE.mdis a symlink toAGENTS.mdand picks up changes automatically