├── .cirrus.star ├── .cirrus.yml ├── .cirrus └── clean-orchestrator-cache.sh ├── .gitattributes ├── .github ├── CODEOWNERS ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── PullRequestClosed.yml │ ├── PullRequestCreated.yml │ ├── RequestReview.yml │ ├── SubmitReview.yml │ ├── dogfood.yml │ ├── releasability.yaml │ ├── release.yml │ └── slack_notify.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── LICENSE_HEADER ├── README.md ├── SECURITY.md ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts └── src │ └── main │ └── kotlin │ └── org │ └── sonarsource │ └── kotlin │ └── buildsrc │ └── tasks │ ├── CreateKotlinGradleRuleStubsTask.kt │ ├── CreateKotlinRuleStubsTask.kt │ ├── CreateRuleStubsTask.kt │ ├── FetchRuleMetadata.kt │ ├── GitHubApi.kt │ ├── RuleStubTemplates.kt │ └── license.kt ├── compiler-docs.md ├── gradle.properties ├── gradle ├── verification-metadata.xml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── its ├── plugin │ ├── build.gradle.kts │ ├── projects │ │ ├── duplications │ │ │ └── kotlin │ │ │ │ ├── file1.kt │ │ │ │ └── file2.kt │ │ ├── externalreport │ │ │ ├── androidlint │ │ │ │ ├── build.gradle │ │ │ │ ├── lint-results.xml │ │ │ │ └── main.kt │ │ │ ├── detekt │ │ │ │ ├── detekt-checkstyle.xml │ │ │ │ └── main.kt │ │ │ └── ktlint │ │ │ │ ├── ktlint-checkstyle.xml │ │ │ │ └── main.kt │ │ ├── measures │ │ │ └── kotlin │ │ │ │ ├── empty_file.kt │ │ │ │ ├── file1.kt │ │ │ │ ├── file2.kt │ │ │ │ └── file3.ktt │ │ ├── suppress-warnings │ │ │ └── kotlin │ │ │ │ ├── file.kt │ │ │ │ └── file2.kt │ │ ├── tests-surefire-suffix │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── MyTest.kt │ │ ├── tests-with-submodule │ │ │ ├── pom.xml │ │ │ ├── src │ │ │ │ └── test │ │ │ │ │ └── kotlin │ │ │ │ │ └── MyTest.kt │ │ │ └── submodule │ │ │ │ ├── pom.xml │ │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── SubmoduleTest.kt │ │ └── tests-without-main-code │ │ │ ├── pom.xml │ │ │ └── src │ │ │ └── test │ │ │ └── kotlin │ │ │ └── MyTest.kt │ └── src │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── sonarsource │ │ │ └── slang │ │ │ ├── DuplicationsTest.java │ │ │ ├── ExternalReportTest.java │ │ │ ├── MeasuresTest.java │ │ │ ├── SonarLintTest.java │ │ │ ├── SuppressWarningsTest.java │ │ │ ├── SurefireTest.java │ │ │ ├── TestBase.java │ │ │ └── TestsHelper.java │ │ └── resources │ │ ├── norule.xml │ │ └── suppress-warnings-kotlin.xml └── ruling │ ├── build.gradle.kts │ └── src │ └── test │ ├── java │ └── org │ │ └── sonarsource │ │ └── slang │ │ └── SlangRulingTest.java │ └── resources │ ├── expected │ └── kotlin │ │ ├── android-architecture-components │ │ ├── kotlin-S100.json │ │ ├── kotlin-S1066.json │ │ ├── kotlin-S108.json │ │ ├── kotlin-S1128.json │ │ ├── kotlin-S1151.json │ │ ├── kotlin-S117.json │ │ ├── kotlin-S1186.json │ │ ├── kotlin-S126.json │ │ ├── kotlin-S1451.json │ │ ├── kotlin-S3353.json │ │ ├── kotlin-S5612.json │ │ ├── kotlin-S5867.json │ │ ├── kotlin-S6517.json │ │ ├── kotlin-S6526.json │ │ ├── kotlin-S6529.json │ │ ├── kotlin-S6530.json │ │ ├── kotlin-S6532.json │ │ └── kotlin-S899.json │ │ ├── corda │ │ ├── kotlin-S100.json │ │ ├── kotlin-S101.json │ │ ├── kotlin-S103.json │ │ ├── kotlin-S104.json │ │ ├── kotlin-S105.json │ │ ├── kotlin-S1066.json │ │ ├── kotlin-S1067.json │ │ ├── kotlin-S107.json │ │ ├── kotlin-S108.json │ │ ├── kotlin-S1110.json │ │ ├── kotlin-S1125.json │ │ ├── kotlin-S1128.json │ │ ├── kotlin-S1133.json │ │ ├── kotlin-S1134.json │ │ ├── kotlin-S1135.json │ │ ├── kotlin-S1143.json │ │ ├── kotlin-S1144.json │ │ ├── kotlin-S1151.json │ │ ├── kotlin-S117.json │ │ ├── kotlin-S1172.json │ │ ├── kotlin-S1186.json │ │ ├── kotlin-S1192.json │ │ ├── kotlin-S1206.json │ │ ├── kotlin-S122.json │ │ ├── kotlin-S125.json │ │ ├── kotlin-S126.json │ │ ├── kotlin-S1313.json │ │ ├── kotlin-S134.json │ │ ├── kotlin-S138.json │ │ ├── kotlin-S1451.json │ │ ├── kotlin-S1481.json │ │ ├── kotlin-S1821.json │ │ ├── kotlin-S1871.json │ │ ├── kotlin-S1874.json │ │ ├── kotlin-S2068.json │ │ ├── kotlin-S2097.json │ │ ├── kotlin-S2245.json │ │ ├── kotlin-S3353.json │ │ ├── kotlin-S3776.json │ │ ├── kotlin-S3923.json │ │ ├── kotlin-S4144.json │ │ ├── kotlin-S4423.json │ │ ├── kotlin-S5612.json │ │ ├── kotlin-S6218.json │ │ ├── kotlin-S6508.json │ │ ├── kotlin-S6510.json │ │ ├── kotlin-S6511.json │ │ ├── kotlin-S6514.json │ │ ├── kotlin-S6515.json │ │ ├── kotlin-S6516.json │ │ ├── kotlin-S6517.json │ │ ├── kotlin-S6518.json │ │ ├── kotlin-S6524.json │ │ ├── kotlin-S6526.json │ │ ├── kotlin-S6529.json │ │ ├── kotlin-S6530.json │ │ ├── kotlin-S6531.json │ │ ├── kotlin-S6532.json │ │ ├── kotlin-S6558.json │ │ ├── kotlin-S6611.json │ │ ├── kotlin-S6615.json │ │ ├── kotlin-S6619.json │ │ └── kotlin-S899.json │ │ ├── intellij-rust │ │ ├── kotlin-S100.json │ │ ├── kotlin-S103.json │ │ ├── kotlin-S104.json │ │ ├── kotlin-S1066.json │ │ ├── kotlin-S1067.json │ │ ├── kotlin-S107.json │ │ ├── kotlin-S108.json │ │ ├── kotlin-S1125.json │ │ ├── kotlin-S1128.json │ │ ├── kotlin-S1133.json │ │ ├── kotlin-S1134.json │ │ ├── kotlin-S1135.json │ │ ├── kotlin-S1144.json │ │ ├── kotlin-S1151.json │ │ ├── kotlin-S117.json │ │ ├── kotlin-S1186.json │ │ ├── kotlin-S1192.json │ │ ├── kotlin-S122.json │ │ ├── kotlin-S125.json │ │ ├── kotlin-S126.json │ │ ├── kotlin-S134.json │ │ ├── kotlin-S138.json │ │ ├── kotlin-S1451.json │ │ ├── kotlin-S1479.json │ │ ├── kotlin-S1481.json │ │ ├── kotlin-S1821.json │ │ ├── kotlin-S1871.json │ │ ├── kotlin-S2068.json │ │ ├── kotlin-S2245.json │ │ ├── kotlin-S3353.json │ │ ├── kotlin-S3776.json │ │ ├── kotlin-S3923.json │ │ ├── kotlin-S5612.json │ │ ├── kotlin-S5867.json │ │ ├── kotlin-S6508.json │ │ ├── kotlin-S6510.json │ │ ├── kotlin-S6511.json │ │ ├── kotlin-S6516.json │ │ ├── kotlin-S6517.json │ │ ├── kotlin-S6518.json │ │ ├── kotlin-S6529.json │ │ ├── kotlin-S6531.json │ │ ├── kotlin-S6611.json │ │ ├── kotlin-S6615.json │ │ └── kotlin-S6619.json │ │ ├── kotlin-language-server │ │ ├── kotlin-S103.json │ │ ├── kotlin-S105.json │ │ ├── kotlin-S1066.json │ │ ├── kotlin-S1128.json │ │ ├── kotlin-S1135.json │ │ ├── kotlin-S1144.json │ │ ├── kotlin-S1151.json │ │ ├── kotlin-S1186.json │ │ ├── kotlin-S1192.json │ │ ├── kotlin-S125.json │ │ ├── kotlin-S134.json │ │ ├── kotlin-S138.json │ │ ├── kotlin-S1451.json │ │ ├── kotlin-S1821.json │ │ ├── kotlin-S3353.json │ │ ├── kotlin-S3776.json │ │ ├── kotlin-S5612.json │ │ ├── kotlin-S5867.json │ │ ├── kotlin-S6510.json │ │ ├── kotlin-S6517.json │ │ ├── kotlin-S6518.json │ │ ├── kotlin-S6519.json │ │ ├── kotlin-S6524.json │ │ ├── kotlin-S6529.json │ │ ├── kotlin-S6531.json │ │ ├── kotlin-S6611.json │ │ ├── kotlin-S6619.json │ │ └── kotlin-S899.json │ │ ├── kotlin │ │ ├── kotlin-ParsingError.json │ │ ├── kotlin-S100.json │ │ ├── kotlin-S101.json │ │ ├── kotlin-S103.json │ │ ├── kotlin-S104.json │ │ ├── kotlin-S105.json │ │ ├── kotlin-S1066.json │ │ ├── kotlin-S1067.json │ │ ├── kotlin-S107.json │ │ ├── kotlin-S108.json │ │ ├── kotlin-S1110.json │ │ ├── kotlin-S1125.json │ │ ├── kotlin-S1128.json │ │ ├── kotlin-S1133.json │ │ ├── kotlin-S1134.json │ │ ├── kotlin-S1135.json │ │ ├── kotlin-S1143.json │ │ ├── kotlin-S1144.json │ │ ├── kotlin-S1151.json │ │ ├── kotlin-S117.json │ │ ├── kotlin-S1172.json │ │ ├── kotlin-S1186.json │ │ ├── kotlin-S1192.json │ │ ├── kotlin-S1206.json │ │ ├── kotlin-S122.json │ │ ├── kotlin-S125.json │ │ ├── kotlin-S126.json │ │ ├── kotlin-S134.json │ │ ├── kotlin-S138.json │ │ ├── kotlin-S1451.json │ │ ├── kotlin-S1479.json │ │ ├── kotlin-S1481.json │ │ ├── kotlin-S1656.json │ │ ├── kotlin-S1763.json │ │ ├── kotlin-S1764.json │ │ ├── kotlin-S1821.json │ │ ├── kotlin-S1871.json │ │ ├── kotlin-S1874.json │ │ ├── kotlin-S1940.json │ │ ├── kotlin-S2097.json │ │ ├── kotlin-S2116.json │ │ ├── kotlin-S2245.json │ │ ├── kotlin-S3353.json │ │ ├── kotlin-S3776.json │ │ ├── kotlin-S3923.json │ │ ├── kotlin-S4144.json │ │ ├── kotlin-S4790.json │ │ ├── kotlin-S5612.json │ │ ├── kotlin-S5842.json │ │ ├── kotlin-S5867.json │ │ ├── kotlin-S5869.json │ │ ├── kotlin-S6218.json │ │ ├── kotlin-S6508.json │ │ ├── kotlin-S6510.json │ │ ├── kotlin-S6511.json │ │ ├── kotlin-S6512.json │ │ ├── kotlin-S6514.json │ │ ├── kotlin-S6515.json │ │ ├── kotlin-S6516.json │ │ ├── kotlin-S6517.json │ │ ├── kotlin-S6518.json │ │ ├── kotlin-S6519.json │ │ ├── kotlin-S6524.json │ │ ├── kotlin-S6526.json │ │ ├── kotlin-S6529.json │ │ ├── kotlin-S6530.json │ │ ├── kotlin-S6531.json │ │ ├── kotlin-S6532.json │ │ ├── kotlin-S6558.json │ │ ├── kotlin-S6611.json │ │ ├── kotlin-S6615.json │ │ ├── kotlin-S6619.json │ │ └── kotlin-S899.json │ │ ├── okio │ │ ├── kotlin-S104.json │ │ ├── kotlin-S1067.json │ │ ├── kotlin-S108.json │ │ ├── kotlin-S1135.json │ │ ├── kotlin-S1186.json │ │ ├── kotlin-S1192.json │ │ ├── kotlin-S126.json │ │ ├── kotlin-S134.json │ │ ├── kotlin-S138.json │ │ ├── kotlin-S1451.json │ │ ├── kotlin-S1764.json │ │ ├── kotlin-S1874.json │ │ ├── kotlin-S2097.json │ │ ├── kotlin-S2245.json │ │ ├── kotlin-S3776.json │ │ ├── kotlin-S5612.json │ │ ├── kotlin-S6510.json │ │ ├── kotlin-S6511.json │ │ ├── kotlin-S6514.json │ │ ├── kotlin-S6518.json │ │ ├── kotlin-S6530.json │ │ ├── kotlin-S6532.json │ │ └── kotlin-S6619.json │ │ └── test-resources-sources │ │ ├── kotlin-S1144.json │ │ ├── kotlin-S1451.json │ │ ├── kotlin-S1481.json │ │ ├── kotlin-S1763.json │ │ ├── kotlin-S2068.json │ │ ├── kotlin-S2116.json │ │ ├── kotlin-S2122.json │ │ ├── kotlin-S2123.json │ │ ├── kotlin-S2757.json │ │ ├── kotlin-S3353.json │ │ ├── kotlin-S3958.json │ │ ├── kotlin-S6202.json │ │ ├── kotlin-S6512.json │ │ └── kotlin-S6615.json │ └── sources │ └── kotlin │ ├── S1144.kt │ ├── S1763.kt │ ├── S2068.kt │ ├── S2116.kt │ ├── S2122.kt │ ├── S2123.kt │ ├── S2757.kt │ ├── S3958.kt │ ├── S6202.kt │ └── S6512.kt ├── kotlin-checks-test-sources ├── build.gradle.kts └── src │ └── main │ ├── files │ └── non-compiling │ │ └── checks │ │ ├── AbstractClassShouldBeInterfaceCheckSampleNonCompiling.kt │ │ ├── CollectionShouldBeImmutableCheckSampleNonCompiling.kt │ │ └── UselessNullCheckCheckSampleNonCompiling.kt │ ├── java │ ├── android │ │ ├── annotation │ │ │ ├── JavascriptInterface.java │ │ │ ├── NonNull.java │ │ │ └── Nullable.java │ │ ├── app │ │ │ ├── Activity.java │ │ │ └── Application.java │ │ ├── bluetooth │ │ │ └── BluetoothAdapter.java │ │ ├── content │ │ │ ├── BroadcastReceiver.kt │ │ │ ├── ContentResolver.java │ │ │ ├── Context.java │ │ │ ├── ContextWrapper.java │ │ │ ├── Intent.java │ │ │ ├── IntentFilter.kt │ │ │ └── SharedPreferences.java │ │ ├── hardware │ │ │ └── biometrics │ │ │ │ └── BiometricPrompt.java │ │ ├── net │ │ │ ├── http │ │ │ │ ├── SslCertificate.java │ │ │ │ └── SslError.java │ │ │ └── wifi │ │ │ │ └── WifiInfo.java │ │ ├── os │ │ │ ├── Bundle.java │ │ │ ├── CancellationSignal.java │ │ │ └── Handler.java │ │ ├── preference │ │ │ └── PreferenceManager.java │ │ ├── provider │ │ │ └── Settings.java │ │ ├── security │ │ │ └── keystore │ │ │ │ ├── KeyGenParameterSpec.java │ │ │ │ └── KeyProperties.java │ │ ├── support │ │ │ └── annotation │ │ │ │ └── RequiresApi.kt │ │ ├── telephony │ │ │ ├── SubscriptionManager.java │ │ │ └── TelephonyManager.java │ │ └── webkit │ │ │ ├── SslErrorHandler.java │ │ │ ├── WebSettings.java │ │ │ ├── WebView.java │ │ │ ├── WebViewClient.java │ │ │ └── WebViewFactoryProvider.java │ ├── androidx │ │ ├── ads │ │ │ └── identifier │ │ │ │ ├── AdvertisingIdClient.java │ │ │ │ ├── AdvertisingIdInfo.java │ │ │ │ └── internal │ │ │ │ └── HoldingConnectionClient.java │ │ ├── biometric │ │ │ └── BiometricPrompt.java │ │ └── lifecycle │ │ │ └── ViewModel.java │ ├── com │ │ ├── google │ │ │ └── android │ │ │ │ └── gms │ │ │ │ └── ads │ │ │ │ └── identifier │ │ │ │ └── AdvertisingIdClient.java │ │ └── huawei │ │ │ └── hms │ │ │ └── ads │ │ │ └── identifier │ │ │ └── AdvertisingIdClient.java │ ├── io │ │ ├── MyFile.java │ │ └── realm │ │ │ └── RealmConfiguration.java │ └── net │ │ └── sqlcipher │ │ └── database │ │ ├── CursorFactory.java │ │ ├── DatabaseErrorHandler.java │ │ ├── SQLiteDatabase.java │ │ └── SQLiteDatabaseHook.java │ └── kotlin │ ├── android │ └── os │ │ ├── Build.kt │ │ ├── Environment.kt │ │ └── UserHandle.kt │ ├── androidx │ └── compose │ │ ├── foundation │ │ └── text │ │ │ ├── KeyboardOptions.kt │ │ │ └── input │ │ │ └── TextFieldState.kt │ │ ├── material │ │ ├── OutlinedTextField.kt │ │ ├── SecureTextField.kt │ │ └── TextField.kt │ │ ├── material3 │ │ ├── OutlinedTextField.kt │ │ ├── SecureTextField.kt │ │ └── TextField.kt │ │ └── ui │ │ ├── AnnotatedString.kt │ │ ├── Modifier.kt │ │ ├── TransformedText.kt │ │ └── text │ │ ├── TextRange.kt │ │ └── input │ │ ├── KeyboardCapitalization.kt │ │ ├── KeyboardType.kt │ │ ├── OffsetMapping.kt │ │ └── VisualTransformation.kt │ ├── checks │ ├── AbstractClassShouldBeInterfaceCheckSample.kt │ ├── AllBranchesIdenticalCheckSample.kt │ ├── AnchorPrecedenceCheckSample.kt │ ├── AndroidBroadcastingCheckSample.kt │ ├── AndroidKeyboardCacheOnPasswordInputCheckSample.kt │ ├── AndroidPersistentUniqueIdentifierCheckSample.kt │ ├── AndroidPersistentUniqueIdentifierCheckSampleNoSemantics.kt │ ├── AndroidWebViewJavascriptInterfaceCheckSample.kt │ ├── ArrayHashCodeAndToStringCheckSample.kt │ ├── AuthorisingNonAuthenticatedUsersCheckSample.kt │ ├── BadClassNameCheckSample.kt │ ├── BadFunctionNameCheckSample.kt │ ├── BiometricAuthWithoutCryptoCheckSample.kt │ ├── BooleanInversionCheckSample.kt │ ├── BooleanLiteralCheckSample.kt │ ├── CipherBlockChainingCheckSample.kt │ ├── CipherModeOperationCheckSample.kt │ ├── ClearTextProtocolCheckSample.kt │ ├── CodeAfterJumpCheckSample.kt │ ├── CollapsibleIfStatementsCheckSample.kt │ ├── CollectionCallingItselfCheckSample.kt │ ├── CollectionInappropriateCallsCheckSample.kt │ ├── CollectionShouldBeImmutableCheckSample.kt │ ├── CollectionShouldBeImmutableCheckSampleNoSemantics.kt │ ├── CollectionSizeAndArrayLengthCheckSample.kt │ ├── CommentedCodeCheckSample.kt │ ├── CoroutineScopeFunSuspendingCheckSample.kt │ ├── CoroutinesTimeoutApiUnusedCheckSample.kt │ ├── DataHashingCheckSample.kt │ ├── DebugFeatureEnabledCheckSample.kt │ ├── DelegationPatternCheckSample.kt │ ├── DeprecatedCodeCheckSample.kt │ ├── DeprecatedCodeCheckSampleNoSemantics.kt │ ├── DeprecatedCodeUsedCheckSample.kt │ ├── Dummy.kt │ ├── DummyNoIssues.kt │ ├── DummyRegexCheckSample.kt │ ├── DuplicateBranchCheckSample.kt │ ├── DuplicatedFunctionImplementationCheckSample.kt │ ├── DuplicatesInCharacterClassCheckSample.kt │ ├── ElseIfWithoutElseCheckSample.kt │ ├── EmptyBlockCheckSample.kt │ ├── EmptyCommentCheckSample.kt │ ├── EmptyFunctionCheckSample.kt │ ├── EmptyLineRegexCheckSample.kt │ ├── EmptyMatcherFP.kt │ ├── EmptyStringRepetitionCheckSample.kt │ ├── EncryptionAlgorithmCheckSample.kt │ ├── EqualsArgumentTypeCheckSample.kt │ ├── EqualsMethodUsageCheckSample.kt │ ├── EqualsOverriddenWithArrayFieldCheckSample.kt │ ├── EqualsOverriddenWithArrayFieldCheckSampleNoSemantics.kt │ ├── EqualsOverridenWithHashCodeCheckSample.kt │ ├── ExposedMutableFlowCheckSample.kt │ ├── ExternalAndroidStorageAccessCheckSample.kt │ ├── FileHeaderCheckSample.kt │ ├── FileHeaderCheckSampleCompliant.kt │ ├── FinalFlowOperationCheckSample.kt │ ├── FixMeCommentCheckSample.kt │ ├── FlowChannelReturningFunsNotSuspendingCheckSample.kt │ ├── FunctionCognitiveComplexityCheckSample.kt │ ├── GraphemeClustersInClassesCheckSample.kt │ ├── HardcodedCredentialsCheckSample.kt │ ├── HardcodedIpCheckSample.kt │ ├── HardcodedSecretsCheckSample.kt │ ├── IdenticalBinaryOperandCheckSample.kt │ ├── IdenticalConditionsCheckSample.kt │ ├── IfConditionalAlwaysTrueOrFalseCheckSample.kt │ ├── IgnoredOperationStatusCheckSample.kt │ ├── ImplicitParameterInLambdaCheckSample.kt │ ├── IndexedAccessCheckSample.kt │ ├── InjectableDispatchersCheckSample.kt │ ├── InterfaceCouldBeFunctionalCheckSample.kt │ ├── InvalidRegexCheckSample.kt │ ├── IsInstanceMethodCheckSample.kt │ ├── JumpInFinallyCheckSample.kt │ ├── LiftReturnStatementCheckSample.kt │ ├── MainSafeCoroutinesCheckSample.kt │ ├── MapValuesShouldBeAccessedSafelyCheckSample.kt │ ├── MatchCaseTooBigCheckSample.kt │ ├── MergeIfElseIntoWhenCheckSample.kt │ ├── MergeIfElseIntoWhenCheckThreshold2Sample.kt │ ├── MobileDatabaseEncryptionKeysCheckSample.kt │ ├── NestedMatchCheckSample.kt │ ├── OneStatementPerLineCheckSample.kt │ ├── PasswordPlaintextFastHashingCheckSample.kt │ ├── PreparedStatementAndResultSetCheckSample.kt │ ├── PropertyGetterAndSetterUsageCheckSample.kt │ ├── PseudoRandomCheckSample.kt │ ├── ReasonableTypeCastsCheckSample.kt │ ├── ReceivingIntentsCheckSample.kt │ ├── RedundantMethodsInDataClassesCheckSample.kt │ ├── RedundantParenthesesCheckSample.kt │ ├── RedundantSuspendModifierCheckSample.kt │ ├── RedundantSuspendModifierCheckSampleNoSemantics.kt │ ├── RedundantTypeCastsCheckSample.kt │ ├── RegexComplexityCheckSample.kt │ ├── ReluctantQuantifierCheckSample.kt │ ├── ReplaceGuavaWithKotlinCheckSample.kt │ ├── ReportCharacterClassRegexDummyCheckSample.kt │ ├── RobustCryptographicKeysCheckSample.kt │ ├── RunFinalizersCheckSample.kt │ ├── SamConversionCheckSample.kt │ ├── ScheduledThreadPoolExecutorZeroCheckSample.kt │ ├── SelfAssignmentCheckSample.kt │ ├── ServerCertificateCheckSample.kt │ ├── ServerCertificateCheckSampleNoSemantics.kt │ ├── SimplifiedPreconditionsCheckSample.kt │ ├── SimplifyFilteringBeforeTerminalOperationCheckSample.kt │ ├── SimplifyFilteringBeforeTerminalOperationCheckSampleNoSemantics.kt │ ├── SimplifySizeExpressionCheckSample.kt │ ├── SingletonPatternCheckSample.kt │ ├── StreamNotConsumedCheckSample.kt │ ├── StringLiteralDuplicatedCheckSample.kt │ ├── StrongCipherAlgorithmCheckSample.kt │ ├── StructuredConcurrencyPrinciplesCheckSample.kt │ ├── SuspendingFunCallerDispatcherCheckSample.kt │ ├── TabsCheckSample.kt │ ├── TestClass.kt │ ├── TodoCommentCheckSample.kt │ ├── TooComplexExpressionCheckSample.kt │ ├── TooDeeplyNestedStatementsCheckSample.kt │ ├── TooLongFunctionCheckSample.kt │ ├── TooLongLambdaCheckSample.kt │ ├── TooLongLineCheckSample.kt │ ├── TooManyCasesCheckSample.kt │ ├── TooManyLinesOfCodeFileCheckSample.kt │ ├── TooManyLinesOfCodeFileCheckSampleCompliant.kt │ ├── TooManyParametersCheckSample.kt │ ├── UnencryptedDatabaseOnMobileCheckSample.kt │ ├── UnencryptedFilesInMobileApplicationsCheckSample.kt │ ├── UnencryptedFilesInMobileApplicationsCheckSampleNonAndroid.kt │ ├── UnicodeAwareCharClassesCheckSample.kt │ ├── UnnecessaryImportsCheckSample.kt │ ├── UnnecessaryImportsCheckSampleNoSemantics.kt │ ├── UnnecessaryImportsCheckSamplePartialSemantics.kt │ ├── UnpredictableHashSaltCheckSample.kt │ ├── UnpredictableSecureRandomSaltCheckSample.kt │ ├── UnsuitedFindFunctionWithNullComparisonCheckSample.kt │ ├── UnusedDeferredResultCheckSample.kt │ ├── UnusedFunctionParameterCheckSample.kt │ ├── UnusedLocalVariableCheckSample.kt │ ├── UnusedLocalVariableCheckSampleNoSemantics.kt │ ├── UnusedLocalVariableCheckSamplePartialSemantics.kt │ ├── UnusedPrivateMethodCheckSample.kt │ ├── UnusedPrivateMethodCheckSampleNoSemantics.kt │ ├── UselessAssignmentsCheckSample.kt │ ├── UselessIncrementCheckSample.kt │ ├── UselessNullCheckCheckSample.kt │ ├── UselessNullCheckCheckSampleNoSemantics.kt │ ├── UselessNullCheckCheckSampleWithErrorDiagnostics.kt │ ├── VarShouldBeValCheckSample.kt │ ├── VarShouldBeValCheckSampleNoSemantics.kt │ ├── VariableAndParameterNameCheckSample.kt │ ├── VerifiedServerHostnamesCheckSample.kt │ ├── ViewModelSuspendingFunctionsCheckSample.kt │ ├── VoidShouldBeUnitCheckSample.kt │ ├── VoidShouldBeUnitCheckSampleCustomVoid.kt │ ├── VoidShouldBeUnitCheckSampleNoSemantics.kt │ ├── WeakSSLContextCheckSample.kt │ ├── WebViewJavaScriptSupportCheckSample.kt │ ├── WebViewsFileAccessCheckSample.kt │ ├── WebViewsFileAccessCheckSampleNoSemantics.kt │ ├── WrongAssignmentOperatorCheckSample.kt │ └── otherpackage │ │ └── UnnecessaryImportsCheckSampleNoSemanticsLongPackage.kt │ ├── delegates │ └── delegates.kt │ ├── imports │ ├── ClassWithCompanionObject.kt │ └── ClassWithNamedCompanionObject.kt │ ├── operators │ └── operators.kt │ ├── otherpackage │ ├── Importable.kt │ └── Void.kt │ └── sample │ ├── IssueNonSuppressionSample.kt │ ├── IssueSuppressionSample.kt │ ├── IssueWithoutSuppressionSample.kt │ ├── SampleClass.kt │ └── functions.kt ├── settings.gradle.kts ├── sonar-kotlin-api ├── build.gradle.kts └── src │ ├── main │ └── java │ │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ ├── api │ │ ├── checks │ │ │ ├── AbstractCheck.kt │ │ │ ├── ApiExtensions.kt │ │ │ ├── ArgumentMatcher.kt │ │ │ ├── CallAbstractCheck.kt │ │ │ ├── CollectionExtensions.kt │ │ │ ├── CommonConstants.kt │ │ │ ├── FunMatcher.kt │ │ │ ├── InputFileContext.kt │ │ │ ├── InputFileContextImpl.kt │ │ │ └── KotlinCheck.kt │ │ ├── common │ │ │ ├── KotlinLanguage.kt │ │ │ ├── MeasureDuration.kt │ │ │ └── constants.kt │ │ ├── frontend │ │ │ ├── AbstractPropertyHandlerSensor.kt │ │ │ ├── K2.kt │ │ │ ├── KotlinAnalyzerRegexSource.kt │ │ │ ├── KotlinCodeVerifier.kt │ │ │ ├── KotlinCoreEnvironmentTools.kt │ │ │ ├── KotlinFileContext.kt │ │ │ ├── KotlinTree.kt │ │ │ ├── ParseException.kt │ │ │ └── RegexCache.kt │ │ ├── logging │ │ │ └── LoggerExtensions.kt │ │ ├── regex │ │ │ ├── AbstractRegexCheck.kt │ │ │ └── RegexContext.kt │ │ ├── reporting │ │ │ ├── KotlinTextRanges.kt │ │ │ ├── Message.kt │ │ │ └── SecondaryLocation.kt │ │ ├── sensors │ │ │ ├── AbstractKotlinSensor.kt │ │ │ └── AbstractKotlinSensorExecuteContext.kt │ │ └── visiting │ │ │ ├── CommentAnnotationsAndTokenVisitor.kt │ │ │ ├── KotlinFileVisitor.kt │ │ │ ├── KtChecksVisitor.kt │ │ │ └── KtTreeVisitor.kt │ │ ├── ast │ │ └── AstPrinter.kt │ │ └── tools │ │ ├── AstPrinter.kt │ │ └── PatchKotlinCompiler.kt │ └── test │ ├── java │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ ├── api │ │ ├── checks │ │ │ ├── AbstractCheckTest.kt │ │ │ ├── ApiExtensionsKtTest.kt │ │ │ ├── CollectionExtensionsKtTest.kt │ │ │ ├── FunMatcherTest.kt │ │ │ └── InputFileContextImplTest.kt │ │ ├── frontend │ │ │ ├── KotlinASTTest.kt │ │ │ ├── KotlinCodeVerifierTest.kt │ │ │ ├── KotlinCoreEnvironmentToolsTest.kt │ │ │ ├── KotlinLanguageVersionTest.kt │ │ │ └── TextRangeTrackerTest.kt │ │ ├── regex │ │ │ └── AbstractRegexCheckTest.kt │ │ ├── sensors │ │ │ └── AbstractKotlinSensorTest.kt │ │ └── visiting │ │ │ └── SonarKaSessionTest.kt │ │ ├── ast │ │ └── AstPrinterTest.kt │ │ └── tools │ │ └── AstPrinterTest.kt │ └── resources │ ├── api │ └── sample │ │ ├── SimpleClass.kt │ │ └── foo.kt │ ├── ast-printing │ ├── TestFileToPrintAstFor.dot │ ├── TestFileToPrintAstFor.kt │ └── TestFileToPrintAstFor.txt │ └── ast │ ├── breakAndContinueInsideWhen.kt │ ├── breakAndContinueInsideWhen.txt │ ├── chainThen.kt │ ├── chainThen.txt │ ├── extension.kt │ ├── extension.txt │ ├── kotlin-1.3.kt │ ├── kotlin-1.3.txt │ ├── kotlin-1.5.kt │ ├── kotlin-1.5.txt │ ├── kotlin-1.6.kt │ ├── kotlin-1.6.txt │ ├── kotlin-1.9.kt │ ├── kotlin-1.9.txt │ ├── mix.kt │ ├── mix.txt │ ├── mixedNamedAndPositionalArguments.kt │ ├── mixedNamedAndPositionalArguments.txt │ ├── referenceWithDefaultArg.kt │ ├── referenceWithDefaultArg.txt │ ├── simple.kt │ ├── simple.txt │ ├── suspendCallableReferences.kt │ ├── suspendCallableReferences.txt │ ├── trailing-coma.kt │ ├── trailing-coma.txt │ ├── unitReturningReferences.kt │ └── unitReturningReferences.txt ├── sonar-kotlin-checks ├── build.gradle.kts └── src │ ├── main │ └── java │ │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── checks │ │ ├── AbstractBranchDuplication.kt │ │ ├── AbstractClassShouldBeInterfaceCheck.kt │ │ ├── AbstractHardcodedVisitor.kt │ │ ├── AbstractTooLongFunctionRule.kt │ │ ├── AllBranchesIdenticalCheck.kt │ │ ├── AnchorPrecedenceCheck.kt │ │ ├── AndroidBroadcastingCheck.kt │ │ ├── AndroidKeyboardCacheOnPasswordInputCheck.kt │ │ ├── AndroidPersistentUniqueIdentifierCheck.kt │ │ ├── AndroidWebViewJavascriptInterfaceCheck.kt │ │ ├── ArrayHashCodeAndToStringCheck.kt │ │ ├── AuthorisingNonAuthenticatedUsersCheck.kt │ │ ├── BadClassNameCheck.kt │ │ ├── BadFunctionNameCheck.kt │ │ ├── BiometricAuthWithoutCryptoCheck.kt │ │ ├── BooleanInversionCheck.kt │ │ ├── BooleanLiteralCheck.kt │ │ ├── CipherBlockChainingCheck.kt │ │ ├── CipherModeOperationCheck.kt │ │ ├── ClearTextProtocolCheck.kt │ │ ├── CodeAfterJumpCheck.kt │ │ ├── CognitiveComplexity.kt │ │ ├── CollapsibleIfStatementsCheck.kt │ │ ├── CollectionCallingItselfCheck.kt │ │ ├── CollectionInappropriateCallsCheck.kt │ │ ├── CollectionShouldBeImmutableCheck.kt │ │ ├── CollectionSizeAndArrayLengthCheck.kt │ │ ├── CommentedCodeCheck.kt │ │ ├── CoroutineScopeFunSuspendingCheck.kt │ │ ├── CoroutinesTimeoutApiUnusedCheck.kt │ │ ├── DataHashingCheck.kt │ │ ├── DebugFeatureEnabledCheck.kt │ │ ├── DelegationPatternCheck.kt │ │ ├── DeprecatedCodeCheck.kt │ │ ├── DeprecatedCodeUsedCheck.kt │ │ ├── DuplicateBranchCheck.kt │ │ ├── DuplicatedFunctionImplementationCheck.kt │ │ ├── DuplicatesInCharacterClassCheck.kt │ │ ├── ElseIfWithoutElseCheck.kt │ │ ├── EmptyBlockCheck.kt │ │ ├── EmptyCommentCheck.kt │ │ ├── EmptyFunctionCheck.kt │ │ ├── EmptyLineRegexCheck.kt │ │ ├── EmptyStringRepetitionCheck.kt │ │ ├── EncryptionAlgorithmCheck.kt │ │ ├── EqualsArgumentTypeCheck.kt │ │ ├── EqualsMethodUsageCheck.kt │ │ ├── EqualsOverriddenWithArrayFieldCheck.kt │ │ ├── EqualsOverridenWithHashCodeCheck.kt │ │ ├── ExposedMutableFlowCheck.kt │ │ ├── ExternalAndroidStorageAccessCheck.kt │ │ ├── FileHeaderCheck.kt │ │ ├── FinalFlowOperationCheck.kt │ │ ├── FixMeCommentCheck.kt │ │ ├── FlowChannelReturningFunsNotSuspendingCheck.kt │ │ ├── FunctionCognitiveComplexityCheck.kt │ │ ├── GraphemeClustersInClassesCheck.kt │ │ ├── HardcodedCredentialsCheck.kt │ │ ├── HardcodedIpCheck.kt │ │ ├── HardcodedSecretsCheck.kt │ │ ├── IdenticalBinaryOperandCheck.kt │ │ ├── IdenticalConditionsCheck.kt │ │ ├── IfConditionalAlwaysTrueOrFalseCheck.kt │ │ ├── IgnoredOperationStatusCheck.kt │ │ ├── ImplicitParameterInLambdaCheck.kt │ │ ├── IndexedAccessCheck.kt │ │ ├── InjectableDispatchersCheck.kt │ │ ├── InterfaceCouldBeFunctionalCheck.kt │ │ ├── InvalidRegexCheck.kt │ │ ├── IsInstanceMethodCheck.kt │ │ ├── JumpInFinallyCheck.kt │ │ ├── LiftReturnStatementCheck.kt │ │ ├── MainSafeCoroutinesCheck.kt │ │ ├── MapValuesShouldBeAccessedSafelyCheck.kt │ │ ├── MatchCaseTooBigCheck.kt │ │ ├── MergeIfElseIntoWhenCheck.kt │ │ ├── MobileDatabaseEncryptionKeysCheck.kt │ │ ├── NestedMatchCheck.kt │ │ ├── OneStatementPerLineCheck.kt │ │ ├── ParsingErrorCheck.kt │ │ ├── PasswordPlaintextFastHashingCheck.kt │ │ ├── PreparedStatementAndResultSetCheck.kt │ │ ├── PropertyGetterAndSetterUsageCheck.kt │ │ ├── PseudoRandomCheck.kt │ │ ├── ReasonableTypeCastsCheck.kt │ │ ├── ReceivingIntentsCheck.kt │ │ ├── RedundantMethodsInDataClassesCheck.kt │ │ ├── RedundantParenthesesCheck.kt │ │ ├── RedundantSuspendModifierCheck.kt │ │ ├── RedundantTypeCastsCheck.kt │ │ ├── RegexComplexityCheck.kt │ │ ├── ReluctantQuantifierCheck.kt │ │ ├── ReplaceGuavaWithKotlinCheck.kt │ │ ├── RobustCryptographicKeysCheck.kt │ │ ├── RunFinalizersCheck.kt │ │ ├── SamConversionCheck.kt │ │ ├── ScheduledThreadPoolExecutorZeroCheck.kt │ │ ├── SelfAssignmentCheck.kt │ │ ├── ServerCertificateCheck.kt │ │ ├── SimplifiedPreconditionsCheck.kt │ │ ├── SimplifyFilteringBeforeTerminalOperationCheck.kt │ │ ├── SimplifySizeExpressionCheck.kt │ │ ├── SingletonPatternCheck.kt │ │ ├── StreamNotConsumedCheck.kt │ │ ├── StringLiteralDuplicatedCheck.kt │ │ ├── StrongCipherAlgorithmCheck.kt │ │ ├── StructuredConcurrencyPrinciplesCheck.kt │ │ ├── SuspendingFunCallerDispatcherCheck.kt │ │ ├── SyntacticEquivalence.kt │ │ ├── TabsCheck.kt │ │ ├── TodoCommentCheck.kt │ │ ├── TooComplexExpressionCheck.kt │ │ ├── TooDeeplyNestedStatementsCheck.kt │ │ ├── TooLongFunctionCheck.kt │ │ ├── TooLongLambdaCheck.kt │ │ ├── TooLongLineCheck.kt │ │ ├── TooManyCasesCheck.kt │ │ ├── TooManyLinesOfCodeFileCheck.kt │ │ ├── TooManyParametersCheck.kt │ │ ├── UnencryptedDatabaseOnMobileCheck.kt │ │ ├── UnencryptedFilesInMobileApplicationsCheck.kt │ │ ├── UnicodeAwareCharClassesCheck.kt │ │ ├── UnnecessaryImportsCheck.kt │ │ ├── UnpredictableHashSaltCheck.kt │ │ ├── UnpredictableSecureRandomSaltCheck.kt │ │ ├── UnsuitedFindFunctionWithNullComparisonCheck.kt │ │ ├── UnusedDeferredResultCheck.kt │ │ ├── UnusedFunctionParameterCheck.kt │ │ ├── UnusedLocalVariableCheck.kt │ │ ├── UnusedPrivateMethodCheck.kt │ │ ├── UselessAssignmentsCheck.kt │ │ ├── UselessIncrementCheck.kt │ │ ├── UselessNullCheckCheck.kt │ │ ├── VarShouldBeValCheck.kt │ │ ├── VariableAndParameterNameCheck.kt │ │ ├── VerifiedServerHostnamesCheck.kt │ │ ├── ViewModelSuspendingFunctionsCheck.kt │ │ ├── VoidShouldBeUnitCheck.kt │ │ ├── WeakSSLContextCheck.kt │ │ ├── WebViewJavaScriptSupportCheck.kt │ │ ├── WebViewsFileAccessCheck.kt │ │ └── WrongAssignmentOperatorCheck.kt │ └── test │ └── java │ └── org │ └── sonarsource │ └── kotlin │ └── checks │ ├── AbstractClassShouldBeInterfaceCheckTest.kt │ ├── AllBranchesIdenticalCheckTest.kt │ ├── AnchorPrecedenceCheckTest.kt │ ├── AndroidBroadcastingCheckTest.kt │ ├── AndroidKeyboardCacheOnPasswordInputCheckTest.kt │ ├── AndroidPersistentUniqueIdentifierCheckTest.kt │ ├── AndroidWebViewJavascriptInterfaceCheckTest.kt │ ├── ArrayHashCodeAndToStringCheckTest.kt │ ├── AuthorisingNonAuthenticatedUsersCheckTest.kt │ ├── BadClassNameCheckTest.kt │ ├── BadFunctionNameCheckTest.kt │ ├── BiometricAuthWithoutCryptoCheckTest.kt │ ├── BooleanInversionCheckTest.kt │ ├── BooleanLiteralCheckTest.kt │ ├── CheckTest.kt │ ├── CheckTestForAndroidOnly.kt │ ├── CheckTestNonCompiling.kt │ ├── CheckTestWithNoSemantics.kt │ ├── CipherBlockChainingCheckTest.kt │ ├── CipherModeOperationCheckTest.kt │ ├── ClearTextProtocolCheckTest.kt │ ├── CodeAfterJumpCheckTest.kt │ ├── CollapsibleIfStatementsCheckTest.kt │ ├── CollectionCallingItselfCheckTest.kt │ ├── CollectionInappropriateCallsCheckTest.kt │ ├── CollectionShouldBeImmutableCheckTest.kt │ ├── CollectionSizeAndArrayLengthCheckTest.kt │ ├── CommentedCodeCheckTest.kt │ ├── CoroutineScopeFunSuspendingCheckTest.kt │ ├── CoroutinesTimeoutApiUnusedCheckTest.kt │ ├── DataHashingCheckTest.kt │ ├── DebugFeatureEnabledCheckTest.kt │ ├── DelegationPatternCheckTest.kt │ ├── DeprecatedCodeCheckTest.kt │ ├── DeprecatedCodeUsedCheckTest.kt │ ├── DuplicateBranchCheckTest.kt │ ├── DuplicatedFunctionImplementationCheckTest.kt │ ├── DuplicatesInCharacterClassCheckTest.kt │ ├── ElseIfWithoutElseCheckTest.kt │ ├── EmptyBlockCheckTest.kt │ ├── EmptyCommentCheckTest.kt │ ├── EmptyFunctionCheckTest.kt │ ├── EmptyLineRegexCheckTest.kt │ ├── EmptyStringRepetitionCheckTest.kt │ ├── EncryptionAlgorithmCheckTest.kt │ ├── EqualsArgumentTypeCheckTest.kt │ ├── EqualsMethodUsageCheckTest.kt │ ├── EqualsOverriddenWithArrayFieldCheckTest.kt │ ├── EqualsOverridenWithHashCodeCheckTest.kt │ ├── ExposedMutableFlowCheckTest.kt │ ├── ExternalAndroidStorageAccessCheckTest.kt │ ├── FileHeaderCheckTest.kt │ ├── FinalFlowOperationCheckTest.kt │ ├── FixMeCommentCheckTest.kt │ ├── FlowChannelReturningFunsNotSuspendingCheckTest.kt │ ├── FunctionCognitiveComplexityCheckTest.kt │ ├── GraphemeClustersInClassesCheckTest.kt │ ├── HardcodedCredentialsCheckTest.kt │ ├── HardcodedIpCheckTest.kt │ ├── HardcodedSecretsCheckTest.kt │ ├── IdenticalBinaryOperandCheckTest.kt │ ├── IdenticalConditionsCheckTest.kt │ ├── IfConditionalAlwaysTrueOrFalseCheckTest.kt │ ├── IgnoredOperationStatusCheckTest.kt │ ├── ImplicitParameterInLambdaCheckTest.kt │ ├── IndexedAccessCheckTest.kt │ ├── InjectableDispatchersCheckTest.kt │ ├── InterfaceCouldBeFunctionalCheckTest.kt │ ├── InvalidRegexCheckTest.kt │ ├── IsInstanceMethodCheckTest.kt │ ├── JumpInFinallyCheckTest.kt │ ├── LiftReturnStatementCheckTest.kt │ ├── MainSafeCoroutinesCheckTest.kt │ ├── MapValuesShouldBeAccessedSafelyCheckTest.kt │ ├── MatchCaseTooBigCheckTest.kt │ ├── MergeIfElseIntoWhenCheckTest.kt │ ├── MobileDatabaseEncryptionKeysCheckTest.kt │ ├── NestedMatchCheckTest.kt │ ├── OneStatementPerLineCheckTest.kt │ ├── PasswordPlaintextFastHashingCheckTest.kt │ ├── PreparedStatementAndResultSetCheckTest.kt │ ├── PropertyGetterAndSetterUsageCheckTest.kt │ ├── PseudoRandomCheckTest.kt │ ├── ReasonableTypeCastsCheckTest.kt │ ├── ReceivingIntentsCheckTest.kt │ ├── RedundantMethodsInDataClassesCheckTest.kt │ ├── RedundantParenthesesCheckTest.kt │ ├── RedundantSuspendModifierCheckTest.kt │ ├── RedundantTypeCastsCheckTest.kt │ ├── RegexComplexityCheckTest.kt │ ├── ReluctantQuantifierCheckTest.kt │ ├── ReplaceGuavaWithKotlinCheckTest.kt │ ├── RobustCryptographicKeysCheckTest.kt │ ├── RunFinalizersCheckTest.kt │ ├── SamConversionCheckTest.kt │ ├── ScheduledThreadPoolExecutorZeroCheckTest.kt │ ├── SelfAssignmentCheckTest.kt │ ├── ServerCertificateCheckTest.kt │ ├── SimplifiedPreconditionsCheckTest.kt │ ├── SimplifyFilteringBeforeTerminalOperationCheckTest.kt │ ├── SimplifySizeExpressionCheckTest.kt │ ├── SingletonPatternCheckTest.kt │ ├── StreamNotConsumedCheckTest.kt │ ├── StringLiteralDuplicatedCheckTest.kt │ ├── StrongCipherAlgorithmCheckTest.kt │ ├── StructuredConcurrencyPrinciplesCheckTest.kt │ ├── SuspendingFunCallerDispatcherCheckTest.kt │ ├── TabsCheckTest.kt │ ├── TodoCommentCheckTest.kt │ ├── TooComplexExpressionCheckTest.kt │ ├── TooDeeplyNestedStatementsCheckTest.kt │ ├── TooLongFunctionCheckTest.kt │ ├── TooLongLambdaCheckTest.kt │ ├── TooLongLineCheckTest.kt │ ├── TooManyCasesCheckTest.kt │ ├── TooManyLinesOfCodeFileCheckTest.kt │ ├── TooManyParametersCheckTest.kt │ ├── UnencryptedDatabaseOnMobileCheckTest.kt │ ├── UnencryptedFilesInMobileApplicationsCheckTest.kt │ ├── UnicodeAwareCharClassesCheckTest.kt │ ├── UnnecessaryImportsCheckTest.kt │ ├── UnpredictableHashSaltCheckTest.kt │ ├── UnpredictableSecureRandomSaltCheckTest.kt │ ├── UnsuitedFindFunctionWithNullComparisonCheckTest.kt │ ├── UnusedAsyncResultCheckTest.kt │ ├── UnusedFunctionParameterCheckTest.kt │ ├── UnusedLocalVariableCheckTest.kt │ ├── UnusedPrivateMethodCheckTest.kt │ ├── UselessAssignmentsCheckTest.kt │ ├── UselessIncrementCheckTest.kt │ ├── UselessNullCheckCheckTest.kt │ ├── VarShouldBeValCheckTest.kt │ ├── VariableAndParameterNameCheckTest.kt │ ├── VerifiedServerHostnamesCheckTest.kt │ ├── ViewModelSuspendingFunctionsCheckTest.kt │ ├── VoidShouldBeUnitCheckTest.kt │ ├── WeakSSLContextCheckTest.kt │ ├── WebViewJavaScriptSupportCheckTest.kt │ ├── WebViewsFileAccessCheckTest.kt │ ├── WrongAssignmentOperatorCheckTest.kt │ └── testing │ ├── DummyKotlinCheck.kt │ └── DummyKotlinCheckTest.kt ├── sonar-kotlin-external-linters ├── build.gradle.kts └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── sonarsource │ │ │ └── kotlin │ │ │ └── externalreport │ │ │ ├── androidlint │ │ │ ├── AndroidLintRulesDefinition.kt │ │ │ ├── AndroidLintSensor.kt │ │ │ └── AndroidLintXmlReportReader.kt │ │ │ ├── common │ │ │ ├── CheckstyleFormatImporter.java │ │ │ ├── CheckstyleFormatImporterWithRuleLoader.java │ │ │ └── package-info.java │ │ │ ├── detekt │ │ │ ├── DetektRulesDefinition.kt │ │ │ └── DetektSensor.kt │ │ │ └── ktlint │ │ │ ├── CheckstyleReportParser.kt │ │ │ ├── JsonReportParser.kt │ │ │ ├── KtlintRulesDefinition.kt │ │ │ ├── KtlintSensor.kt │ │ │ └── ReportImporter.kt │ └── resources │ │ └── org │ │ └── sonar │ │ └── l10n │ │ ├── android │ │ └── rules │ │ │ └── androidlint │ │ │ └── rules.json │ │ └── kotlin │ │ └── rules │ │ ├── detekt │ │ └── rules.json │ │ └── ktlint │ │ └── rules.json │ └── test │ ├── java │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── externalreport │ │ ├── androidlint │ │ ├── AndroidLintRulesDefinitionTest.kt │ │ └── AndroidLintSensorTest.kt │ │ ├── common │ │ ├── CheckstyleFormatImporterTest.java │ │ ├── CheckstyleFormatImporterWithRuleLoaderTest.java │ │ └── ExternalReportTestUtils.kt │ │ ├── detekt │ │ ├── DetektRulesDefinitionTest.kt │ │ └── DetektSensorTest.kt │ │ └── ktlint │ │ ├── KtlintRulesDefinitionTest.kt │ │ └── KtlintSensorTest.kt │ └── resources │ └── org │ └── sonarsource │ └── kotlin │ └── externalreport │ ├── A.kt │ ├── TabCharacter.go │ ├── androidlint │ ├── A.java │ ├── AndroidManifest.xml │ ├── B.kt │ ├── README.md │ ├── binary-file.gif │ ├── build.gradle │ ├── invalid-file.xml │ ├── lint-results-with-errors.xml │ ├── lint-results.xml │ └── not-android-lint-file.xml │ ├── detekt-checkstyle-with-errors.xml │ ├── detekt-checkstyle.xml │ ├── detekt │ ├── A.kt │ ├── detekt-checkstyle-with-errors.xml │ ├── detekt-checkstyle.xml │ ├── invalid-file.xml │ ├── main.kt │ └── not-checkstyle-file.xml │ ├── golandci-lint-report.xml │ ├── invalid-file.xml │ ├── ktlint │ ├── Foo.kt │ ├── foo-report-with-errors.json │ ├── foo-report-with-errors.xml │ ├── foo-report.json │ ├── foo-report.xml │ ├── invalid-checkstyle-file.xml │ ├── invalid-file.xml │ ├── invalid-json-file.json │ ├── invalid-json-format.json │ └── invalid-report-format.bin │ ├── main.kt │ ├── not-checkstyle-file.xml │ └── test-linter-rules.json ├── sonar-kotlin-gradle ├── build.gradle.kts └── src │ ├── main │ └── java │ │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── gradle │ │ ├── KotlinGradleCheckList.kt │ │ ├── KotlinGradleSensor.kt │ │ └── checks │ │ ├── AndroidReleaseBuildDebugCheck.kt │ │ ├── AndroidReleaseBuildObfuscationCheck.kt │ │ ├── CorePluginsShortcutUsageCheck.kt │ │ ├── DependencyGroupedCheck.kt │ │ ├── DependencyVersionHardcodedCheck.kt │ │ ├── MissingSettingsCheck.kt │ │ ├── MissingVerificationMetadataCheck.kt │ │ ├── RootProjectNamePresentCheck.kt │ │ ├── TaskDefinitionsCheck.kt │ │ ├── TaskRegisterVsCreateCheck.kt │ │ ├── androidReleaseBuildUtils.kt │ │ └── dependencyChecks.kt │ └── test │ ├── java │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── gradle │ │ ├── CheckConfigurationIntegrityTest.kt │ │ ├── KotlinGradleSensorTest.kt │ │ └── checks │ │ ├── AndroidReleaseBuildDebugCheckTest.kt │ │ ├── AndroidReleaseBuildObfuscationCheckTest.kt │ │ ├── CheckTest.kt │ │ ├── CorePluginsShortcutUsageCheckTest.kt │ │ ├── DependencyGroupedCheckTest.kt │ │ ├── DependencyVersionHardcodedCheckTest.kt │ │ ├── MissingVerificationMetadataCheckTest.kt │ │ ├── RootProjectNamePresentCheckTest.kt │ │ ├── TaskDefinitionsCheckTest.kt │ │ ├── TaskRegisterVsCreateCheckTest.kt │ │ └── testing │ │ ├── DummyKotlinGradleCheck.kt │ │ └── DummyKotlinGradleCheckTest.kt │ └── samples │ └── non-compiling │ ├── AndroidReleaseBuildDebugCheckSample │ ├── build.gradle.kts │ └── settings.gradle.kts │ ├── AndroidReleaseBuildObfuscationCheckSample │ ├── build.gradle.kts │ └── settings.gradle.kts │ ├── CorePluginsShortcutUsageCheckSample.kts │ ├── DependencyGroupedCheckSample.kts │ ├── DependencyVersionHardcodedCheckSample.kts │ ├── DummyKotlinGradleCheckNoIssuesSample.kts │ ├── DummyKotlinGradleCheckSample.kts │ ├── MissingVerificationMetadataCheckSample.kts │ ├── S6625 │ ├── compliant-setter │ │ └── settings.gradle.kts │ ├── compliant │ │ ├── build.gradle.kts │ │ └── settings.gradle.kts │ └── noncompliant │ │ └── settings.gradle.kts │ ├── TaskDefinitionsCheckSample.kts │ └── TaskRegisterVsCreateCheckSample.kts ├── sonar-kotlin-metrics ├── build.gradle.kts └── src │ ├── main │ └── java │ │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── metrics │ │ ├── CyclomaticComplexityVisitor.kt │ │ ├── IssueSuppressionVisitor.kt │ │ ├── MetricVisitor.kt │ │ ├── StatementsVisitor.kt │ │ ├── SyntaxHighlighter.kt │ │ └── TelemetryData.kt │ └── test │ ├── java │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── metrics │ │ ├── CyclomaticComplexityVisitorTest.kt │ │ ├── IssueSuppressionVisitorTest.kt │ │ ├── MetricVisitorTest.kt │ │ ├── StatementsVisitorTest.kt │ │ └── SyntaxHighlighterTest.kt │ └── resources │ └── highlighting │ └── fileWithClass.kt ├── sonar-kotlin-plugin ├── build.gradle.kts ├── proguard.txt ├── sonarpedia.json └── src │ ├── main │ ├── java │ │ ├── com │ │ │ └── sonarsource │ │ │ │ └── plugins │ │ │ │ └── kotlin │ │ │ │ └── api │ │ │ │ └── KotlinPluginExtensionsProvider.java │ │ └── org │ │ │ └── sonarsource │ │ │ └── kotlin │ │ │ └── plugin │ │ │ ├── KotlinCheckList.kt │ │ │ ├── KotlinPlugin.kt │ │ │ ├── KotlinPluginExtensions.kt │ │ │ ├── KotlinProfileDefinition.kt │ │ │ ├── KotlinProjectSensor.kt │ │ │ ├── KotlinRulesDefinition.kt │ │ │ ├── KotlinSensor.kt │ │ │ ├── caching │ │ │ └── ContentHashCache.kt │ │ │ └── cpd │ │ │ ├── Caching.kt │ │ │ └── CopyPasteDetector.kt │ └── resources │ │ └── org │ │ └── sonar │ │ └── l10n │ │ └── kotlin │ │ └── rules │ │ └── kotlin │ │ ├── ParsingError.html │ │ ├── ParsingError.json │ │ ├── S100.html │ │ ├── S100.json │ │ ├── S101.html │ │ ├── S101.json │ │ ├── S103.html │ │ ├── S103.json │ │ ├── S104.html │ │ ├── S104.json │ │ ├── S105.html │ │ ├── S105.json │ │ ├── S1066.html │ │ ├── S1066.json │ │ ├── S1067.html │ │ ├── S1067.json │ │ ├── S107.html │ │ ├── S107.json │ │ ├── S108.html │ │ ├── S108.json │ │ ├── S1110.html │ │ ├── S1110.json │ │ ├── S1125.html │ │ ├── S1125.json │ │ ├── S1128.html │ │ ├── S1128.json │ │ ├── S1133.html │ │ ├── S1133.json │ │ ├── S1134.html │ │ ├── S1134.json │ │ ├── S1135.html │ │ ├── S1135.json │ │ ├── S1143.html │ │ ├── S1143.json │ │ ├── S1144.html │ │ ├── S1144.json │ │ ├── S1145.html │ │ ├── S1145.json │ │ ├── S1151.html │ │ ├── S1151.json │ │ ├── S117.html │ │ ├── S117.json │ │ ├── S1172.html │ │ ├── S1172.json │ │ ├── S1186.html │ │ ├── S1186.json │ │ ├── S1192.html │ │ ├── S1192.json │ │ ├── S1206.html │ │ ├── S1206.json │ │ ├── S122.html │ │ ├── S122.json │ │ ├── S125.html │ │ ├── S125.json │ │ ├── S126.html │ │ ├── S126.json │ │ ├── S1313.html │ │ ├── S1313.json │ │ ├── S134.html │ │ ├── S134.json │ │ ├── S138.html │ │ ├── S138.json │ │ ├── S1451.html │ │ ├── S1451.json │ │ ├── S1479.html │ │ ├── S1479.json │ │ ├── S1481.html │ │ ├── S1481.json │ │ ├── S1656.html │ │ ├── S1656.json │ │ ├── S1763.html │ │ ├── S1763.json │ │ ├── S1764.html │ │ ├── S1764.json │ │ ├── S1821.html │ │ ├── S1821.json │ │ ├── S1862.html │ │ ├── S1862.json │ │ ├── S1871.html │ │ ├── S1871.json │ │ ├── S1874.html │ │ ├── S1874.json │ │ ├── S1940.html │ │ ├── S1940.json │ │ ├── S2053.html │ │ ├── S2053.json │ │ ├── S2068.html │ │ ├── S2068.json │ │ ├── S2097.html │ │ ├── S2097.json │ │ ├── S2114.html │ │ ├── S2114.json │ │ ├── S2116.html │ │ ├── S2116.json │ │ ├── S2122.html │ │ ├── S2122.json │ │ ├── S2123.html │ │ ├── S2123.json │ │ ├── S2151.html │ │ ├── S2151.json │ │ ├── S2175.html │ │ ├── S2175.json │ │ ├── S2245.html │ │ ├── S2245.json │ │ ├── S2695.html │ │ ├── S2695.json │ │ ├── S2757.html │ │ ├── S2757.json │ │ ├── S3329.html │ │ ├── S3329.json │ │ ├── S3353.html │ │ ├── S3353.json │ │ ├── S3776.html │ │ ├── S3776.json │ │ ├── S3923.html │ │ ├── S3923.json │ │ ├── S3958.html │ │ ├── S3958.json │ │ ├── S3981.html │ │ ├── S3981.json │ │ ├── S4144.html │ │ ├── S4144.json │ │ ├── S4347.html │ │ ├── S4347.json │ │ ├── S4423.html │ │ ├── S4423.json │ │ ├── S4426.html │ │ ├── S4426.json │ │ ├── S4507.html │ │ ├── S4507.json │ │ ├── S4663.html │ │ ├── S4663.json │ │ ├── S4738.html │ │ ├── S4738.json │ │ ├── S4790.html │ │ ├── S4790.json │ │ ├── S4830.html │ │ ├── S4830.json │ │ ├── S5320.html │ │ ├── S5320.json │ │ ├── S5322.html │ │ ├── S5322.json │ │ ├── S5324.html │ │ ├── S5324.json │ │ ├── S5332.html │ │ ├── S5332.json │ │ ├── S5344.html │ │ ├── S5344.json │ │ ├── S5527.html │ │ ├── S5527.json │ │ ├── S5542.html │ │ ├── S5542.json │ │ ├── S5547.html │ │ ├── S5547.json │ │ ├── S5612.html │ │ ├── S5612.json │ │ ├── S5842.html │ │ ├── S5842.json │ │ ├── S5843.html │ │ ├── S5843.json │ │ ├── S5846.html │ │ ├── S5846.json │ │ ├── S5850.html │ │ ├── S5850.json │ │ ├── S5856.html │ │ ├── S5856.json │ │ ├── S5857.html │ │ ├── S5857.json │ │ ├── S5867.html │ │ ├── S5867.json │ │ ├── S5868.html │ │ ├── S5868.json │ │ ├── S5869.html │ │ ├── S5869.json │ │ ├── S6202.html │ │ ├── S6202.json │ │ ├── S6207.html │ │ ├── S6207.json │ │ ├── S6218.html │ │ ├── S6218.json │ │ ├── S6288.html │ │ ├── S6288.json │ │ ├── S6291.html │ │ ├── S6291.json │ │ ├── S6293.html │ │ ├── S6293.json │ │ ├── S6300.html │ │ ├── S6300.json │ │ ├── S6301.html │ │ ├── S6301.json │ │ ├── S6305.html │ │ ├── S6305.json │ │ ├── S6306.html │ │ ├── S6306.json │ │ ├── S6307.html │ │ ├── S6307.json │ │ ├── S6309.html │ │ ├── S6309.json │ │ ├── S6310.html │ │ ├── S6310.json │ │ ├── S6311.html │ │ ├── S6311.json │ │ ├── S6312.html │ │ ├── S6312.json │ │ ├── S6313.html │ │ ├── S6313.json │ │ ├── S6314.html │ │ ├── S6314.json │ │ ├── S6315.html │ │ ├── S6315.json │ │ ├── S6316.html │ │ ├── S6316.json │ │ ├── S6318.html │ │ ├── S6318.json │ │ ├── S6362.html │ │ ├── S6362.json │ │ ├── S6363.html │ │ ├── S6363.json │ │ ├── S6418.html │ │ ├── S6418.json │ │ ├── S6432.html │ │ ├── S6432.json │ │ ├── S6474.html │ │ ├── S6474.json │ │ ├── S6508.html │ │ ├── S6508.json │ │ ├── S6510.html │ │ ├── S6510.json │ │ ├── S6511.html │ │ ├── S6511.json │ │ ├── S6512.html │ │ ├── S6512.json │ │ ├── S6514.html │ │ ├── S6514.json │ │ ├── S6515.html │ │ ├── S6515.json │ │ ├── S6516.html │ │ ├── S6516.json │ │ ├── S6517.html │ │ ├── S6517.json │ │ ├── S6518.html │ │ ├── S6518.json │ │ ├── S6519.html │ │ ├── S6519.json │ │ ├── S6524.html │ │ ├── S6524.json │ │ ├── S6526.html │ │ ├── S6526.json │ │ ├── S6527.html │ │ ├── S6527.json │ │ ├── S6528.html │ │ ├── S6528.json │ │ ├── S6529.html │ │ ├── S6529.json │ │ ├── S6530.html │ │ ├── S6530.json │ │ ├── S6531.html │ │ ├── S6531.json │ │ ├── S6532.html │ │ ├── S6532.json │ │ ├── S6558.html │ │ ├── S6558.json │ │ ├── S6611.html │ │ ├── S6611.json │ │ ├── S6615.html │ │ ├── S6615.json │ │ ├── S6619.html │ │ ├── S6619.json │ │ ├── S6623.html │ │ ├── S6623.json │ │ ├── S6624.html │ │ ├── S6624.json │ │ ├── S6625.html │ │ ├── S6625.json │ │ ├── S6626.html │ │ ├── S6626.json │ │ ├── S6629.html │ │ ├── S6629.json │ │ ├── S6631.html │ │ ├── S6631.json │ │ ├── S6634.html │ │ ├── S6634.json │ │ ├── S7204.html │ │ ├── S7204.json │ │ ├── S7409.html │ │ ├── S7409.json │ │ ├── S7410.html │ │ ├── S7410.json │ │ ├── S7416.html │ │ ├── S7416.json │ │ ├── S7435.html │ │ ├── S7435.json │ │ ├── S899.html │ │ ├── S899.json │ │ └── Sonar_way_profile.json │ └── test │ ├── java │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── plugin │ │ ├── AppScheduledExecutorServiceTest.kt │ │ ├── CheckConfigurationIntegrityTest.kt │ │ ├── CheckRegistrationTest.kt │ │ ├── ContentHashCacheTest.kt │ │ ├── DummyKotlinPluginExtensionsProvider.kt │ │ ├── DummyReadCache.kt │ │ ├── DummyWriteCache.kt │ │ ├── KotlinLanguageTest.kt │ │ ├── KotlinPluginTest.kt │ │ ├── KotlinProfileDefinitionTest.kt │ │ ├── KotlinProjectSensorTest.kt │ │ ├── KotlinRulesDefinitionTest.kt │ │ ├── KotlinSensorTest.kt │ │ ├── TextRangeAssert.kt │ │ └── cpd │ │ ├── CachingTest.kt │ │ └── CopyPasteDetectorTest.kt │ └── resources │ ├── caching │ ├── DummyFile.kt │ └── DummyFileChanged.kt │ ├── checks │ ├── TooManyParametersKotlinCheck.kt │ └── UnusedPrivateMethodKotlin.kt │ ├── cpd │ └── MyFile.kt │ ├── excluded │ ├── script.kts │ └── script.txt │ ├── highlighting │ └── fileWithClass.kt │ └── org │ └── sonar │ └── l10n │ └── kotlin │ └── rules │ └── kotlin │ ├── DummyRule.html │ └── DummyRule.json ├── sonar-kotlin-surefire ├── build.gradle.kts └── src │ ├── main │ └── java │ │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── surefire │ │ ├── KotlinResourcesLocator.java │ │ ├── KotlinSurefireParser.java │ │ ├── KotlinSurefireSensor.java │ │ ├── StaxParser.java │ │ ├── api │ │ ├── SurefireUtils.java │ │ └── package-info.java │ │ ├── data │ │ ├── SurefireStaxHandler.java │ │ ├── UnitTestClassReport.java │ │ ├── UnitTestIndex.java │ │ ├── UnitTestResult.java │ │ └── package-info.java │ │ └── package-info.java │ └── test │ ├── java │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── surefire │ │ ├── KotlinResourcesLocatorTest.java │ │ ├── KotlinSurefireParserTest.java │ │ ├── KotlinSurefireSensorTest.java │ │ ├── api │ │ └── SurefireUtilsTest.java │ │ └── data │ │ ├── SurefireStaxHandlerTest.java │ │ ├── UnitTestClassReportTest.java │ │ ├── UnitTestIndexTest.java │ │ └── UnitTestResultTest.java │ └── resources │ └── org │ └── sonarsource │ └── kotlin │ └── surefire │ ├── KotlinSurefireSensorTest │ ├── many-results │ │ ├── TEST-ch.hortis.sonar.mvn.SonarMojoTest.xml │ │ ├── TEST-ch.hortis.sonar.mvn.mc.CheckstyleCollectorTest.xml │ │ ├── TEST-ch.hortis.sonar.mvn.mc.CloverCollectorTest.xml │ │ ├── TEST-ch.hortis.sonar.mvn.mc.JDependsCollectorTest.xml │ │ ├── TEST-ch.hortis.sonar.mvn.mc.JavaNCSSCollectorTest.xml │ │ └── TEST-ch.hortis.sonar.mvn.mc.MetricsCollectorRegistryTest.xml │ ├── measuresShouldNotIncludeSkippedTests │ │ └── TEST-FooTest.xml │ ├── noSuccessRatioIfNoTests │ │ └── TEST-FooTest.xml │ ├── roundingTests │ │ └── TEST-Rounding.xml │ ├── shouldHandleMultipleSuitesInSameFile │ │ └── TESTS-MutlipleSuites.xml │ ├── shouldHandleTestSuiteDetails │ │ ├── ExtensionsFinderTest-expected-result.xml │ │ ├── ExtensionsFinderTest2-expected-result.xml │ │ ├── ExtensionsFinderTest3-expected-result.xml │ │ └── TEST-org.sonar.core.ExtensionsFinderTestSuite.xml │ ├── shouldManageClassesWithDefaultPackage │ │ └── TEST-NoPackagesTest.xml │ ├── shouldSaveErrorsAndFailuresInXML │ │ ├── TEST-org.sonar.core.ExtensionsFinderTest.xml │ │ └── expected-test-details.xml │ ├── should_support_long_attribute_values │ │ └── TEST-FooTest.xml │ ├── should_support_reportNameSuffix │ │ ├── TEST-FooTest-Run1.xml │ │ └── TEST-FooTest-Run2.xml │ └── successRatioIsZeroWhenAllTestsFail │ │ └── TEST-FooTest.xml │ ├── api │ ├── SurefireParserTest │ │ ├── groovyAndJavaTests │ │ │ ├── TEST-groovy.xml │ │ │ └── TEST-java.xml │ │ ├── innerClassExtraFile │ │ │ ├── CalculatorTests.java │ │ │ ├── TEST-com.example.project.CalculatorTests$DeeplyNestedClass1$DeeplyNestedClass2.xml │ │ │ ├── TEST-com.example.project.CalculatorTests$NestedClass.xml │ │ │ └── TEST-com.example.project.CalculatorTests.xml │ │ ├── innerClasses │ │ │ └── TEST-org.apache.commons.collections.TestAllPackages.xml │ │ ├── junitParameterizedTests │ │ │ ├── Junit4ParameterizedTest.java │ │ │ ├── Junit5ParameterizedTest.java │ │ │ ├── TEST-org.foo.Junit4ParameterizedTest.xml │ │ │ ├── TEST-org.foo.Junit5_0ParameterizedTest.xml │ │ │ └── TEST-org.foo.Junit5_1ParameterizedTest.xml │ │ ├── multipleDirectories │ │ │ ├── dir1 │ │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.CheckstyleCollectorTest.xml │ │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.CloverCollectorTest.xml │ │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.JDependsCollectorTest.xml │ │ │ │ └── TEST-ch.hortis.sonar.mvn.mc.JavaNCSSCollectorTest.xml │ │ │ └── dir2 │ │ │ │ ├── TEST-ch.hortis.sonar.mvn.SonarMojoTest.xml │ │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.MetricsCollectorRegistryTest.xml │ │ │ │ └── TESTS-AllTests.xml │ │ ├── multipleReports │ │ │ ├── TEST-ch.hortis.sonar.mvn.SonarMojoTest.xml │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.CheckstyleCollectorTest.xml │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.CloverCollectorTest.xml │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.JDependsCollectorTest.xml │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.JavaNCSSCollectorTest.xml │ │ │ ├── TEST-ch.hortis.sonar.mvn.mc.MetricsCollectorRegistryTest.xml │ │ │ └── TESTS-AllTests.xml │ │ ├── negativeTestTime │ │ │ └── TEST-java.xml │ │ ├── nestedInnerClasses │ │ │ ├── TEST-org.sonar.plugins.surefire.NestedTest$Inner1$Run.xml │ │ │ └── TEST-org.sonar.plugins.surefire.NestedTest$Inner2$Run.xml │ │ ├── noReports │ │ │ └── hack │ │ ├── noTests │ │ │ └── TEST-noTests.xml │ │ ├── onlyTestSuiteReport │ │ │ └── TESTS-AllTests.xml │ │ ├── resourceNotFound │ │ │ └── TEST-FooTest.xml │ │ └── unparsable │ │ │ └── TEST-FooTest.xml │ └── SurefireUtilsTest │ │ ├── shouldGetReportsPathFromDeprecatedProperty │ │ └── pom.xml │ │ └── shouldGetReportsPathFromProperty │ │ ├── pom.xml │ │ ├── submodule │ │ ├── pom.xml │ │ └── target │ │ │ └── surefire │ │ │ └── hack.txt │ │ └── target │ │ └── surefire │ │ └── hack.txt │ └── data │ └── SurefireStaxHandlerTest │ ├── TEST-#29.xml │ ├── errorsAndFailures.xml │ ├── innerClasses.xml │ ├── multipleSuites.xml │ ├── rootPackage.xml │ ├── skippedTests.xml │ ├── skippedWithoutTimeAttribute.xml │ └── zeroTests.xml ├── sonar-kotlin-test-api ├── build.gradle.kts └── src │ └── main │ └── java │ └── org │ └── sonarsource │ └── kotlin │ └── testapi │ ├── AbstractSensorTest.kt │ ├── DummyInputFile.kt │ ├── DummyInputFileContext.kt │ ├── KotlinVerifier.kt │ ├── KtTestChecksVisitor.kt │ ├── TestContext.kt │ └── TestUtils.kt └── utils-kotlin ├── README.md ├── build.gradle.kts └── src ├── main ├── kotlin │ └── org │ │ └── sonarsource │ │ └── kotlin │ │ └── externalreport │ │ ├── ExternalRule.kt │ │ ├── androidlint │ │ └── AndroidLintRuleDefinition.kt │ │ ├── common │ │ └── Translator.kt │ │ ├── detekt │ │ └── DetektRuleDefinitionGenerator.kt │ │ └── ktlint │ │ └── KtlintRuleDefinitionGenerator.kt └── resources │ └── android-lint-help.txt └── test ├── kotlin └── org │ └── sonarsource │ └── kotlin │ └── externalreport │ ├── ExternalReportTest.kt │ ├── androidlint │ └── AndroidLintDefinitionTest.kt │ ├── common │ └── TranslatorTest.kt │ ├── detekt │ └── DetektRuleDefinitionGeneratorTest.kt │ └── ktlint │ └── KtlintRuleDefinitionGeneratorTest.kt └── resources ├── android-lint-help-with-invalid-issue.txt └── invalid-android-lint-help.txt /.cirrus.star: -------------------------------------------------------------------------------- 1 | load("github.com/SonarSource/cirrus-modules@v3", "load_features") 2 | 3 | def main(ctx): 4 | return load_features(ctx) 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.kt text eol=lf 2 | *.kts text eol=lf 3 | *.java text eol=lf 4 | *.md text eol=lf 5 | *.properties text eol=lf 6 | 7 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | .github/CODEOWNERS @SonarSource/security-mobile-squad 2 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Part of 2 | 8 | -------------------------------------------------------------------------------- /.github/workflows/releasability.yaml: -------------------------------------------------------------------------------- 1 | name: Releasability status 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | update_releasability_status: 8 | runs-on: github-ubuntu-latest-s 9 | name: Releasability status 10 | permissions: 11 | id-token: write 12 | statuses: write 13 | contents: read 14 | steps: 15 | - uses: SonarSource/gh-action_releasability/releasability-status@23c9ad31b2d613bade88da898dfdca0b5c65ac69 # v1.2.1 16 | env: 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: release 3 | # This workflow is triggered when publishing a new github release 4 | # yamllint disable-line rule:truthy 5 | on: 6 | release: 7 | types: 8 | - published 9 | 10 | jobs: 11 | release: 12 | permissions: 13 | id-token: write 14 | contents: write 15 | uses: SonarSource/gh-action_release/.github/workflows/main.yaml@v6 16 | with: 17 | publishToBinaries: true 18 | mavenCentralSync: true 19 | slackChannel: squad-mobile 20 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "its/sources"] 2 | path = its/sources 3 | url = https://github.com/SonarSource/slang-test-sources 4 | -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | // Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build. 3 | `kotlin-dsl` 4 | } 5 | 6 | repositories { 7 | // Use the plugin portal to apply community plugins in convention plugins. 8 | gradlePluginPortal() 9 | } 10 | 11 | 12 | dependencies { 13 | implementation("com.github.kittinunf.fuel:fuel:2.3.1") 14 | implementation("com.github.kittinunf.fuel:fuel-gson:2.3.1") 15 | implementation("com.google.code.gson:gson:2.10") 16 | } 17 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/org/sonarsource/kotlin/buildsrc/tasks/RuleStubTemplates.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.buildsrc.tasks 2 | 3 | import java.nio.file.Path 4 | 5 | internal interface RuleStubTemplates { 6 | val checksDir: Path 7 | val testsDir: Path 8 | val samplesDir: Path 9 | val checkListFile: Path 10 | val checksPackage: String 11 | val sampleFileExt: String 12 | 13 | fun generateCheckFile(checkSampleName: String, ruleKey: String): String 14 | } 15 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/org/sonarsource/kotlin/buildsrc/tasks/license.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.buildsrc.tasks 2 | 3 | import java.nio.file.Path 4 | import java.util.Calendar 5 | import kotlin.io.path.ExperimentalPathApi 6 | import kotlin.io.path.readText 7 | 8 | @OptIn(ExperimentalPathApi::class) 9 | internal val LICENSE_HEADER by lazy { 10 | Path.of("LICENSE_HEADER").readText() 11 | .replace("${"$"}YEAR", Calendar.getInstance().get(Calendar.YEAR).toString()) 12 | } 13 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | group=org.sonarsource.kotlin 2 | version=3.4.0-SNAPSHOT 3 | description=Code Analyzer for Kotlin 4 | projectTitle=Kotlin 5 | kotlinVersion=2.2.0 6 | org.gradle.jvmargs=-Xmx4096M 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SonarSource/sonar-kotlin/3dff5f67bf31d94d310640adb333d64716464ca6/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip 4 | distributionSha256Sum=1541fa36599e12857140465f3c91a97409b4512501c26f9631fb113e392c5bd1 5 | networkTimeout=10000 6 | validateDistributionUrl=true 7 | zipStoreBase=GRADLE_USER_HOME 8 | zipStorePath=wrapper/dists 9 | -------------------------------------------------------------------------------- /its/plugin/projects/externalreport/androidlint/build.gradle: -------------------------------------------------------------------------------- 1 | task hello { 2 | doLast { 3 | println 'Hello world!' 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /its/plugin/projects/externalreport/androidlint/main.kt: -------------------------------------------------------------------------------- 1 | fun main(args: Array) { 2 | println("hello world") 3 | } 4 | -------------------------------------------------------------------------------- /its/plugin/projects/externalreport/detekt/detekt-checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /its/plugin/projects/externalreport/detekt/main.kt: -------------------------------------------------------------------------------- 1 | fun main(args: Array) { 2 | (1..42).forEach { 3 | println("hello world") 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /its/plugin/projects/externalreport/ktlint/ktlint-checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /its/plugin/projects/externalreport/ktlint/main.kt: -------------------------------------------------------------------------------- 1 | fun main(args: Array) { 2 | (1..42).forEach { 3 | println("hello world") 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /its/plugin/projects/measures/kotlin/empty_file.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SonarSource/sonar-kotlin/3dff5f67bf31d94d310640adb333d64716464ca6/its/plugin/projects/measures/kotlin/empty_file.kt -------------------------------------------------------------------------------- /its/plugin/projects/measures/kotlin/file1.kt: -------------------------------------------------------------------------------- 1 | import java.util.List 2 | // COMMENT 3 | fun main(args: Array) { 4 | println("hello " + 5 | /*comment 6 | */ 7 | "world") 8 | var a = 0 9 | /*comment*/ /* 10 | multiline 11 | comment 12 | 13 | */ a = a + 1 //comment 14 | } 15 | -------------------------------------------------------------------------------- /its/plugin/projects/measures/kotlin/file2.kt: -------------------------------------------------------------------------------- 1 | data class C(val a: Int?) { 2 | fun function_1(): Int { // This is a comment 3 | val b = 0 4 | return if (((a ?: b) + 1) > 3) 0 else if (true) 1 else -1 5 | } 6 | 7 | fun function_2() { 8 | /* multiline comment 9 | */ 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /its/plugin/projects/measures/kotlin/file3.ktt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SonarSource/sonar-kotlin/3dff5f67bf31d94d310640adb333d64716464ca6/its/plugin/projects/measures/kotlin/file3.ktt -------------------------------------------------------------------------------- /its/plugin/projects/suppress-warnings/kotlin/file.kt: -------------------------------------------------------------------------------- 1 | fun main(args: Array) { 2 | if (true) { // NOSONAR 3 | } 4 | 5 | if (true) { // raise an issue S1145 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /its/plugin/projects/tests-surefire-suffix/src/test/kotlin/MyTest.kt: -------------------------------------------------------------------------------- 1 | import java.lang.RuntimeException 2 | import org.junit.Test 3 | import org.junit.Ignore 4 | 5 | public class MyTest { 6 | @Test 7 | public fun success() { 8 | Thread.sleep(1000) 9 | } 10 | 11 | @Ignore 12 | @Test 13 | public fun ignored() { 14 | } 15 | } -------------------------------------------------------------------------------- /its/plugin/projects/tests-with-submodule/src/test/kotlin/MyTest.kt: -------------------------------------------------------------------------------- 1 | import java.lang.RuntimeException 2 | import org.junit.Test 3 | import org.junit.Ignore 4 | 5 | public class MyTest { 6 | @Test 7 | public fun success() { 8 | Thread.sleep(1000) 9 | } 10 | 11 | @Ignore 12 | @Test 13 | public fun ignored() { 14 | } 15 | } -------------------------------------------------------------------------------- /its/plugin/projects/tests-with-submodule/submodule/src/test/kotlin/SubmoduleTest.kt: -------------------------------------------------------------------------------- 1 | import java.lang.RuntimeException 2 | import org.junit.Test 3 | import org.junit.Ignore 4 | 5 | public class SubmoduleTest { 6 | @Test 7 | public fun success() { 8 | Thread.sleep(1000) 9 | } 10 | 11 | @Ignore 12 | @Test 13 | public fun ignored() { 14 | } 15 | } -------------------------------------------------------------------------------- /its/plugin/projects/tests-without-main-code/src/test/kotlin/MyTest.kt: -------------------------------------------------------------------------------- 1 | import java.lang.RuntimeException 2 | import org.junit.Test 3 | import org.junit.Ignore 4 | 5 | public class MyTest { 6 | @Test 7 | public fun success() { 8 | Thread.sleep(1000) 9 | } 10 | 11 | @Ignore 12 | @Test 13 | public fun ignored() { 14 | } 15 | } -------------------------------------------------------------------------------- /its/plugin/src/test/resources/norule.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | norule-profile 4 | kotlin 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S1066.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/ui/RedditActivity.kt": [ 3 | 130 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S108.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/androidTest/java/com/android/example/github/db/RepoDaoTest.kt": [ 3 | 50 4 | ], 5 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/androidTest/java/com/android/example/github/util/AutoClearedValueTest.kt": [ 6 | 56 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S1151.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/repository/FetchNextSearchPageTask.kt": [ 3 | 57 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S117.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/vo/RedditPost.kt": [ 3 | 41 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S1186.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/di/AppInjector.kt": [ 3 | 43, 4 | 47, 5 | 51, 6 | 55, 7 | 59, 8 | 63 9 | ], 10 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/repository/NetworkBoundResource.kt": [ 11 | 108 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S126.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/androidTest/java/com/android/example/github/util/EspressoTestUtil.kt": [ 3 | 58 4 | ], 5 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/ui/PostsAdapter.kt": [ 6 | 89 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S3353.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/util/LiveDataCallAdapter.kt": [ 3 | 40 4 | ], 5 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/test/java/com/android/example/github/ui/repo/RepoViewModelTest.kt": [ 6 | 47 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S5612.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/repository/NetworkBoundResource.kt": [ 3 | 73 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S5867.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/api/ApiResponse.kt": [ 3 | 89, 4 | 89 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S6529.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/repository/RepoRepository.kt": [ 3 | 63, 4 | 119 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S6530.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/BasicRxJavaSampleKotlin/app/src/main/java/com/example/android/observability/ui/ViewModelFactory.kt": [ 3 | 30 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S6532.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/util/LiveDataCallAdapterFactory.kt": [ 3 | 38, 4 | 41 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/android-architecture-components/kotlin-S899.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-android-architecture-components-project:sources/kotlin/android-architecture-components/GithubBrowserSample/app/src/test-common/java/com/android/example/github/util/LiveDataTestUtil.kt": [ 3 | 37 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S104.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt": [ 3 | 0 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/serialization/src/test/kotlin/net/corda/serialization/internal/amqp/SerializationOutputTests.kt": [ 6 | 0 7 | ], 8 | "kotlin-corda-project:sources/kotlin/corda/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt": [ 9 | 0 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S105.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node/src/main/kotlin/net/corda/node/internal/security/RPCSecurityManagerImpl.kt": [ 3 | 0 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/serialization/src/test/kotlin/net/corda/serialization/internal/amqp/DeserializeSimpleTypesTests.kt": [ 6 | 0 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S1110.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node/src/main/kotlin/net/corda/node/services/statemachine/StaffedFlowHospital.kt": [ 3 | 106 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S1125.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt": [ 3 | 42, 4 | 43, 5 | 56, 6 | 57 7 | ], 8 | "kotlin-corda-project:sources/kotlin/corda/core/src/main/kotlin/net/corda/core/contracts/UniqueIdentifier.kt": [ 9 | 35 10 | ], 11 | "kotlin-corda-project:sources/kotlin/corda/node/src/main/kotlin/net/corda/node/services/vault/HibernateQueryCriteriaParser.kt": [ 12 | 304 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S1134.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node/src/test/kotlin/net/corda/node/messaging/TwoPartyTradeFlowTests.kt": [ 3 | 280 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/samples/network-visualiser/src/test/kotlin/net/corda/netmap/simulation/IRSSimulationTest.kt": [ 6 | 11 7 | ], 8 | "kotlin-corda-project:sources/kotlin/corda/testing/test-utils/src/main/kotlin/net/corda/testing/internal/RigorousMock.kt": [ 9 | 69 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S1143.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/tools/shell/src/main/kotlin/net/corda/tools/shell/InteractiveShell.kt": [ 3 | 290 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S1144.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/experimental/behave/src/main/kotlin/net/corda/behave/database/DatabaseConnection.kt": [ 3 | 44 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt": [ 6 | 765, 7 | 769 8 | ], 9 | "kotlin-corda-project:sources/kotlin/corda/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/DeserializedParameterizedType.kt": [ 10 | 24 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S1206.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/core/src/main/kotlin/net/corda/core/utilities/ProgressTracker.kt": [ 3 | 64, 4 | 68 5 | ], 6 | "kotlin-corda-project:sources/kotlin/corda/experimental/corda-utils/src/main/kotlin/io/cryptoblk/core/Utils.kt": [ 7 | 71 8 | ], 9 | "kotlin-corda-project:sources/kotlin/corda/samples/irs-demo/cordapp/src/main/kotlin/net/corda/irs/contract/IRSUtils.kt": [ 10 | 72 11 | ], 12 | "kotlin-corda-project:sources/kotlin/corda/serialization/src/test/kotlin/net/corda/serialization/internal/amqp/SerializationOutputTests.kt": [ 13 | 929 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S138.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/core/src/test/kotlin/net/corda/core/crypto/EdDSATests.kt": [ 3 | 20 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/docs/source/example-code/src/main/kotlin/net/corda/docs/FlowCookbook.kt": [ 6 | 89 7 | ], 8 | "kotlin-corda-project:sources/kotlin/corda/samples/irs-demo/cordapp/src/test/kotlin/net/corda/irs/contract/IRSTests.kt": [ 9 | 56 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S1871.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt": [ 3 | 366 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S2097.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/core/src/main/kotlin/net/corda/core/utilities/NonEmptySet.kt": [ 3 | 61 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/core/src/main/kotlin/net/corda/core/utilities/ProgressTracker.kt": [ 6 | 64, 7 | 68 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S3923.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApiUtils.kt": [ 3 | 128 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S4423.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/SSLHelper.kt": [ 3 | 107, 4 | 121 5 | ], 6 | "kotlin-corda-project:sources/kotlin/corda/node-api/src/test/kotlin/net/corda/nodeapi/internal/crypto/X509UtilitiesTest.kt": [ 7 | 234 8 | ], 9 | "kotlin-corda-project:sources/kotlin/corda/node/src/integration-test/kotlin/net/corda/node/amqp/ProtonWrapperTests.kt": [ 10 | 125 11 | ], 12 | "kotlin-corda-project:sources/kotlin/corda/node/src/test/kotlin/net/corda/node/utilities/TLSAuthenticationTests.kt": [ 13 | 414 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S6218.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/serialization/src/test/kotlin/net/corda/serialization/internal/amqp/DeserializeNeedingCarpentryTests.kt": [ 3 | 129 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S6514.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/CustomSerializer.kt": [ 3 | 90 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt": [ 6 | 269, 7 | 270 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S6515.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt": [ 3 | 131 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S6516.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt": [ 3 | 418 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/node/src/main/kotlin/net/corda/node/services/network/NetworkMapUpdater.kt": [ 6 | 84 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S6529.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node/src/main/kotlin/net/corda/node/utilities/AppendOnlyPersistentMap.kt": [ 3 | 171 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/samples/irs-demo/cordapp/src/main/kotlin/net/corda/irs/contract/IRS.kt": [ 6 | 546 7 | ], 8 | "kotlin-corda-project:sources/kotlin/corda/testing/test-utils/src/main/kotlin/net/corda/testing/services/MockAttachmentStorage.kt": [ 9 | 71 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S6615.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/testing/test-utils/src/main/kotlin/net/corda/testing/internal/FlowStackSnapshot.kt": [ 3 | 37 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/corda/kotlin-S899.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-corda-project:sources/kotlin/corda/node/src/integration-test/kotlin/net/corda/services/messaging/P2PMessagingTest.kt": [ 3 | 62 4 | ], 5 | "kotlin-corda-project:sources/kotlin/corda/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt": [ 6 | 51, 7 | 74 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S104.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/TypeInference.kt": [ 3 | 0 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/ide/annotator/RsErrorAnnotatorTest.kt": [ 6 | 0 7 | ], 8 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/ide/inspections/import/AutoImportFixTest.kt": [ 9 | 0 10 | ], 11 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/lang/core/type/RsGenericExpressionTypeInferenceTest.kt": [ 12 | 0 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S107.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/ide/inspections/RsInspectionsTestBase.kt": [ 3 | 132 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S108.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/annotator/RsLiteralAnnotator.kt": [ 3 | 37 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/Fulfillment.kt": [ 6 | 119 7 | ], 8 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/TypeInference.kt": [ 9 | 1478 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S1125.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/typing/RsQuoteHandler.kt": [ 3 | 45 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/completion/RsMacroDefinitionCompletionProvider.kt": [ 6 | 38 7 | ], 8 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/lexer/RustEscapesLexer.kt": [ 9 | 119 10 | ], 11 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/Fold.kt": [ 12 | 99 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S1133.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/lang/core/completion/RsCompletionTestBase.kt": [ 3 | 22 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S1144.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rustSlowTests/RsCompilerSourcesPerformance.kt": [ 3 | 94 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S122.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/folding/RsFoldingBuilder.kt": [ 3 | 61 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/utils/RsDiagnostic.kt": [ 6 | 197 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S125.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/intentions/IfLetToMatchIntention.kt": [ 3 | 51 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/template/RsContextType.kt": [ 6 | 63 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S138.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/lang/core/macros/RsErrorChainMacroExpansionTest.kt": [ 3 | 216 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S1479.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/highlight/RsHighlighter.kt": [ 3 | 29 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/stubs/StubImplementations.kt": [ 6 | 72 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S1481.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/lang/core/completion/RsCompletionPriorityTest.kt": [ 3 | 40 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S1871.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/psi/ext/RsItemsOwner.kt": [ 3 | 25, 4 | 29 5 | ], 6 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/resolve/ImplLookup.kt": [ 7 | 399 8 | ], 9 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/TypeInference.kt": [ 10 | 992 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S2068.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/cargo/toolchain/CargoTest.kt": [ 3 | 41 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S2245.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/lang/core/lexer/RsEscapesLexingTestCase.kt": [ 3 | 41 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/lang/core/psi/RsNumericLiteralValueTest.kt": [ 6 | 58 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S3353.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/intentions/IfLetToMatchIntention.kt": [ 3 | 52 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/cargo/runconfig/producers/RunConfigurationProducerTest.kt": [ 6 | 306, 7 | 307 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S3923.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/TypeInference.kt": [ 3 | 1400 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S5867.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/cargo/runconfig/filters/RsBacktraceFilter.kt": [ 3 | 50 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6508.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/lang/core/stubs/RsStubAccessTest.kt": [ 3 | 100 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rustSlowTests/RsCompilerSourcesPerformance.kt": [ 6 | 55, 7 | 95 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6510.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/intentions/DemorgansLawIntention.kt": [ 3 | 107 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/template/macros/RsCollectionElementNameMacro.kt": [ 6 | 40, 7 | 50 8 | ], 9 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/lexer/RustEscapesLexer.kt": [ 10 | 63, 11 | 73 12 | ], 13 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/Fulfillment.kt": [ 14 | 185 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6511.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/utils/RsDiagnostic.kt": [ 3 | 82 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6516.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/Fold.kt": [ 3 | 60, 4 | 69, 5 | 79, 6 | 91, 7 | 97, 8 | 104 9 | ], 10 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/TypeInference.kt": [ 11 | 269, 12 | 509 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6529.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/completion/LookupElements.kt": [ 3 | 114 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/Fulfillment.kt": [ 6 | 173 7 | ], 8 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/Snapshot.kt": [ 9 | 21 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6531.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/structure/RsStructureViewModel.kt": [ 3 | 30 4 | ], 5 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/resolve/ref/RsReferenceBase.kt": [ 6 | 26 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6611.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/cargo/project/configurable/RustProjectConfigurable.kt": [ 3 | 54 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6615.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/inspections/import/AutoImportFix.kt": [ 3 | 295 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/intellij-rust/kotlin-S6619.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/formatter/impl/utils.kt": [ 3 | 95, 4 | 103 5 | ], 6 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/ide/inspections/import/AutoImportFix.kt": [ 7 | 344 8 | ], 9 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/main/kotlin/org/rust/lang/core/types/infer/TypeInference.kt": [ 10 | 1382, 11 | 1383, 12 | 1514 13 | ], 14 | "kotlin-intellij-rust-project:sources/kotlin/intellij-rust/src/test/kotlin/org/rust/lang/RsTestBase.kt": [ 15 | 210 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S103.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/KotlinLanguageServer.kt": [ 3 | 27 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/codeaction/quickfix/ImplementAbstractFunctionsQuickFix.kt": [ 6 | 182 7 | ], 8 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/compiler/Compiler.kt": [ 9 | 526 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S1066.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/semantictokens/SemanticTokens.kt": [ 3 | 179 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/signaturehelp/SignatureHelp.kt": [ 6 | 111 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S1144.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/j2k/JavaElementConverter.kt": [ 3 | 58 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S1151.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/completion/Completions.kt": [ 3 | 280 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/semantictokens/SemanticTokens.kt": [ 6 | 133, 7 | 162 8 | ], 9 | "kotlin-kotlin-language-server-project:shared/src/main/kotlin/org/javacs/kt/util/StringUtils.kt": [ 10 | 20 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S1186.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/KotlinLanguageServer.kt": [ 3 | 164 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/progress/Progress.kt": [ 6 | 15, 7 | 17 8 | ], 9 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/util/LoggingMessageCollector.kt": [ 10 | 9 11 | ], 12 | "kotlin-kotlin-language-server-project:shared/src/main/kotlin/org/javacs/kt/Logger.kt": [ 13 | 28, 14 | 30 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S1192.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/KotlinTextDocumentService.kt": [ 3 | 107 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/compiler/Compiler.kt": [ 6 | 465 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S125.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/CompiledFile.kt": [ 3 | 93 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S134.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/codeaction/quickfix/ImplementAbstractFunctionsQuickFix.kt": [ 3 | 150 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/definition/GoToDefinition.kt": [ 6 | 76 7 | ], 8 | "kotlin-kotlin-language-server-project:shared/src/main/kotlin/org/javacs/kt/util/StringUtils.kt": [ 9 | 35, 10 | 46 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S138.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/compiler/Compiler.kt": [ 3 | 144 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S1821.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/completion/Completions.kt": [ 3 | 108 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/semantictokens/SemanticTokens.kt": [ 6 | 135, 7 | 138, 8 | 144, 9 | 163, 10 | 194 11 | ], 12 | "kotlin-kotlin-language-server-project:shared/src/main/kotlin/org/javacs/kt/util/StringUtils.kt": [ 13 | 47 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S3353.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:shared/src/main/kotlin/org/javacs/kt/Logger.kt": [ 3 | 147, 4 | 179 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S5612.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/KotlinLanguageServer.kt": [ 3 | 69 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/KotlinWorkspaceService.kt": [ 6 | 89 7 | ], 8 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/compiler/Compiler.kt": [ 9 | 94, 10 | 139 11 | ], 12 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/definition/GoToDefinition.kt": [ 13 | 50 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S6517.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/codeaction/quickfix/QuickFix.kt": [ 3 | 13 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/externalsources/SourceArchiveProvider.kt": [ 6 | 5 7 | ], 8 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/progress/Progress.kt": [ 9 | 20 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S6518.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/completion/Completions.kt": [ 3 | 553 4 | ], 5 | "kotlin-kotlin-language-server-project:shared/src/main/kotlin/org/javacs/kt/Logger.kt": [ 6 | 150, 7 | 151 8 | ], 9 | "kotlin-kotlin-language-server-project:shared/src/main/kotlin/org/javacs/kt/util/Utils.kt": [ 10 | 38, 11 | 38 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S6519.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/codeaction/quickfix/QuickFix.kt": [ 3 | 19 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S6524.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/completion/RenderCompletionItem.kt": [ 3 | 96 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S6529.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/j2k/JavaElementConverter.kt": [ 3 | 133 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/signaturehelp/SignatureHelp.kt": [ 6 | 38 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S6531.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/semantictokens/SemanticTokens.kt": [ 3 | 179 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S6611.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/SourcePath.kt": [ 3 | 137, 4 | 196 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S6619.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:shared/src/main/kotlin/org/javacs/kt/Logger.kt": [ 3 | 153 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin-language-server/kotlin-S899.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/CompilerClassPath.kt": [ 3 | 145 4 | ], 5 | "kotlin-kotlin-language-server-project:server/src/main/kotlin/org/javacs/kt/compiler/Compiler.kt": [ 6 | 553 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S105.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/idea/tests/org/jetbrains/kotlin/idea/editor/TypedHandlerTest.kt": [ 3 | 0 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/tools/binary-compatibility-validator/src/test/kotlin/cases/default/jvmOverloads.kt": [ 6 | 0 7 | ], 8 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kotlin2JsProjectWithTests/src/test/kotlin/MainTest.kt": [ 9 | 0 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S1110.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/eval4j/src/org/jetbrains/eval4j/interpreter.kt": [ 3 | 85 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/idea/src/org/jetbrains/kotlin/idea/facet/facetUtils.kt": [ 6 | 56 7 | ], 8 | "kotlin-kotlin-project:sources/kotlin/kotlin/idea/src/org/jetbrains/kotlin/idea/versions/KotlinUpdatePluginComponent.kt": [ 9 | 67 10 | ], 11 | "kotlin-kotlin-project:sources/kotlin/kotlin/ultimate/src/org/jetbrains/kotlin/idea/spring/generate/generateDependenciesUtils.kt": [ 12 | 132 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S1134.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/ConstantExpressionEvaluator.kt": [ 3 | 699 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/KotlinAlternativeSourceNotificationProvider.kt": [ 6 | 166 7 | ], 8 | "kotlin-kotlin-project:sources/kotlin/kotlin/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/NoStrataPositionManagerHelper.kt": [ 9 | 165 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S1143.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplFromTerminal.kt": [ 3 | 85 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/AbstractParcelBoxTest.kt": [ 6 | 169 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S1656.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/KotlinCompletionContributor.kt": [ 3 | 71 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt": [ 6 | 171 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S1763.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt": [ 3 | 172 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AbstractAndroidFindUsagesTest.kt": [ 6 | 23 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S1764.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/stdlib/js/src/kotlin/numbers.kt": [ 3 | 12, 4 | 18 5 | ], 6 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/stdlib/test/ranges/RangeTest.kt": [ 7 | 291 8 | ], 9 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/utils/GradleVersionTest.kt": [ 10 | 37 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S1940.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/j2k/src/org/jetbrains/kotlin/j2k/ReferenceSearcher.kt": [ 3 | 62 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/stdlib/jvm/src/kotlin/ranges/RangesJVM.kt": [ 6 | 30 7 | ], 8 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/stdlib/src/kotlin/ranges/Ranges.kt": [ 9 | 68 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S2116.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/stdlib/test/collections/ArraysTest.kt": [ 3 | 239 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S3923.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/core/reflection.jvm/src/kotlin/reflect/full/KClassifiers.kt": [ 3 | 56 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S5842.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/idea/idea-android/src/org/jetbrains/kotlin/android/folding/ResourceFoldingBuilder.kt": [ 3 | 48 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S5869.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt": [ 3 | 467 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/BaseDiagnosticsTest.kt": [ 6 | 192 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S6218.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/build-common/src/org/jetbrains/kotlin/incremental/storage/values.kt": [ 3 | 31 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/util/src/org/jetbrains/kotlin/load/kotlin/incremental/components/IncrementalCache.kt": [ 6 | 21 7 | ], 8 | "kotlin-kotlin-project:sources/kotlin/kotlin/core/util.runtime/src/org/jetbrains/kotlin/utils/Jsr305State.kt": [ 9 | 33 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S6512.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/resolution/src/org/jetbrains/kotlin/contracts/description/LazyContractProvider.kt": [ 3 | 33 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/kotlin/kotlin-S6516.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt": [ 3 | 367 4 | ], 5 | "kotlin-kotlin-project:sources/kotlin/kotlin/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/LoggingStorageManager.kt": [ 6 | 38, 7 | 48 8 | ], 9 | "kotlin-kotlin-project:sources/kotlin/kotlin/j2k/src/org/jetbrains/kotlin/j2k/JavaToKotlinConverter.kt": [ 10 | 223 11 | ], 12 | "kotlin-kotlin-project:sources/kotlin/kotlin/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/typeAlias/src/main/kotlin/UseCurry.kt": [ 13 | 10 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S104.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 3 | 0 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S1067.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 3 | 1517 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/RealBufferedSource.kt": [ 6 | 220, 7 | 300 8 | ], 9 | "kotlin-okio-project:sources/kotlin/okio/okio/src/main/kotlin/okio/Base64.kt": [ 10 | 33 11 | ], 12 | "kotlin-okio-project:sources/kotlin/okio/okio/src/main/kotlin/okio/common/ByteString.kt": [ 13 | 150 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S108.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/AsyncTimeout.kt": [ 3 | 240 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/BufferKotlinTest.kt": [ 6 | 31, 7 | 36 8 | ], 9 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/ByteStringKotlinTest.kt": [ 10 | 39, 11 | 44 12 | ], 13 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/OptionsTest.kt": [ 14 | 182, 15 | 190, 16 | 195 17 | ], 18 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/SegmentSharingTest.kt": [ 19 | 51, 20 | 57 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S1186.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/AsyncTimeout.kt": [ 3 | 76 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 6 | 63, 7 | 65, 8 | 100, 9 | 1564, 10 | 1568 11 | ], 12 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Okio.kt": [ 13 | 126, 14 | 128 15 | ], 16 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Timeout.kt": [ 17 | 207 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S1192.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 3 | 256, 4 | 1945 5 | ], 6 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Pipe.kt": [ 7 | 55 8 | ], 9 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/ByteStringKotlinTest.kt": [ 10 | 50 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S126.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 3 | 2061 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/DeflaterSink.kt": [ 6 | 98 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S134.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 3 | 409, 4 | 420, 5 | 470, 6 | 563, 7 | 567, 8 | 578, 9 | 589, 10 | 591, 11 | 605, 12 | 911, 13 | 1474, 14 | 1494 15 | ], 16 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/InflaterSource.kt": [ 17 | 68 18 | ], 19 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Options.kt": [ 20 | 170 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S138.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/OptionsTest.kt": [ 3 | 41 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S1764.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/TestUtil.kt": [ 3 | 116, 4 | 153 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S2097.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/js/src/main/kotlin/okio/ByteString.kt": [ 3 | 185 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/ByteString.kt": [ 6 | 256 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S2245.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/TestUtil.kt": [ 3 | 59, 4 | 68 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S5612.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/AsyncTimeout.kt": [ 3 | 269 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 6 | 1457 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S6510.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 3 | 1352 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/TestUtil.kt": [ 6 | 80 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S6511.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/AsyncTimeout.kt": [ 3 | 277 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 6 | 463, 7 | 1149, 8 | 1150 9 | ], 10 | "kotlin-okio-project:sources/kotlin/okio/okio/src/main/kotlin/okio/Base64.kt": [ 11 | 49 12 | ], 13 | "kotlin-okio-project:sources/kotlin/okio/okio/src/main/kotlin/okio/Utf8.kt": [ 14 | 84 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S6518.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/Buffer.kt": [ 3 | 1045 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S6530.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/main/java/okio/SegmentedByteString.kt": [ 3 | 87 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S6532.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/TestUtil.kt": [ 3 | 75 4 | ], 5 | "kotlin-okio-project:sources/kotlin/okio/okio/src/main/kotlin/okio/Segment.kt": [ 6 | 155, 7 | 156 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/okio/kotlin-S6619.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-okio-project:sources/kotlin/okio/okio/jvm/src/test/java/okio/TestUtil.kt": [ 3 | 134 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S1144.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S1144.kt": [ 3 | 5, 4 | 32 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S1481.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S2068.kt": [ 3 | 6, 4 | 7, 5 | 11, 6 | 14, 7 | 17, 8 | 20, 9 | 23, 10 | 26, 11 | 30, 12 | 31, 13 | 32, 14 | 33, 15 | 34, 16 | 35, 17 | 39, 18 | 40, 19 | 41, 20 | 42, 21 | 43 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S1763.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S1763.kt": [ 3 | 2 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S2068.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S2068.kt": [ 3 | 6, 4 | 7, 5 | 39 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S2116.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S2116.kt": [ 3 | 4 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S2122.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S2122.kt": [ 3 | 5 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S2123.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S2123.kt": [ 3 | 6 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S2757.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S2757.kt": [ 3 | 5, 4 | 13 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S3353.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S6512.kt": [ 3 | 4 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S3958.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S3958.kt": [ 3 | 5 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S6202.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S6202.kt": [ 3 | 2 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S6512.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S6512.kt": [ 3 | 5 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/expected/kotlin/test-resources-sources/kotlin-S6615.json: -------------------------------------------------------------------------------- 1 | { 2 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S2123.kt": [ 3 | 6 4 | ], 5 | "kotlin-test-resources-sources-project:ruling/src/test/resources/sources/kotlin/S2757.kt": [ 6 | 2, 7 | 5, 8 | 6, 9 | 7, 10 | 8, 11 | 12, 12 | 13, 13 | 14 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/sources/kotlin/S1763.kt: -------------------------------------------------------------------------------- 1 | fun foo() { 2 | throw Exception() 3 | print("Unreachable!") 4 | } 5 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/sources/kotlin/S2116.kt: -------------------------------------------------------------------------------- 1 | package sources.kotlin 2 | 3 | fun test(arr: IntArray): String { 4 | return arr.toString() // Noncompliant 5 | } 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/sources/kotlin/S2122.kt: -------------------------------------------------------------------------------- 1 | package sources.kotlin 2 | 3 | import java.util.concurrent.ScheduledThreadPoolExecutor 4 | 5 | fun S2122() = ScheduledThreadPoolExecutor(0) // Noncompliant 6 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/sources/kotlin/S2123.kt: -------------------------------------------------------------------------------- 1 | package sources.kotlin 2 | 3 | class S2123 { 4 | fun foo(): Int { 5 | var i = 1 6 | return i++ // Noncompliant 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/sources/kotlin/S2757.kt: -------------------------------------------------------------------------------- 1 | fun test() { 2 | var target = -5 3 | var num = 3 4 | 5 | target =-num 6 | target = -num 7 | target =--num 8 | target=+num 9 | 10 | val b = false 11 | val c = true 12 | var a = b != c 13 | a =! c 14 | a = !c 15 | } -------------------------------------------------------------------------------- /its/ruling/src/test/resources/sources/kotlin/S3958.kt: -------------------------------------------------------------------------------- 1 | package sources.kotlin 2 | 3 | fun s3958() { 4 | sequenceOf("a", "b") 5 | .map { it.uppercase() } // Noncompliant 6 | } 7 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/sources/kotlin/S6202.kt: -------------------------------------------------------------------------------- 1 | package sources.kotlin 2 | fun check(any: Any) = java.lang.String::class.isInstance(any) // Noncompliant 3 | -------------------------------------------------------------------------------- /its/ruling/src/test/resources/sources/kotlin/S6512.kt: -------------------------------------------------------------------------------- 1 | package sources.kotlin 2 | 3 | private class S6512 { 4 | private var size: Int = 42 5 | fun getSize(): Int = size // Noncompliant 6 | } 7 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/files/non-compiling/checks/AbstractClassShouldBeInterfaceCheckSampleNonCompiling.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class AbstractClassShouldBeInterfaceCheckSampleNonCompiling { 4 | 5 | external abstract class Foo {} // compliant 6 | } -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/files/non-compiling/checks/CollectionShouldBeImmutableCheckSampleNonCompiling.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class CollectionShouldBeImmutableCheckSampleNonCompiling { 4 | 5 | actual fun actualFun(list: MutableList): Unit // compliant 6 | expect fun expectFun(list: MutableList): Unit // compliant 7 | 8 | fun qualifiedStrange() { 9 | val list = mutableListOf() 10 | list.(add(1)) 11 | } 12 | } -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/files/non-compiling/checks/UselessNullCheckCheckSampleNonCompiling.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class UselessNullCheckCheckSampleNonCompiling : UnresolvedBaseClass { 4 | fun example() { 5 | if (unresolvedBaseClassProperty == null) { 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/annotation/JavascriptInterface.java: -------------------------------------------------------------------------------- 1 | package android.annotation; 2 | 3 | public @interface JavascriptInterface { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/annotation/NonNull.java: -------------------------------------------------------------------------------- 1 | package android.annotation; 2 | 3 | import static java.lang.annotation.ElementType.FIELD; 4 | import static java.lang.annotation.ElementType.METHOD; 5 | import static java.lang.annotation.ElementType.PARAMETER; 6 | import static java.lang.annotation.RetentionPolicy.SOURCE; 7 | 8 | import java.lang.annotation.Retention; 9 | import java.lang.annotation.Target; 10 | 11 | @Retention(SOURCE) 12 | @Target({METHOD, PARAMETER, FIELD}) 13 | public @interface NonNull { 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/annotation/Nullable.java: -------------------------------------------------------------------------------- 1 | package android.annotation; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.Target; 5 | 6 | import static java.lang.annotation.ElementType.FIELD; 7 | import static java.lang.annotation.ElementType.METHOD; 8 | import static java.lang.annotation.ElementType.PARAMETER; 9 | import static java.lang.annotation.RetentionPolicy.SOURCE; 10 | 11 | @Retention(SOURCE) 12 | @Target({METHOD, PARAMETER, FIELD}) 13 | public @interface Nullable { 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/app/Activity.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | 6 | public class Activity extends Context { 7 | public SharedPreferences getPreferences(int mode) { 8 | return new SharedPreferences(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/app/Application.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.content.ContextWrapper; 4 | 5 | public class Application extends ContextWrapper { 6 | } 7 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/bluetooth/BluetoothAdapter.java: -------------------------------------------------------------------------------- 1 | package android.bluetooth; 2 | 3 | public final class BluetoothAdapter { 4 | public String getAddress() { 5 | throw new RuntimeException("Stub!"); 6 | } 7 | public int getState() { 8 | throw new RuntimeException("Stub!"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/content/BroadcastReceiver.kt: -------------------------------------------------------------------------------- 1 | package android.content 2 | 3 | class BroadcastReceiver { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/content/ContentResolver.java: -------------------------------------------------------------------------------- 1 | package android.content; 2 | 3 | public abstract class ContentResolver { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/content/ContextWrapper.java: -------------------------------------------------------------------------------- 1 | package android.content; 2 | 3 | public class ContextWrapper extends Context { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/content/IntentFilter.kt: -------------------------------------------------------------------------------- 1 | package android.content 2 | 3 | class IntentFilter { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/content/SharedPreferences.java: -------------------------------------------------------------------------------- 1 | package android.content; 2 | 3 | public class SharedPreferences { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/hardware/biometrics/BiometricPrompt.java: -------------------------------------------------------------------------------- 1 | package android.hardware.biometrics; 2 | 3 | import android.os.CancellationSignal; 4 | 5 | import java.util.concurrent.Executor; 6 | 7 | public class BiometricPrompt { 8 | public static class AuthenticationCallback { 9 | 10 | } 11 | 12 | public static final class CryptoObject { 13 | 14 | } 15 | 16 | public void authenticate(CancellationSignal cancel, Executor executor, AuthenticationCallback callback) { 17 | 18 | } 19 | 20 | public void authenticate(CryptoObject crypto, CancellationSignal cancel, Executor executor, AuthenticationCallback callback) { 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/net/http/SslCertificate.java: -------------------------------------------------------------------------------- 1 | package android.net.http; 2 | 3 | public class SslCertificate { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/net/http/SslError.java: -------------------------------------------------------------------------------- 1 | package android.net.http; 2 | 3 | public class SslError { 4 | public SslCertificate getCertificate () { 5 | return new SslCertificate(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/net/wifi/WifiInfo.java: -------------------------------------------------------------------------------- 1 | package android.net.wifi; 2 | 3 | public class WifiInfo { 4 | public String getMacAddress() { 5 | throw new RuntimeException("Stub!"); 6 | } 7 | public double getLostTxPacketsPerSecond() { 8 | throw new RuntimeException("Stub!"); 9 | } 10 | public void setLostTxPacketsPerSecond(double lostTxPacketsPerSecond) { 11 | throw new RuntimeException("Stub!"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/os/Bundle.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public class Bundle { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/os/CancellationSignal.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public class CancellationSignal { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/os/Handler.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public class Handler { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/preference/PreferenceManager.java: -------------------------------------------------------------------------------- 1 | package android.preference; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | 6 | public class PreferenceManager { 7 | public static SharedPreferences getDefaultSharedPreferences(Context context) { 8 | return null; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/security/keystore/KeyProperties.java: -------------------------------------------------------------------------------- 1 | package android.security.keystore; 2 | 3 | public class KeyProperties { 4 | 5 | /** 6 | * Purpose of key: encryption. 7 | */ 8 | public static final int PURPOSE_ENCRYPT = 1; 9 | 10 | /** 11 | * Purpose of key: decryption. 12 | */ 13 | public static final int PURPOSE_DECRYPT = 1 << 1; 14 | 15 | /** Galois/Counter Mode (GCM) block mode. */ 16 | public static final String BLOCK_MODE_GCM = "GCM"; 17 | 18 | /** 19 | * No encryption padding. 20 | */ 21 | public static final String ENCRYPTION_PADDING_NONE = "NoPadding"; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/support/annotation/RequiresApi.kt: -------------------------------------------------------------------------------- 1 | package android.support.annotation 2 | 3 | import android.os.Build 4 | 5 | annotation class RequiresApi(val api: Build.VERSION_CODES) { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/telephony/SubscriptionManager.java: -------------------------------------------------------------------------------- 1 | package android.telephony; 2 | 3 | import android.annotation.NonNull; 4 | 5 | public class SubscriptionManager { 6 | @NonNull 7 | public String getPhoneNumber(int subscriptionId, int source) { 8 | throw new RuntimeException("Stub!"); 9 | } 10 | @NonNull 11 | public String getPhoneNumber(int subscriptionId) { 12 | throw new RuntimeException("Stub!"); 13 | } 14 | public int getActiveSubscriptionInfoCount() { 15 | throw new RuntimeException("Stub!"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/webkit/SslErrorHandler.java: -------------------------------------------------------------------------------- 1 | package android.webkit; 2 | 3 | import android.os.Handler; 4 | 5 | public class SslErrorHandler extends Handler { 6 | public void cancel() { 7 | } 8 | public void proceed() { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/webkit/WebView.java: -------------------------------------------------------------------------------- 1 | package android.webkit; 2 | 3 | public class WebView { 4 | public static void setWebContentsDebuggingEnabled(boolean enabled) { 5 | } 6 | 7 | public void addJavascriptInterface(Object object, String name) { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/webkit/WebViewClient.java: -------------------------------------------------------------------------------- 1 | package android.webkit; 2 | 3 | import android.net.http.SslError; 4 | 5 | public class WebViewClient { 6 | public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/android/webkit/WebViewFactoryProvider.java: -------------------------------------------------------------------------------- 1 | package android.webkit; 2 | 3 | public interface WebViewFactoryProvider { 4 | interface Statics { 5 | void setWebContentsDebuggingEnabled(boolean enable); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/androidx/ads/identifier/AdvertisingIdClient.java: -------------------------------------------------------------------------------- 1 | package androidx.ads.identifier; 2 | 3 | import android.annotation.NonNull; 4 | import androidx.ads.identifier.internal.HoldingConnectionClient; 5 | 6 | public class AdvertisingIdClient { 7 | @SuppressWarnings("WeakerAccess") /* synthetic accessor */ 8 | @NonNull 9 | public static AdvertisingIdInfo getIdInfo(HoldingConnectionClient connectionClient) { 10 | throw new RuntimeException("Stub!"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/androidx/ads/identifier/AdvertisingIdInfo.java: -------------------------------------------------------------------------------- 1 | package androidx.ads.identifier; 2 | 3 | import android.annotation.NonNull; 4 | 5 | public abstract class AdvertisingIdInfo { 6 | @NonNull 7 | public abstract String getId(); 8 | @NonNull 9 | public abstract String getProviderPackageName(); 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/androidx/ads/identifier/internal/HoldingConnectionClient.java: -------------------------------------------------------------------------------- 1 | package androidx.ads.identifier.internal; 2 | 3 | public class HoldingConnectionClient { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/androidx/biometric/BiometricPrompt.java: -------------------------------------------------------------------------------- 1 | package androidx.biometric; 2 | 3 | public class BiometricPrompt { 4 | public static class CryptoObject { 5 | 6 | } 7 | 8 | public static class PromptInfo { 9 | 10 | } 11 | 12 | public void authenticate(PromptInfo info, CryptoObject crypto) { 13 | } 14 | 15 | public void authenticate(PromptInfo info) { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/androidx/lifecycle/ViewModel.java: -------------------------------------------------------------------------------- 1 | package androidx.lifecycle; 2 | 3 | public abstract class ViewModel { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/io/MyFile.java: -------------------------------------------------------------------------------- 1 | package io; 2 | 3 | import java.io.IOException; 4 | 5 | public class MyFile { 6 | 7 | public String createFile() throws IOException { 8 | throw new IOException(""); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/io/realm/RealmConfiguration.java: -------------------------------------------------------------------------------- 1 | package io.realm; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | 5 | public class RealmConfiguration { 6 | 7 | public static class Builder { 8 | 9 | public RealmConfiguration.Builder name(@NotNull String s) { 10 | return null; 11 | } 12 | 13 | @NotNull 14 | public Builder encryptionKey(@NotNull byte[] toByteArray) { 15 | return null; 16 | } 17 | 18 | @NotNull 19 | public Object build() { 20 | return null; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/net/sqlcipher/database/CursorFactory.java: -------------------------------------------------------------------------------- 1 | package net.sqlcipher.database; 2 | 3 | public class CursorFactory { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/net/sqlcipher/database/DatabaseErrorHandler.java: -------------------------------------------------------------------------------- 1 | package net.sqlcipher.database; 2 | 3 | public class DatabaseErrorHandler { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/java/net/sqlcipher/database/SQLiteDatabaseHook.java: -------------------------------------------------------------------------------- 1 | package net.sqlcipher.database; 2 | 3 | public class SQLiteDatabaseHook { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/android/os/Build.kt: -------------------------------------------------------------------------------- 1 | package android.os 2 | 3 | class Build { 4 | enum class VERSION_CODES { 5 | JELLY_BEAN_MR1, 6 | O 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/android/os/Environment.kt: -------------------------------------------------------------------------------- 1 | package android.os 2 | 3 | import java.io.File 4 | 5 | class Environment { 6 | fun getExternalStorageDirectory(): File { 7 | throw NotImplementedError() 8 | } 9 | 10 | fun getExternalStoragePublicDirectory(type: String): File { 11 | throw NotImplementedError() 12 | } 13 | 14 | fun getDownloadCacheDirectory(): File { 15 | throw NotImplementedError() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/android/os/UserHandle.kt: -------------------------------------------------------------------------------- 1 | package android.os 2 | 3 | class UserHandle { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/foundation/text/input/TextFieldState.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.foundation.text.input 2 | 3 | import androidx.compose.ui.text.TextRange 4 | 5 | // Partial stubbing of the primary constructor 6 | class TextFieldState { 7 | constructor( 8 | initialText: String = "", 9 | initialSelection: TextRange = TextRange(initialText.length) 10 | // ... 11 | ) { 12 | throw Exception("Stub!") 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/material/SecureTextField.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.material 2 | 3 | // Partial stubbing of parameters 4 | fun SecureTextField( 5 | // ... 6 | ) { 7 | throw Exception("Stub!") 8 | } 9 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/material/TextField.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.material 2 | 3 | import androidx.compose.foundation.text.KeyboardOptions 4 | import androidx.compose.ui.text.input.VisualTransformation 5 | 6 | // Partial stubbing of parameters 7 | fun TextField( 8 | value: String, 9 | onValueChange: (String) -> Unit, 10 | // ... 11 | visualTransformation: VisualTransformation = VisualTransformation.None, 12 | keyboardOptions: KeyboardOptions = KeyboardOptions.Default, 13 | // ... 14 | ) { 15 | throw Exception("Stub!") 16 | } 17 | 18 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/material3/SecureTextField.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.material3 2 | 3 | // Partial stubbing of parameters 4 | fun SecureTextField( 5 | // ... 6 | ) { 7 | throw Exception("Stub!") 8 | } 9 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/material3/TextField.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.material3 2 | 3 | import androidx.compose.foundation.text.KeyboardOptions 4 | import androidx.compose.ui.text.input.VisualTransformation 5 | 6 | // Partial stubbing of parameters 7 | fun TextField( 8 | value: String, 9 | onValueChange: (String) -> Unit, 10 | // ... 11 | visualTransformation: VisualTransformation = VisualTransformation.None, 12 | keyboardOptions: KeyboardOptions = KeyboardOptions.Default, 13 | // ... 14 | ) { 15 | throw Exception("Stub!") 16 | } 17 | 18 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/ui/AnnotatedString.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.ui 2 | 3 | class AnnotatedString 4 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/ui/Modifier.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.ui 2 | 3 | interface Modifier { 4 | companion object : Modifier 5 | } 6 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/ui/TransformedText.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.ui 2 | 3 | class TransformedText 4 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/ui/text/TextRange.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.ui.text 2 | 3 | fun TextRange(index: Int): TextRange { 4 | throw Exception("Stub!") 5 | } 6 | 7 | fun TextRange(start: Int, end: Int): TextRange { 8 | throw Exception("Stub!") 9 | } 10 | 11 | @JvmInline 12 | value class TextRange internal constructor(private val packedValue: Long) 13 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/ui/text/input/KeyboardCapitalization.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.ui.text.input 2 | 3 | @JvmInline 4 | value class KeyboardCapitalization private constructor(private val value: Int) { 5 | companion object { 6 | val Unspecified = KeyboardCapitalization(-1) 7 | val None = KeyboardCapitalization(0) 8 | val Characters = KeyboardCapitalization(1) 9 | val Words = KeyboardCapitalization(2) 10 | val Sentences = KeyboardCapitalization(3) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/androidx/compose/ui/text/input/OffsetMapping.kt: -------------------------------------------------------------------------------- 1 | package androidx.compose.ui.text.input 2 | 3 | interface OffsetMapping { 4 | fun originalToTransformed(offset: Int): Int 5 | fun transformedToOriginal(offset: Int): Int 6 | 7 | companion object { 8 | val Identity = object : OffsetMapping { 9 | override fun originalToTransformed(offset: Int): Int { 10 | throw Exception("Stub!") 11 | } 12 | override fun transformedToOriginal(offset: Int): Int { 13 | throw Exception("Stub!") 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/BadFunctionNameCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class BadFunctionNameCheckSample { 4 | 5 | fun foo_bar() {} // Noncompliant {{Rename function "foo_bar" to match the regular expression ^[a-zA-Z][a-zA-Z0-9]*$}} 6 | // ^^^^^^^ 7 | 8 | fun `else`() {} // Compliant 9 | 10 | fun String.`foo bar`() {} // Noncompliant {{Rename function "foo bar" to match the regular expression ^[a-zA-Z][a-zA-Z0-9]*$}} 11 | // ^^^^^^^^^ 12 | 13 | val anonymousFunction = fun() {} 14 | 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/DeprecatedCodeCheckSampleNoSemantics.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | @Deprecated("") 4 | class DeprecatedCodeCheckSampleNoSemantics // Noncompliant 5 | // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/Dummy.kt: -------------------------------------------------------------------------------- 1 | class Dummy { 2 | private fun f() { // Noncompliant {{Hello World!}} 3 | } 4 | private fun f1() { // Noncompliant {{Hello World!}} 5 | } 6 | private fun f2() { // Noncompliant {{Hello World!}} 7 | } 8 | private fun f3() { // Noncompliant {{Hello World!}} 9 | } 10 | private fun f4() { // Noncompliant {{Hello World!}} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/DummyNoIssues.kt: -------------------------------------------------------------------------------- 1 | class DummyNoIssues { 2 | } 3 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/EmptyCommentCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | // Noncompliant@+1 {{Remove this comment, it is empty.}} 4 | /* */ 5 | // ^^^^^ 6 | 7 | // Noncompliant@+1 {{Remove this comment, it is empty.}} 8 | /** 9 | */ 10 | 11 | /** 12 | * 13 | */ 14 | 15 | /* Compliant */ 16 | 17 | // Compliant 18 | 19 | // The next line should be compliant 20 | // 21 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/FileHeaderCheckSample.kt: -------------------------------------------------------------------------------- 1 | // Noncompliant@0 {{Add or update the header of this file.}} 2 | package checks 3 | // copyright 2021 4 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/FileHeaderCheckSampleCompliant.kt: -------------------------------------------------------------------------------- 1 | // copyright 2021 2 | package checks 3 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/FixMeCommentCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | // Noncompliant@+3 4 | /** 5 | * KDoc with 6 | * FIXME something */ 7 | // ^^^^^ 8 | class FixMeCommentCheckSample { 9 | 10 | // Noncompliant@+1 11 | // FIXME 12 | // ^^^^^ 13 | 14 | // notafixme comment 15 | 16 | // not2fixme comment 17 | 18 | // a fixmelist 19 | 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/NestedMatchCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class NestedMatchCheckSample { 4 | 5 | fun example(c: Int) { 6 | when (c) { 7 | 1 -> when (c) { // Noncompliant {{Refactor the code to eliminate this nested "when".}} 8 | 2 -> {} 9 | } 10 | } 11 | 12 | when (c) { // Compliant 13 | 1 -> {} 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/OneStatementPerLineCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class OneStatementPerLineCheckSample { 4 | 5 | fun test() { 6 | println() 7 | 8 | println(); println(); println() // Noncompliant {{Reformat the code to have only one statement per line.}} 9 | // ^^^^^^^^^ ^^^^^^^^^< 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/RedundantParenthesesCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class RedundantParenthesesCheckSample { 4 | 5 | val a = ((1)) // Noncompliant {{Remove these useless parentheses.}} 6 | // ^ ^< 7 | 8 | val b = (1) 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/RedundantSuspendModifierCheckSampleNoSemantics.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | import kotlinx.coroutines.delay 4 | 5 | suspend fun redundant() { 6 | println("Hello!") 7 | } 8 | 9 | suspend fun suspending() { 10 | println("Hello!") 11 | delay(500L) 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/ReportCharacterClassRegexDummyCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class ReportCharacterClassRegexDummyCheckSample { 4 | fun characterClasses() { 5 | 6 | Regex("[a-z]abc[A-Z]abc[b-d]abc[0-9]") // Noncompliant {{Character class found}} 7 | // ^^^^^> ^^^^^ ^^^^^< ^^^^^< ^^^^^< 8 | 9 | 10 | """[0-9]x\nxx[a-z]x\nxx[_-z]""".toRegex() // Noncompliant {{Character class found}} 11 | // ^^^^^ ^^^^^< ^^^^^< ^^^^^^^< 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/SelfAssignmentCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class SelfAssignmentCheckSample { 4 | 5 | var v = "" 6 | var w = "" 7 | fun f() { 8 | var x:Int = 0 9 | var w = "" 10 | x = 1 11 | x = x + 1; 12 | x += x; 13 | x = x; // Noncompliant {{Remove or correct this useless self-assignment.}} 14 | // ^^^^^ 15 | 16 | 17 | this.v = this.v // Noncompliant {{Remove or correct this useless self-assignment.}} 18 | this.v = v // Compliant, 'v' could be local variable 19 | this.v = this.w 20 | this.v = w 21 | this.w = w 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/TabsCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class TabsCheckSample { 4 | // Noncompliant@0 {{Replace all tab characters in this file by sequences of white-spaces.}} 5 | } 6 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/TestClass.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class TestClass { 4 | } 5 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/TodoCommentCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | // Noncompliant@+3 4 | /** 5 | * KDoc with 6 | * TODO something */ 7 | // ^^^^ 8 | class TodoCommentCheckSample { 9 | 10 | // Noncompliant@+1 11 | // TODO something 12 | // ^^^^ 13 | 14 | // notatodo comment 15 | 16 | // not2todo comment 17 | 18 | // a todolist 19 | 20 | } 21 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/TooLongLineCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class TooLongLineCheckSample { 4 | 5 | // Noncompliant@+1 {{Split this 201 characters long line (which is greater than 200 authorized).}} 6 | /***************************************************************************************************************************************************************************************************/ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/TooManyCasesCheckSample.kt: -------------------------------------------------------------------------------- 1 | package checks; 2 | 3 | class TooManyCasesCheckSample { 4 | 5 | fun example(c: Int) { 6 | when (c) { // Noncompliant {{Reduce the number of when branches from 3 to at most 2.}} 7 | // ^^^^ 8 | 1 -> {} 9 | // ^^< 10 | 2 -> {} 11 | // ^^< 12 | else -> {} 13 | // ^^< 14 | } 15 | 16 | when (c) { // Compliant 17 | 1 -> {} 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/TooManyLinesOfCodeFileCheckSample.kt: -------------------------------------------------------------------------------- 1 | // Noncompliant@0 {{File has 8 lines, which is greater than 1 authorized. Split it into smaller files.}} 2 | package checks 3 | 4 | class TooManyLinesOfCodeFileCheckSample { 5 | 6 | fun multilineStringLiteral() = 7 | """ 8 | First line 9 | Second line 10 | """ 11 | 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/TooManyLinesOfCodeFileCheckSampleCompliant.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/UnusedLocalVariableCheckSamplePartialSemantics.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | import okhttp3.RequestBody 4 | import otherpackage.get 5 | import java.io.File 6 | 7 | class UnusedLocalVariableCheckSamplePartialSemantics { 8 | 9 | var activity: RequestBody = RequestBody.create(null, File("")) 10 | 11 | fun someMethodThatRequiresActivity() { 12 | val foo = activity ?: return 13 | foo.get(1) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/UselessNullCheckCheckSampleWithErrorDiagnostics.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | class UselessNullCheckCheckSampleWithErrorDiagnostics { 4 | fun foo() { 5 | null!! // Compliant 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/VoidShouldBeUnitCheckSampleCustomVoid.kt: -------------------------------------------------------------------------------- 1 | package checks 2 | 3 | private class Void 4 | 5 | private class MyIII { 6 | fun voidFunction1(): Void = TODO() // Compliant, custom void 7 | fun voidFunction11(): Void? = null // Compliant, custom void 8 | fun voidFunction2(): java.lang.Void = TODO() // Noncompliant 9 | } -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/checks/otherpackage/UnnecessaryImportsCheckSampleNoSemanticsLongPackage.kt: -------------------------------------------------------------------------------- 1 | package checks.otherpackage 2 | 3 | import otherpackage.OtherClass // Compliant 4 | 5 | class UnnecessaryImportsCheckSampleNoSemanticsLongPackage(val foo: OtherClass) 6 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/delegates/delegates.kt: -------------------------------------------------------------------------------- 1 | package delegates 2 | 3 | import kotlin.reflect.KProperty 4 | 5 | inline operator fun State.getValue(thisObj: Any?, property: KProperty<*>): T = value 6 | 7 | inline operator fun State.setValue(t: Any?, property: KProperty<*>, t1: T) { 8 | TODO("Not yet implemented") 9 | } 10 | interface State { 11 | val value: T 12 | } 13 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/imports/ClassWithCompanionObject.kt: -------------------------------------------------------------------------------- 1 | package imports 2 | 3 | class ClassWithCompanionObject { 4 | 5 | companion object { 6 | const val MY_CONSTANT = 100 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/imports/ClassWithNamedCompanionObject.kt: -------------------------------------------------------------------------------- 1 | package imports 2 | 3 | class ClassWithNamedCompanionObject { 4 | companion object Named { 5 | fun companionObjectFun() {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/otherpackage/Void.kt: -------------------------------------------------------------------------------- 1 | package otherpackage 2 | 3 | class Void { 4 | } -------------------------------------------------------------------------------- /kotlin-checks-test-sources/src/main/kotlin/sample/SampleClass.kt: -------------------------------------------------------------------------------- 1 | package sample 2 | 3 | class SampleClass { 4 | fun sayHello(name: String) { 5 | println("Hello, $name!") 6 | } 7 | 8 | fun sayHelloNullable(name: String?): Int { 9 | println("Hello, ${name ?: "empty void"}!") 10 | return 0 11 | } 12 | 13 | fun intAndVararg(one: Int, vararg two: String) { 14 | // empty 15 | } 16 | 17 | operator fun get(index: Int) = 42 18 | } 19 | 20 | suspend fun String.suspendExtFun(): String = "" 21 | -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/api/sample/SimpleClass.kt: -------------------------------------------------------------------------------- 1 | package api.sample 2 | 3 | class SimpleClass { 4 | fun foo() = "a" 5 | } 6 | -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/api/sample/foo.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SonarSource/sonar-kotlin/3dff5f67bf31d94d310640adb333d64716464ca6/sonar-kotlin-api/src/test/resources/api/sample/foo.kt -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast-printing/TestFileToPrintAstFor.kt: -------------------------------------------------------------------------------- 1 | package Foo 2 | 3 | import a.b.c 4 | 5 | class TestClass { 6 | companion object { 7 | const val x = "foo
" 8 | } 9 | 10 | fun test() {} 11 | } 12 | -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/breakAndContinueInsideWhen.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.converter.ast 2 | 3 | fun testBreakAndContinue(ints: List) { 4 | for (i in ints) { 5 | when (i) { 6 | in 2..5 -> continue 7 | 39 -> break 8 | else -> println(i) 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/extension.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.converter.ast 2 | 3 | import org.sonarsource.kotlin.converter.ast.B 4 | 5 | fun B.extensionFunction(): String = "" -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/kotlin-1.5.kt: -------------------------------------------------------------------------------- 1 | @JvmRecord 2 | data class User(val name: String, val age: Int) 3 | 4 | sealed interface Polygon 5 | 6 | @JvmInline 7 | value class Password(val s: String) 8 | 9 | 10 | -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/kotlin-1.9.kt: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | fun testBreakAndContinue(ints: List) { 4 | for (i in ints) { 5 | when (i) { 6 | in 2..< 5 -> continue 7 | 39 -> break 8 | else -> println(i) 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/mix.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.converter.ast 2 | 3 | data class B(val f2: Int) 4 | 5 | enum class MyEnum { 6 | SUNDAY, MONDAY 7 | } 8 | 9 | fun a() { 10 | fun a() { 11 | while (true); 12 | } 13 | } 14 | 15 | class A(var a: String) { 16 | fun b(a: String) { 17 | this.a = "" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/mixedNamedAndPositionalArguments.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.converter.ast 2 | 3 | fun function( 4 | input: String, 5 | isValid: Boolean = true, 6 | times: Int = 3 7 | ) { 8 | } 9 | 10 | fun main() { 11 | function("This is a String!", isValid = false, 5) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/referenceWithDefaultArg.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.converter.ast 2 | 3 | fun foo(i: Int = 0): String = "$i!" 4 | 5 | fun apply(func: () -> String): String = func() 6 | 7 | fun main() { 8 | println(apply(::foo)) 9 | } -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/simple.kt: -------------------------------------------------------------------------------- 1 | class Simple(var a: String) { 2 | fun b(a: String) { 3 | this.a = "" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/suspendCallableReferences.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.converter.ast 2 | 3 | fun call() {} 4 | fun takeSuspend(f: suspend () -> Unit) {} 5 | 6 | fun test() { 7 | takeSuspend { call() } // OK before 1.4 8 | takeSuspend(::call) // In Kotlin 1.4, it also works 9 | } -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/trailing-coma.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.converter.ast 2 | 3 | class Trailing(var a: List,) { 4 | fun b(a: String,) { 5 | this.a = listOf( 6 | a, 7 | "", 8 | ) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /sonar-kotlin-api/src/test/resources/ast/unitReturningReferences.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.converter.ast 2 | 3 | fun highOrderFunction(func: () -> Unit) { } 4 | fun helloString(): String = "Hello, World!" 5 | 6 | fun main() { 7 | highOrderFunction { helloString() } // this was the only way to do it before 1.4 8 | highOrderFunction(::helloString) // starting from 1.4, this also works 9 | } -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/A.kt: -------------------------------------------------------------------------------- 1 | package externalreport.detekt 2 | 3 | class A { 4 | override fun equals(other: Any?): Boolean { 5 | return super.equals(other) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/TabCharacter.go: -------------------------------------------------------------------------------- 1 | // S105 2 | package samples 3 | 4 | func three() int { 5 | x := 3 6 | return x // Noncompliant 7 | } 8 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/A.java: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.externalreport.androidlint; 2 | 3 | class A { 4 | void foo(){ 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/B.kt: -------------------------------------------------------------------------------- 1 | class B() { 2 | fun foo() { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/README.md: -------------------------------------------------------------------------------- 1 | `lint-results.xml` file can be generated using: 2 | ``` 3 | android-sdk/tools/bin/lint --xml lint-results.xml path/to/project 4 | ``` 5 | 6 | or using gradle (the report is generated in `build/reports/lint-results.xml`): 7 | ``` 8 | gradle lint 9 | ``` 10 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/binary-file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SonarSource/sonar-kotlin/3dff5f67bf31d94d310640adb333d64716464ca6/sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/binary-file.gif -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/build.gradle: -------------------------------------------------------------------------------- 1 | package kotlin.externalreport.androidlint 2 | 3 | task hello { 4 | doLast { 5 | println 'Hello world!' 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/invalid-file.xml: -------------------------------------------------------------------------------- 1 | 2 | invalid xml file 3 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/androidlint/not-android-lint-file.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/detekt/A.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.externalreport.detekt 2 | 3 | class A { 4 | override fun equals(other: Any?): Boolean { 5 | return super.equals(other) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/detekt/invalid-file.xml: -------------------------------------------------------------------------------- 1 | 2 | invalid xml file 3 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/detekt/main.kt: -------------------------------------------------------------------------------- 1 | fun main(args: Array) { 2 | val magicNumber = Integer.parseInt(args[0]) 3 | if (magicNumber == 42) { 4 | } 5 | println("hello world") 6 | } 7 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/detekt/not-checkstyle-file.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/golandci-lint-report.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/invalid-file.xml: -------------------------------------------------------------------------------- 1 | 2 | invalid xml file 3 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/ktlint/Foo.kt: -------------------------------------------------------------------------------- 1 | package org.sonarsource.kotlin.externalreport.ktlint 2 | 3 | import java.util.* 4 | 5 | class Foo { 6 | fun bar() { 7 | 8 | println("statement with semicolon"); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/ktlint/invalid-checkstyle-file.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/ktlint/invalid-file.xml: -------------------------------------------------------------------------------- 1 | 2 | invalid xml file 3 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/ktlint/invalid-json-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/ktlint/invalid-json-format.json: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/ktlint/invalid-report-format.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SonarSource/sonar-kotlin/3dff5f67bf31d94d310640adb333d64716464ca6/sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/ktlint/invalid-report-format.bin -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/main.kt: -------------------------------------------------------------------------------- 1 | fun main(args: Array) { 2 | val magicNumber = Integer.parseInt(args[0]) 3 | if (magicNumber == 42) { 4 | } 5 | println("hello world") 6 | } 7 | -------------------------------------------------------------------------------- /sonar-kotlin-external-linters/src/test/resources/org/sonarsource/kotlin/externalreport/not-checkstyle-file.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /sonar-kotlin-gradle/src/test/samples/non-compiling/AndroidReleaseBuildDebugCheckSample/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | android { 2 | buildTypes { 3 | release { 4 | isDebuggable = true // Compliant, not in a build.gradle.kts file 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /sonar-kotlin-gradle/src/test/samples/non-compiling/AndroidReleaseBuildObfuscationCheckSample/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | android { 2 | buildTypes { 3 | release { // Compliant, not in a build.gradle.kts file 4 | } 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /sonar-kotlin-gradle/src/test/samples/non-compiling/DummyKotlinGradleCheckNoIssuesSample.kts: -------------------------------------------------------------------------------- 1 | println("Hello!") 2 | -------------------------------------------------------------------------------- /sonar-kotlin-gradle/src/test/samples/non-compiling/DummyKotlinGradleCheckSample.kts: -------------------------------------------------------------------------------- 1 | private fun f() { // Noncompliant {{Hello World!}} 2 | } 3 | private fun f1() { // Noncompliant {{Hello World!}} 4 | } 5 | private fun f2() { // Noncompliant {{Hello World!}} 6 | } 7 | private fun f3() { // Noncompliant {{Hello World!}} 8 | } 9 | private fun f4() { // Noncompliant {{Hello World!}} 10 | } 11 | -------------------------------------------------------------------------------- /sonar-kotlin-gradle/src/test/samples/non-compiling/S6625/compliant-setter/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.setName("myProject") 2 | 3 | dependencyResolutionManagement { 4 | // ... 5 | } 6 | -------------------------------------------------------------------------------- /sonar-kotlin-gradle/src/test/samples/non-compiling/S6625/compliant/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { // Compliant 2 | // ... 3 | } 4 | -------------------------------------------------------------------------------- /sonar-kotlin-gradle/src/test/samples/non-compiling/S6625/compliant/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.setName("myProject") 2 | 3 | dependencyResolutionManagement { 4 | // ... 5 | } 6 | -------------------------------------------------------------------------------- /sonar-kotlin-gradle/src/test/samples/non-compiling/S6625/noncompliant/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | // Noncompliant@0 {{Assign `rootProject.name` in `settings.gradle.kts`.}} 2 | 3 | dependencyResolutionManagement { 4 | // ... 5 | } 6 | 7 | rootProject.name == "myProject" 8 | rootProject.title = "myProject" 9 | project.name = "myRepo" 10 | project.title = "myRepo" 11 | name = "myRepo" 12 | 13 | rootProject.setTitle("myProject") 14 | project.setName("myProject") 15 | project.setTitle("myRepo") 16 | setName("myProject") 17 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/sonarpedia.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules-metadata-path": "./src/main/resources/org/sonar/l10n/kotlin/rules/kotlin", 3 | "languages": [ 4 | "KOTLIN" 5 | ], 6 | "latest-update": "2025-07-12T19:40:22.641523Z", 7 | "options": { 8 | "no-language-in-filenames": true, 9 | "preserve-filenames": true 10 | } 11 | } -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/ParsingError.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

