boolean (GenericAttributeValue<String> nameAttrValue) { if (!nameAttrValue.exists()) { return true; } @NonNls String name = nameAttrValue.getValue(); // skip some known offenders in IJ project if (name != null && (StringUtil.startsWith(name, "Pythonid.") || StringUtil.startsWith(name, "DevKit.")) // NON-NLS && PsiUtil.isIdeaProject(nameAttrValue.getManager().getProject())) { return true; } if (StringUtil.isEmpty(name) || !Character.isLowerCase(name.charAt(0)) || // also checks that the name doesn't start with a dot StringUtil.toUpperCase(name).equals(name) || // not all uppercase chars !StringUtil.isLatinAlphanumeric(name.replace(".", "")) || name.charAt(name.length() - 1) == '.') { return false; } List<String> fragments = StringUtil.split(name, "."); if (ContainerUtil.exists(fragments, f -> Character.isUpperCase(f.charAt(0)))) { return false; } String epName = fragments.get(fragments.size() - 1); List<String> butlast = fragments.subList(0, fragments.size() - 1); List<String> words = StringUtil.getWordsIn(epName); return !ContainerUtil.exists(words, w -> ContainerUtil.exists(butlast, f -> StringUtil.equalsIgnoreCase(w, f))); }