override fun visitClass()

in code_inspection_qodana/code_inspection/src/main/kotlin/org/intellij/sdk/codeInspection/ServicePackageClassNameInspection.kt [18:28]


            override fun visitClass(klass: KtClass) {
                val classNamePsi = klass.nameIdentifier ?: return
                val classFqn = klass.fqName ?: return
                if (klass.packageLastComponent == "service" && !classFqn.asString().endsWith("Service")) {
                    holder.registerProblem(
                        classNamePsi,
                        "Class name in the 'service' package must have a 'Service' suffix",
                        ProblemHighlightType.GENERIC_ERROR_OR_WARNING
                    )
                }
            }