When the parser fails, it is possible to record the failure as an issue on the file. This way, not only is it possible to track the number of files 3 | that do not parse but also to easily find out why they do not parse.

4 | 5 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/ParsingError.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Kotlin parser failure", 3 | "type": "CODE_SMELL", 4 | "status": "ready", 5 | "remediation": { 6 | "func": "Constant\/Issue", 7 | "constantCost": "30min" 8 | }, 9 | "tags": [ 10 | "suspicious" 11 | ], 12 | "defaultSeverity": "Major", 13 | "ruleSpecification": "RSPEC-2260", 14 | "sqKey": "S2260", 15 | "scope": "All", 16 | "quickfix": "infeasible" 17 | } 18 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S100.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

Shared naming conventions allow teams to collaborate efficiently.

3 |

This rule raises an issue when a function name does not match a provided regular expression.

4 |

For example, with the default provided regular expression ^[a-zA-Z][a-zA-Z0-9]*$, the function:

5 |
 6 | fun _DoSomething() {...} // Noncompliant
 7 | 
8 |

should be renamed to

9 |
10 | fun DoSomething() {...}
11 | 
12 | 13 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S100.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Function names should comply with a naming convention", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "IDENTIFIABLE" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "convention" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-100", 20 | "sqKey": "S100", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S101.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

