├── .gitignore ├── LICENSE ├── README.md ├── build.gradle.kts ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── renovate.json ├── settings.gradle.kts └── src └── main ├── java └── dev │ └── rollczi │ └── litecommands │ └── intellijplugin │ ├── annotation │ ├── AnnotationFactory.java │ └── AnnotationHolder.java │ ├── api │ ├── Argument.java │ ├── CommandNode.java │ ├── ExecutorNode.java │ ├── Node.java │ ├── PermissionEntry.java │ ├── PermissionsDefinition.java │ ├── PermissionsOwner.java │ └── psijava │ │ ├── PsiJavaAbstractNode.java │ │ ├── PsiJavaArgument.java │ │ ├── PsiJavaCommandNode.java │ │ ├── PsiJavaExecutorNode.java │ │ ├── PsiJavaPermissionEntry.java │ │ └── PsiJavaPermissionsDefinition.java │ ├── icon │ └── LiteIcons.java │ ├── inlay │ ├── InlayHintsConfigurable.java │ ├── InlayHintsIconPresentation.java │ ├── InlayPopupNewActions.java │ ├── LiteInlayHints.java │ ├── LiteInlayHintsCollector.java │ └── ref │ │ ├── ArgumentPsiReferenceProvider.java │ │ ├── LitePsiReferenceContributor.java │ │ └── SimpleReference.java │ ├── inspection │ ├── LiteInspection.java │ ├── LiteInspectionProvider.java │ ├── annotation │ │ └── LiteNullabilityAnnotationPackage.java │ ├── executor │ │ └── ExecutorNotAnnotatedParameterInspection.java │ ├── mapper │ │ ├── AnnotationMapper.java │ │ ├── AnnotationMapperAttributeSchema.java │ │ ├── AnnotationMapperSchema.java │ │ ├── AnnotationReplaceQuickFix.java │ │ ├── AnnotationVisitor.java │ │ ├── Attribute.java │ │ ├── AttributeType.java │ │ ├── AttributeValue.java │ │ ├── LegacyAnnotationInspectionTool.java │ │ ├── ReplaceWithValidValueQuickFix.java │ │ ├── ValidationAnnotationInspectionTool.java │ │ ├── legacy │ │ │ ├── LegacyArgInspection.java │ │ │ ├── LegacyExecuteInspection.java │ │ │ ├── LegacyJoinInspection.java │ │ │ ├── LegacyPermissionInspection.java │ │ │ ├── LegacyRouteInspection.java │ │ │ └── LegacySectionInspection.java │ │ └── validation │ │ │ ├── CommandNameValidUtils.java │ │ │ ├── CommandValidationInspection.java │ │ │ ├── ExecuteValidationInspection.java │ │ │ ├── RouteQuickFix.java │ │ │ ├── ShortcutValidationInspection.java │ │ │ └── SingleRouteQuickFix.java │ └── parameter │ │ ├── LiteralAnnotationInspection.java │ │ ├── ParameterMixedAnnotationsInspection.java │ │ ├── ParameterNullableOptionalPrimitiveInspection.java │ │ ├── ParameterNullableOptionalWrappedInspection.java │ │ └── VarargsAnnotationInspection.java │ ├── marker │ ├── LiteLineMarkerDescriptor.java │ ├── LiteLineMarkerInfo.java │ ├── command │ │ ├── AddButton.java │ │ ├── CommandComponent.java │ │ ├── CommandMarker.java │ │ ├── EditButton.java │ │ ├── ExecutorsComponent.java │ │ ├── PermissionsComponent.java │ │ └── dialog │ │ │ ├── EditDialog.java │ │ │ ├── EditDialogPanel.java │ │ │ └── TextReference.java │ ├── executor │ │ ├── ExecutorComponent.java │ │ └── ExecutorMarker.java │ └── ui │ │ └── ExecutorBadgeFactory.java │ ├── navigatable │ └── NavigatableReference.java │ ├── popup │ └── LitePopupFactory.java │ ├── quickfix │ ├── ChangeParameterTypeQuickFix.java │ ├── ReplaceQuickFix.java │ └── WrapParameterTypeQuickFix.java │ ├── settings │ ├── LiteCommandsConfigurable.java │ ├── LiteCommandsSettings.java │ └── LiteSettingsBox.java │ ├── suppressor │ ├── ClassUnusedInspectSuppressor.java │ ├── ConstructorUnusedInspectSuppressor.java │ ├── ExecutorUnusedInspectSuppressor.java │ ├── NullableProblemsPrimitiveSuppressor.java │ ├── OptionalArgumentSuppressor.java │ └── SuppressUtils.java │ ├── table │ ├── LiteTableView.java │ ├── LiteToolbarDecorator.java │ └── TextColumnInfo.java │ ├── template │ └── LiteCommandsTemplatesAction.java │ ├── ui │ ├── LiteActionBadge.java │ ├── LiteArc.java │ ├── LiteBadge.java │ ├── LiteBox.java │ ├── LiteColors.java │ ├── LiteComponent.java │ ├── LiteMargin.java │ └── LiteTitledSeparator.java │ ├── usage │ ├── Usage.java │ ├── UsageActionHandler.java │ ├── UsageFindUsagesDialog.java │ ├── UsageProvider.java │ └── UsageService.java │ └── util │ ├── HighlightUtil.java │ ├── IdeaEmptyTask.java │ ├── IdeaTask.java │ ├── IdeaTaskType.java │ ├── LiteAnnotationChecks.java │ ├── LiteTypeChecks.java │ ├── LiteTypeSearcher.java │ ├── PsiAnnotationUtil.java │ ├── PsiImportUtil.java │ ├── PsiPrimitiveUtil.java │ └── PsiValue.java └── resources ├── META-INF ├── plugin.xml └── pluginIcon.svg ├── assets └── icons │ ├── expUi │ ├── application.svg │ ├── applicationRemote.svg │ ├── applicationRemote_dark.svg │ ├── application_dark.svg │ ├── columnGoldKey.svg │ ├── columnGoldKeyDotIndex.svg │ ├── columnGoldKeyDotIndex_dark.svg │ ├── columnGoldKey_dark.svg │ ├── frame.svg │ ├── frame_dark.svg │ ├── goldKey.svg │ ├── goldKey_dark.svg │ ├── groupByModule.svg │ ├── groupByModule_dark.svg │ ├── inlayRenameInComments.svg │ ├── inlayRenameInCommentsActive.svg │ ├── inlayRenameInCommentsActive_dark.svg │ ├── inlayRenameInComments_dark.svg │ ├── mongoFieldGoldKey.svg │ ├── mongoFieldGoldKey_dark.svg │ ├── ocdRunConfiguration.svg │ ├── ocdRunConfiguration_dark.svg │ ├── runParatest.svg │ ├── runParatest_dark.svg │ ├── showCurrentFrame.svg │ └── showCurrentFrame_dark.svg │ ├── litecommandsIcon_class.svg │ ├── litecommandsIcon_class_dark.svg │ ├── litecommandsIcon_class_root.svg │ ├── litecommandsIcon_class_root_dark.svg │ ├── litecommandsIcon_kotlin_class.svg │ ├── litecommandsIcon_kotlin_class_dark.svg │ ├── litecommandsIcon_kotlin_root_class.svg │ ├── litecommandsIcon_kotlin_root_class_dark.svg │ └── litecommandsLogo.svg ├── fileTemplates └── internal │ ├── LiteCommands Command Java.java.ft │ ├── LiteCommands Command Kotlin.kt.ft │ ├── LiteCommands Root Command Java.java.ft │ └── LiteCommands Root Command Kotlin.kt.ft ├── inspectionDescriptions ├── ExecuteValidation.html ├── ExecutorNotAnnotatedParameter.html ├── LegacyArg.html ├── LegacyExecute.html ├── LegacyJoin.html ├── LegacyPermission.html ├── LegacyRoute.html ├── LegacySection.html ├── LiteralAnnotation.html ├── ParameterMixedAnnotations.html ├── ParameterNullableOptionalPrimitive.html ├── ParameterNullableOptionalWrapped.html ├── ParameterOptionalIsPrimitive.html ├── RouteValidation.html └── VarargsAnnotation.html └── messages └── LiteCommandsBundle.properties /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | build 3 | .idea 4 | .intellijPlatform 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |
5 | Reports when attributes route
or aliases
are invalid.
6 | For example, when route or aliases are defined, but string is empty.
7 |
9 | Examples of valid values: 10 |
11 | 12 |@Execute(route = "add")
@Execute(route = "add user")
@Execute(route = "add user", aliases = "add u")
@Execute(route = "add user", aliases = { "add u", "sub -u" })
@Execute(route = "add user parent")
21 | Examples of invalid values: 22 |
23 |@Execute(route = "")
@Execute(route = "add", aliases = "")
@Execute(route = "add ")
@Execute(route = " add")
@Execute(route = " add ")
@Execute(route = "add", aliases = " ")
@Execute(route = " ", aliases = "add")
@Execute(route = "add user")
5 | Reports when parameter of executor method is not annotated with e.g.
6 | @Arg
,
7 | @Join
,
8 | @Flag
,
9 | @Context
or
10 | @Bind
11 |
5 | Reports all usages of @Route annotation in the project. 6 |
7 |9 | Replace: 10 |
11 |
12 | @Route(name = "name", aliases = { "other", "more" })
13 |
15 | to: 16 |
17 |
18 | @Command(name = "name", aliases = { "other", "more" })
19 |
5 | Reports all usages of @Section annotation in the project. 6 |
7 |9 | Replace: 10 |
11 |
12 | @Section(route = "name", aliases = { "other", "more" })
13 |
15 | to: 16 |
17 |
18 | @Route(name = "name", aliases = { "other", "more" })
19 |
5 | Reports when @Literal annotation is used on a type other than String. 6 |
7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/inspectionDescriptions/ParameterMixedAnnotations.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Mixed annotations. 4 |5 | Reports when method parameter has mixed requirement annotations. 6 |
7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/inspectionDescriptions/ParameterNullableOptionalPrimitive.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Optional argument should not be primitive type. 4 |5 | Reports when optional argument is primitive type. 6 |
7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/inspectionDescriptions/ParameterNullableOptionalWrapped.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Nullable argument should not be Optional. 4 |5 | Reports when nullable argument is Optional. 6 |
7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/inspectionDescriptions/ParameterOptionalIsPrimitive.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Optional argument should not be primitive type. 4 |5 | Reports when optional argument is primitive type. 6 |
7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/inspectionDescriptions/RouteValidation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Invalid usage of @Route annotation. 4 |
5 | Reports when attributes name
or aliases
are invalid.
6 | For example, when name or aliases are defined, but string is empty.
7 |
10 | Examples of valid values: 11 |
12 | 13 |@Route(name = "add")
@Route(name = "add user")
@Route(name = "add user", aliases = "add u")
@Route(name = "add user", aliases = { "add u", "sub -u" })
@Route(name = "add user parent")
22 | Examples of invalid values: 23 |
24 | 25 |@Route(name = "")
@Route(name = "add", aliases = "")
@Route(name = "add ")
@Route(name = " add")
@Route(name = " add ")
@Route(name = "add", aliases = " ")
@Route(name = " ", aliases = "add")
@Route(name = "add user")
5 | Reports when varargs parameter is not a collection type. 6 |
7 |8 | Examples of valid values: 9 |
10 |public void method(@Varargs String... args) { }
public void method(@Varargs String[] args) { }
public void method(@Varargs List<String> args) { }
public void method(@Varargs Set<String> args) { }
public void method(@Varargs Collection<String> args) { }
18 | Examples of invalid values: 19 |
20 |public void method(@Varargs String args) { }
public void method(@Varargs Integer args) { }
public void method(@Varargs int args) { }