Shared naming conventions allow teams to collaborate efficiently.

3 |

This rule raises an issue when a class name does not match a provided regular expression.

4 |

For example, with the default provided regular expression ^[A-Z][a-zA-Z0-9]*$, the class:

5 |
 6 | class my_class {...} // Noncompliant
 7 | 
8 |

should be renamed to

9 |
10 | class MyClass {...}
11 | 
12 | 13 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S101.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Class names should comply with a naming convention", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "IDENTIFIABLE" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "convention" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-101", 20 | "sqKey": "S101", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S103.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

Scrolling horizontally to see a full line of code lowers the code readability.

3 | 4 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S103.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Lines should not be too long", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "FORMATTED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "1min" 14 | }, 15 | "tags": [ 16 | "convention" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-103", 20 | "sqKey": "S103", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S104.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

When a source file grows too much, it can accumulate numerous responsibilities and become challenging to understand and maintain.

3 |

Above a specific threshold, refactor the file into smaller files whose code focuses on well-defined tasks. Those smaller files will be easier to 4 | understand and test.

5 | 6 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S104.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Files should not have too many lines of code", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "FOCUSED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "1h" 14 | }, 15 | "tags": [ 16 | "architecture", 17 | "brain-overload" 18 | ], 19 | "defaultSeverity": "Major", 20 | "ruleSpecification": "RSPEC-104", 21 | "sqKey": "S104", 22 | "scope": "All", 23 | "quickfix": "unknown" 24 | } 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S105.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

The tab width can differ from one development environment to another. Using tabs may require other developers to configure their environment (text 3 | editor, preferences, etc.) to read source code.

4 |

That is why using spaces is preferable.

5 | 6 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S105.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Tabulation characters should not be used", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "FORMATTED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [ 16 | "convention" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-105", 20 | "sqKey": "S105", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1066.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Mergeable \"if\" statements should be combined", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "clumsy" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-1066", 20 | "sqKey": "S1066", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S107.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Functions should not have too many parameters", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "FOCUSED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [ 16 | "brain-overload" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-107", 20 | "sqKey": "S107", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S108.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Nested blocks of code should not be left empty", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "suspicious" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-108", 20 | "sqKey": "S108", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1110.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Redundant pairs of parentheses should be removed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "1min" 14 | }, 15 | "tags": [ 16 | "confusing" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-1110", 20 | "sqKey": "S1110", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1125.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Boolean literals should not be redundant", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "clumsy" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-1125", 20 | "sqKey": "S1125", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1128.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Unnecessary imports should be removed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "1min" 14 | }, 15 | "tags": [ 16 | "unused" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-1128", 20 | "sqKey": "S1128", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1133.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

This rule is meant to be used as a way to track code which is marked as being deprecated. Deprecated code should eventually be removed.

3 |

Noncompliant code example

4 |
5 | @Deprecated("") // Noncompliant
6 | class Example
7 | 
8 | 9 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1133.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Deprecated code should be removed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "INFO" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "10min" 14 | }, 15 | "tags": [ 16 | "obsolete" 17 | ], 18 | "defaultSeverity": "Info", 19 | "ruleSpecification": "RSPEC-1133", 20 | "sqKey": "S1133", 21 | "scope": "All", 22 | "quickfix": "infeasible" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1144.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Unused \"private\" methods should be removed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [ 16 | "unused" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-1144", 20 | "sqKey": "S1144", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1145.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Useless \"if(true) {...}\" and \"if(false){...}\" blocks should be removed", 3 | "type": "BUG", 4 | "status": "ready", 5 | "remediation": { 6 | "func": "Constant\/Issue", 7 | "constantCost": "2min" 8 | }, 9 | "tags": [ 10 | "cwe" 11 | ], 12 | "defaultSeverity": "Major", 13 | "ruleSpecification": "RSPEC-1145", 14 | "sqKey": "S1145", 15 | "scope": "All", 16 | "securityStandards": { 17 | "CWE": [ 18 | 489, 19 | 570, 20 | 571 21 | ] 22 | }, 23 | "quickfix": "unknown" 24 | } 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1151.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"when\" clauses should not have too many lines of code", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "FOCUSED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "brain-overload" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-1151", 20 | "sqKey": "S1151", 21 | "scope": "Main", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S117.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Local variable and function parameter names should comply with a naming convention", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "IDENTIFIABLE" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [ 16 | "convention" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-117", 20 | "sqKey": "S117", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1172.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

A typical code smell known as unused function parameters refers to parameters declared in a function but not used anywhere within the function’s 3 | body. While this might seem harmless at first glance, it can lead to confusion and potential errors in your code. Disregarding the values passed to 4 | such parameters, the function’s behavior will be the same, but the programmer’s intention won’t be clearly expressed anymore. Therefore, removing 5 | function parameters that are not being utilized is considered best practice.

6 | 7 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1172.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Unused function parameters should be removed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "unused" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-1172", 20 | "sqKey": "S1172", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1186.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Functions should not be empty", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "HIGH" 7 | }, 8 | "attribute": "COMPLETE" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "suspicious" 17 | ], 18 | "defaultSeverity": "Critical", 19 | "ruleSpecification": "RSPEC-1186", 20 | "sqKey": "S1186", 21 | "scope": "All", 22 | "quickfix": "infeasible" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S122.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

Putting multiple statements on a single line lowers the code readability and makes debugging the code more complex.

3 |
 4 | foo(); bar(); // Noncompliant
 5 | 
6 |

Write one statement per line to improve readability.

7 |
 8 | foo();
 9 | bar();
10 | 
11 | 12 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S122.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Statements should be on separate lines", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "FORMATTED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "1min" 14 | }, 15 | "tags": [ 16 | "convention" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-122", 20 | "sqKey": "S122", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S125.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

Commented-out code distracts the focus from the actual executed code. It creates a noise that increases maintenance code. And because it is never 3 | executed, it quickly becomes out of date and invalid.

4 |

Commented-out code should be deleted and can be retrieved from source control history if required.

5 | 6 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S125.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Sections of code should not be commented out", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "unused" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-125", 20 | "sqKey": "S125", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S126.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"if ... else if\" constructs should end with \"else\" clauses", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "HIGH" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Critical", 17 | "ruleSpecification": "RSPEC-126", 18 | "sqKey": "S126", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S138.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

A function that grows too large tends to aggregate too many responsibilities.

3 |

Such functions inevitably become harder to understand and therefore harder to maintain.

4 |

Above a specific threshold, it is strongly advised to refactor into smaller functions which focus on well-defined tasks.

5 |

Those smaller functions will not only be easier to understand, but also probably easier to test.

6 | 7 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S138.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Functions should not have too many lines of code", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "FOCUSED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [ 16 | "architecture", 17 | "brain-overload" 18 | ], 19 | "defaultSeverity": "Major", 20 | "ruleSpecification": "RSPEC-138", 21 | "sqKey": "S138", 22 | "scope": "Main", 23 | "quickfix": "unknown" 24 | } 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1451.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Track lack of copyright and license headers", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "BLOCKER" 7 | }, 8 | "attribute": "LAWFUL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "convention" 17 | ], 18 | "defaultSeverity": "Blocker", 19 | "ruleSpecification": "RSPEC-1451", 20 | "sqKey": "S1451", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1479.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

When when statements have a large number of clauses, it is usually an attempt to map two sets of data. A real map structure would be 3 | more readable and maintainable, and should be used instead.

4 | 5 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1479.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"when\" statements should not have too many clauses", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "FOCUSED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "30min" 14 | }, 15 | "tags": [ 16 | "brain-overload" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-1479", 20 | "sqKey": "S1479", 21 | "scope": "All", 22 | "quickfix": "infeasible" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1481.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Unused local variables should be removed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "unused" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-1481", 20 | "sqKey": "S1481", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1656.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

There is no reason to re-assign a variable to itself. Either this statement is redundant and should be removed, or the re-assignment is a mistake 3 | and some other value or variable was intended for the assignment instead.

4 |

Noncompliant code example

5 |
 6 | fun doSomething() {
 7 |     var name = ""
 8 |     // ...
 9 |     name = name
10 | }
11 | 
12 |

Compliant solution

13 |
14 | fun doSomething() {
15 |     var name = ""
16 |     // ...
17 |     this.name = name
18 | }
19 | 
20 | 21 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1656.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Variables should not be self-assigned", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "3min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-1656", 18 | "sqKey": "S1656", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1764.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Identical expressions should not be used on both sides of a binary operator", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [ 16 | "suspicious" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-1764", 20 | "sqKey": "S1764", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1821.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"when\" statements should not be nested", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "HIGH" 7 | }, 8 | "attribute": "FOCUSED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "10min" 14 | }, 15 | "tags": [ 16 | "pitfall" 17 | ], 18 | "defaultSeverity": "Critical", 19 | "ruleSpecification": "RSPEC-1821", 20 | "sqKey": "S1821", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1862.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

A chain of if/else if statements is evaluated from top to bottom. At most, only one branch will be executed: the first 3 | one with a condition that evaluates to true.

4 |

Therefore, duplicating a condition automatically leads to dead code. Usually, this is due to a copy/paste error. At best, it’s simply dead code and 5 | at worst, it’s a bug that is likely to induce further bugs as the code is maintained, and obviously it could lead to unexpected behavior.

6 | 7 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1862.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Related \"if\/else if\" statements should not have the same condition", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "10min" 14 | }, 15 | "tags": [ 16 | "unused", 17 | "pitfall" 18 | ], 19 | "defaultSeverity": "Major", 20 | "ruleSpecification": "RSPEC-1862", 21 | "sqKey": "S1862", 22 | "scope": "All", 23 | "quickfix": "unknown" 24 | } 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1940.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

It is needlessly complex to invert the result of a boolean comparison. The opposite comparison should be made instead.

3 |

Noncompliant code example

4 |
 5 | if (!(a == 2)) { ... }  // Noncompliant
 6 | val b = !(i < 10)  // Noncompliant
 7 | 
8 |

Compliant solution

9 |
10 | if (a != 2) { ... }
11 | val b = (i >= 10)
12 | 
13 | 14 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1940.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Boolean checks should not be inverted", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [ 16 | "pitfall" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-1940", 20 | "sqKey": "S1940", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2097.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"equals(other: Any?)\" should test the argument\u0027s type", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "LOW" 7 | }, 8 | "attribute": "COMPLETE" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Minor", 17 | "ruleSpecification": "RSPEC-2097", 18 | "sqKey": "S2097", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2114.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Collections should not be passed as arguments to their own methods", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "15min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-2114", 18 | "sqKey": "S2114", 19 | "scope": "All", 20 | "quickfix": "infeasible" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2116.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"hashCode\" and \"toString\" should not be called on array instances", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "COMPLETE" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-2116", 18 | "sqKey": "S2116", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2122.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"ScheduledThreadPoolExecutor\" should not have 0 core threads", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "HIGH" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Critical", 17 | "ruleSpecification": "RSPEC-2122", 18 | "sqKey": "S2122", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2123.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

A value that is incremented or decremented and then not stored is at best wasted code and at worst a bug.

3 |

Noncompliant code example

4 |
 5 | fun pickNumber() : Int {
 6 |   var i = 0
 7 |   var j = 0
 8 | 
 9 |   i = i++ // Noncompliant; i is still zero
10 | 
11 |   return j++ // Noncompliant; 0 returned
12 | }
13 | 
14 |

Compliant solution

15 |
16 | fun pickNumber() : Int {
17 |   var i = 0
18 |   var j = 0
19 | 
20 |   i++
21 |   return ++j
22 | }
23 | 
24 | 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2123.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Values should not be uselessly incremented", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "unused" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-2123", 20 | "sqKey": "S2123", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2151.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"runFinalizersOnExit\" should not be called", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "HIGH" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Critical", 17 | "ruleSpecification": "RSPEC-2151", 18 | "sqKey": "S2151", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2695.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"PreparedStatement\" and \"ResultSet\" methods should be called with valid indices", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "BLOCKER" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [ 16 | "sql" 17 | ], 18 | "defaultSeverity": "Blocker", 19 | "ruleSpecification": "RSPEC-2695", 20 | "sqKey": "S2695", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2757.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Non-existent operators like \"\u003d+\" should not be used", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-2757", 18 | "sqKey": "S2757", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S3353.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"var\" should be \"val\" if local variable is never re-assigned", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "HIGH" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Critical", 17 | "ruleSpecification": "RSPEC-3353", 18 | "sqKey": "S3353", 19 | "scope": "Main", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S3923.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "All branches in a conditional structure should not have exactly the same implementation", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "15min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-3923", 18 | "sqKey": "S3923", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S3958.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "BUG", 3 | "code": { 4 | "impacts": { 5 | "RELIABILITY": "MEDIUM" 6 | }, 7 | "attribute": "CLEAR" 8 | }, 9 | "status": "ready", 10 | "remediation": { 11 | "func": "Constant\/Issue", 12 | "constantCost": "10min" 13 | }, 14 | "tags": [], 15 | "defaultSeverity": "Major", 16 | "ruleSpecification": "RSPEC-3958", 17 | "sqKey": "S3958", 18 | "scope": "All", 19 | "quickfix": "unknown", 20 | "title": "Intermediate Sequence and Stream functions should not be left unused" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S3981.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Collection and array sizes comparisons should make sense", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "2min" 14 | }, 15 | "tags": [ 16 | "confusing" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-3981", 20 | "sqKey": "S3981", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S4663.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

Empty comments, as shown in the example, hurt readability and might indicate an oversight.

3 |
 4 | /*  */
 5 | 
 6 | /*
 7 | 
 8 |  */
 9 | 
10 |

Some meaningful text should be added to the comment, or the comment markers should be removed.

11 | 12 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S4663.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Multi-line comments should not be empty", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "1min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Minor", 17 | "ruleSpecification": "RSPEC-4663", 18 | "sqKey": "S4663", 19 | "scope": "Main", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S4738.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Native features should be preferred to Guava", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "10min" 14 | }, 15 | "tags": [ 16 | "guava" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-4738", 20 | "sqKey": "S4738", 21 | "scope": "Main", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5612.html: -------------------------------------------------------------------------------- 1 |

Why is this an issue?

2 |

Lambdas are a very convenient and compact way to inject a behavior without having to create a dedicated class or method. But those lambdas should 3 | be used only if the behavior to be injected can be defined in a few lines of code, otherwise the source code can quickly become unreadable.

4 | 5 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5612.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Lambdas should not have too many lines", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "FOCUSED" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-5612", 18 | "sqKey": "S5612", 19 | "scope": "Main", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5842.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Repeated patterns in regular expressions should not match the empty string", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "LOW" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "regex" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-5842", 20 | "sqKey": "S5842", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5846.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Empty lines should not be tested with regex MULTILINE flag", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "HIGH" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "15min" 14 | }, 15 | "tags": [ 16 | "regex" 17 | ], 18 | "defaultSeverity": "Critical", 19 | "ruleSpecification": "RSPEC-5846", 20 | "sqKey": "S5846", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5850.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Alternatives in regular expressions should be grouped when used with anchors", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "10min" 14 | }, 15 | "tags": [ 16 | "regex" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-5850", 20 | "sqKey": "S5850", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5856.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Regular expressions should be syntactically valid", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "HIGH" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "15min" 14 | }, 15 | "tags": [ 16 | "regex" 17 | ], 18 | "defaultSeverity": "Critical", 19 | "ruleSpecification": "RSPEC-5856", 20 | "sqKey": "S5856", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5857.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Character classes should be preferred over reluctant quantifiers in regular expressions", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "EFFICIENT" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "3min" 14 | }, 15 | "tags": [ 16 | "regex" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-5857", 20 | "sqKey": "S5857", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5867.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Unicode-aware versions of character classes should be preferred", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "regex" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-5867", 20 | "sqKey": "S5867", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5868.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Unicode Grapheme Clusters should be avoided inside regex character classes", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "regex" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-5868", 20 | "sqKey": "S5868", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5869.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Character classes in regular expressions should not contain the same character twice", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "regex" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-5869", 20 | "sqKey": "S5869", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6202.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Operator \"is\" should be used instead of \"isInstance()\"", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "COMPLETE" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6202", 18 | "sqKey": "S6202", 19 | "scope": "Main", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6207.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CODE_SMELL", 3 | "code": { 4 | "impacts": { 5 | "MAINTAINABILITY": "MEDIUM" 6 | }, 7 | "attribute": "CLEAR" 8 | }, 9 | "status": "ready", 10 | "remediation": { 11 | "func": "Constant\/Issue", 12 | "constantCost": "5min" 13 | }, 14 | "tags": [], 15 | "defaultSeverity": "Major", 16 | "ruleSpecification": "RSPEC-6207", 17 | "sqKey": "S6207", 18 | "scope": "Main", 19 | "quickfix": "unknown", 20 | "title": "Redundant methods should be avoided in data classes" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6218.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "BUG", 3 | "code": { 4 | "impacts": { 5 | "RELIABILITY": "MEDIUM" 6 | }, 7 | "attribute": "COMPLETE" 8 | }, 9 | "status": "ready", 10 | "remediation": { 11 | "func": "Constant\/Issue", 12 | "constantCost": "5min" 13 | }, 14 | "tags": [], 15 | "defaultSeverity": "Major", 16 | "ruleSpecification": "RSPEC-6218", 17 | "sqKey": "S6218", 18 | "scope": "Main", 19 | "quickfix": "unknown", 20 | "title": "Equals method should be overridden in data classes containing array fields" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6305.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"MutableStateFlow\" and \"MutableSharedFlow\" should not be exposed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "MODULAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "coroutines", 17 | "bad-practice" 18 | ], 19 | "defaultSeverity": "Major", 20 | "ruleSpecification": "RSPEC-6305", 21 | "sqKey": "S6305", 22 | "scope": "All", 23 | "quickfix": "unknown" 24 | } 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6309.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Functions returning Flow\/Channel should not be suspending", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [ 16 | "coroutines", 17 | "bad-practice" 18 | ], 19 | "defaultSeverity": "Major", 20 | "ruleSpecification": "RSPEC-6309", 21 | "sqKey": "S6309", 22 | "scope": "All", 23 | "quickfix": "unknown" 24 | } 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6310.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Dispatchers should be injectable", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "10min" 14 | }, 15 | "tags": [ 16 | "coroutines", 17 | "design" 18 | ], 19 | "defaultSeverity": "Major", 20 | "ruleSpecification": "RSPEC-6310", 21 | "sqKey": "S6310", 22 | "scope": "All", 23 | "quickfix": "unknown" 24 | } 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6311.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Suspending functions should not be called on a different dispatcher", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "coroutines", 17 | "clumsy" 18 | ], 19 | "defaultSeverity": "Major", 20 | "ruleSpecification": "RSPEC-6311", 21 | "sqKey": "S6311", 22 | "scope": "All", 23 | "quickfix": "unknown" 24 | } 25 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6312.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Extension functions on CoroutineScopes should not be declared as \"suspend\"", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [ 16 | "coroutines" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6312", 20 | "sqKey": "S6312", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6313.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "ViewModel classes should create coroutines", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [ 16 | "coroutines", 17 | "android", 18 | "bad-practice" 19 | ], 20 | "defaultSeverity": "Major", 21 | "ruleSpecification": "RSPEC-6313", 22 | "sqKey": "S6313", 23 | "scope": "All", 24 | "quickfix": "unknown" 25 | } 26 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6314.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Flow intermediate operation results should not be left unused", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "coroutines" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6314", 20 | "sqKey": "S6314", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6315.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "The return value of functions returning \"Deferred\" should be used", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "20min" 14 | }, 15 | "tags": [ 16 | "coroutines" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6315", 20 | "sqKey": "S6315", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6316.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Kotlin coroutines API for timeouts should be used", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "coroutines" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6316", 20 | "sqKey": "S6316", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6318.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"suspend\" modifier should not be redundant", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "1min" 14 | }, 15 | "tags": [ 16 | "coroutines" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-6318", 20 | "sqKey": "S6318", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6508.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"Unit\" should be used instead of \"Void\"", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6508", 18 | "sqKey": "S6508", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6510.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"return\" statements should be lifted before \"if\" or \"when\" statement", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6510", 18 | "sqKey": "S6510", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6511.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"when\" statements should be used instead of chained \"if\" statements", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6511", 18 | "sqKey": "S6511", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6512.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Getter and setter pattern should use property getters and setters", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Minor", 17 | "ruleSpecification": "RSPEC-6512", 18 | "sqKey": "S6512", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6514.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Delegator pattern should use \"by\" clause", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6514", 18 | "sqKey": "S6514", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6515.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Singleton pattern should use object declarations or expressions", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6515", 18 | "sqKey": "S6515", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6516.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Functional interface implementations should use lambda expressions", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6516", 18 | "sqKey": "S6516", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6517.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Single function interfaces should be functional interfaces", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6517", 18 | "sqKey": "S6517", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6518.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Element access should use indexed access operators", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6518", 18 | "sqKey": "S6518", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6519.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Structural equality tests should use \"\u003d\u003d\" or \"!\u003d\"", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6519", 18 | "sqKey": "S6519", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6524.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Collection should be immutable if contents is not changed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6524", 18 | "sqKey": "S6524", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6526.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Abstract class should be interface", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6526", 18 | "sqKey": "S6526", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6527.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Function chain using \"filter\" should be simplified", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "EFFICIENT" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Minor", 17 | "ruleSpecification": "RSPEC-6527", 18 | "sqKey": "S6527", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6528.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"find\" should be replaced with \"any\", \"none\" or \"contains\"", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Minor", 17 | "ruleSpecification": "RSPEC-6528", 18 | "sqKey": "S6528", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6529.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Expression should be simplified with \"isEmpty\", \"isNotEmpty\" or \"isNullOrEmpty\"", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6529", 18 | "sqKey": "S6529", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6530.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Type casts and type checks that can never succeed should be removed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "LOGICAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6530", 18 | "sqKey": "S6530", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6531.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Redundant type casts should be removed", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6531", 18 | "sqKey": "S6531", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6532.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Check for preconditions should be simplified", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6532", 18 | "sqKey": "S6532", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6558.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"It\" shouldn\u0027t be used as a lambda parameter name", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6558", 18 | "sqKey": "S6558", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6611.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"Map\" values should be accessed safely", 3 | "type": "BUG", 4 | "code": { 5 | "impacts": { 6 | "RELIABILITY": "MEDIUM" 7 | }, 8 | "attribute": "COMPLETE" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6611", 18 | "sqKey": "S6611", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6615.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Variables assigned values should be read", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6615", 18 | "sqKey": "S6615", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6619.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Null checks should be useful", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [], 16 | "defaultSeverity": "Major", 17 | "ruleSpecification": "RSPEC-6619", 18 | "sqKey": "S6619", 19 | "scope": "All", 20 | "quickfix": "unknown" 21 | } 22 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6623.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"tasks.register()\" should be preferred over \"tasks.create()\"", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "EFFICIENT" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "gradle" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6623", 20 | "sqKey": "S6623", 21 | "scope": "Main", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6624.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Dependency versions shouldn\u0027t be hard-coded", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "gradle" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6624", 20 | "sqKey": "S6624", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6625.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "\"rootProject.name\" should always be present in Gradle settings", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "gradle" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6625", 20 | "sqKey": "S6625", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6626.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Tasks should define \"description\" and \"group\"", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "gradle" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6626", 20 | "sqKey": "S6626", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6629.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Dependencies should be grouped by destination", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "gradle" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6629", 20 | "sqKey": "S6629", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6631.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Gradle settings file should always be present", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "MEDIUM" 7 | }, 8 | "attribute": "CONVENTIONAL" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "gradle" 17 | ], 18 | "defaultSeverity": "Major", 19 | "ruleSpecification": "RSPEC-6631", 20 | "sqKey": "S6631", 21 | "scope": "All", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6634.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Core plugins IDs should be replaced by their shortcuts", 3 | "type": "CODE_SMELL", 4 | "code": { 5 | "impacts": { 6 | "MAINTAINABILITY": "LOW" 7 | }, 8 | "attribute": "CLEAR" 9 | }, 10 | "status": "ready", 11 | "remediation": { 12 | "func": "Constant\/Issue", 13 | "constantCost": "5min" 14 | }, 15 | "tags": [ 16 | "gradle" 17 | ], 18 | "defaultSeverity": "Minor", 19 | "ruleSpecification": "RSPEC-6634", 20 | "sqKey": "S6634", 21 | "scope": "Main", 22 | "quickfix": "unknown" 23 | } 24 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/test/resources/caching/DummyFile.kt: -------------------------------------------------------------------------------- 1 | package caching 2 | 3 | class DummyFile { 4 | fun hey() { 5 | println("Hey!") 6 | } 7 | } -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/test/resources/caching/DummyFileChanged.kt: -------------------------------------------------------------------------------- 1 | package caching 2 | 3 | class DummyFileChanged { 4 | fun hey() { 5 | println("Hey there!") 6 | } 7 | } -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/test/resources/cpd/MyFile.kt: -------------------------------------------------------------------------------- 1 | package cpd 2 | 3 | class MyFile { 4 | fun greet(name: String) = "Hello, ${name}!" 5 | } -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/test/resources/excluded/script.kts: -------------------------------------------------------------------------------- 1 | @file:Repository("https://jcenter.bintray.com") 2 | @file:DependsOn("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.11") 3 | 4 | import kotlinx.html.* 5 | import kotlinx.html.stream.* 6 | 7 | print(createHTML().html { 8 | body { 9 | h1 { +"Hello, World!" } 10 | } 11 | }) 12 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/test/resources/org/sonar/l10n/kotlin/rules/kotlin/DummyRule.html: -------------------------------------------------------------------------------- 1 | Dummy Description 2 | -------------------------------------------------------------------------------- /sonar-kotlin-plugin/src/test/resources/org/sonar/l10n/kotlin/rules/kotlin/DummyRule.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Dummy Rule", 3 | "type": "CODE_SMELL", 4 | "status": "ready", 5 | "defaultSeverity": "Minor", 6 | "sqKey": "S0", 7 | } 8 | -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/KotlinSurefireSensorTest/roundingTests/TEST-Rounding.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/KotlinSurefireSensorTest/shouldHandleTestSuiteDetails/ExtensionsFinderTest2-expected-result.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/KotlinSurefireSensorTest/shouldHandleTestSuiteDetails/ExtensionsFinderTest3-expected-result.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireParserTest/innerClassExtraFile/TEST-com.example.project.CalculatorTests$NestedClass.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireParserTest/noReports/hack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SonarSource/sonar-kotlin/3dff5f67bf31d94d310640adb333d64716464ca6/sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireParserTest/noReports/hack -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireParserTest/unparsable/TEST-FooTest.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SonarSource/sonar-kotlin/3dff5f67bf31d94d310640adb333d64716464ca6/sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireParserTest/unparsable/TEST-FooTest.xml -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireUtilsTest/shouldGetReportsPathFromDeprecatedProperty/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | fake.group 5 | fake.artifactId 6 | jar 7 | 1.0-SNAPSHOT 8 | 9 | -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireUtilsTest/shouldGetReportsPathFromProperty/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | fake.group 5 | fake.artifactId 6 | jar 7 | 1.0-SNAPSHOT 8 | 9 | -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireUtilsTest/shouldGetReportsPathFromProperty/submodule/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | fake.group 5 | fake.artifactId 6 | jar 7 | 1.0-SNAPSHOT 8 | 9 | -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireUtilsTest/shouldGetReportsPathFromProperty/submodule/target/surefire/hack.txt: -------------------------------------------------------------------------------- 1 | hack for maven in order the directory target/surefire to be included in unit tests classpath -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/api/SurefireUtilsTest/shouldGetReportsPathFromProperty/target/surefire/hack.txt: -------------------------------------------------------------------------------- 1 | hack for maven in order the directory target/surefire to be included in unit tests classpath -------------------------------------------------------------------------------- /sonar-kotlin-surefire/src/test/resources/org/sonarsource/kotlin/surefire/data/SurefireStaxHandlerTest/TEST-#29.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /utils-kotlin/src/test/resources/android-lint-help-with-invalid-issue.txt: -------------------------------------------------------------------------------- 1 | Available issues: 2 | 3 | Correctness 4 | =========== 5 | 6 | AdapterViewChildren 7 | ------------------- 8 | NotASummary: AdapterView cannot have children in XML 9 | 10 | Priority: 10 / 10 11 | Severity: Warning 12 | Category: Correctness 13 | 14 | An AdapterView such as a `ListView`s must be configured with data from Java 15 | code, such as a ListAdapter. 16 | 17 | More information: 18 | https://developer.android.com/reference/android/widget/AdapterView.html 19 | 20 | -------------------------------------------------------------------------------- /utils-kotlin/src/test/resources/invalid-android-lint-help.txt: -------------------------------------------------------------------------------- 1 | Correctness 2 | =========== 3 | 4 | AdapterViewChildren 5 | ------------------- 6 | Summary: AdapterView cannot have children in XML 7 | 8 | Priority: 10 / 10 9 | Severity: Warning 10 | Category: Correctness 11 | 12 | An AdapterView such as a `ListView`s must be configured with data from Java 13 | code, such as a ListAdapter. 14 | 15 | More information: 16 | https://developer.android.com/reference/android/widget/AdapterView.html 17 | 18 | --------------------------------------------------------------------------------