[devkit] mark inspections as Cleanup Tool

(UseGrayInspection, UseJBColorInspection, UseDPIAwareInsetsInspection, UseDPIAwareEmptyBorderInspection, UseCoupleInspection, UseVirtualFileEqualsInspection, UsePluginIdEqualsInspection, UsePrimitiveTypesEqualsInspection, PsiElementConcatenationInspection)

GitOrigin-RevId: 458d461b8b322fb91ea779170c7eebcd2915da37
This commit is contained in:
Yann Cébron
2023-01-12 17:16:25 +00:00
committed by intellij-monorepo-bot
parent e20ebbacef
commit 573f7f3268
7 changed files with 27 additions and 25 deletions
@@ -106,7 +106,7 @@
key="inspection.inspection.description.not.found.inspection.display.name"/>
<localInspection language="UAST" shortName="InspectionUsingGrayColors"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="true" level="WARNING"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.UseGrayInspection"
key="inspection.inspection.using.gray.colors.display.name"/>
<localInspection language="UAST" shortName="UnspecifiedActionsPlace"
@@ -154,33 +154,33 @@
key="inspection.unsafe.vfs.recursion.display.name"/>
<localInspection language="UAST" shortName="UseJBColor"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="true" level="WARNING"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.internal.UseJBColorInspection"
key="inspection.use.JB.color.display.name"/>
<localInspection language="UAST" shortName="UseDPIAwareInsets"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="true" level="WARNING"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.internal.UseDPIAwareInsetsInspection"
key="inspection.use.DPI.aware.insets.display.name"/>
<localInspection language="UAST" shortName="UseDPIAwareBorders"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="true" level="WARNING"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.internal.UseDPIAwareEmptyBorderInspection"
key="inspection.use.DPI.aware.borders.display.name"/>
<localInspection language="UAST" shortName="UseCouple"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="false" level="WARNING"
enabledByDefault="false" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.internal.UseCoupleInspection"
key="inspection.use.couple.display.name"/>
<!--suppress PluginXmlCapitalization -->
<localInspection language="UAST" shortName="UseVirtualFileEquals"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="true" level="WARNING"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.internal.UseVirtualFileEqualsInspection"
key="inspection.use.virtual.file.equals.display.name"/>
<localInspection language="UAST" shortName="UsePluginIdEquals"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="true" level="WARNING"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.internal.UsePluginIdEqualsInspection"
key="inspection.use.plugin.id.equals.display.name"/>
<localInspection language="UAST" shortName="UnsafeReturnStatementVisitor"
@@ -200,7 +200,7 @@
key="inspection.u.element.as.psi.display.name"/>
<localInspection language="UAST" shortName="UsePrimitiveTypes"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="true" level="WARNING"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.internal.UsePrimitiveTypesEqualsInspection"
key="inspection.use.primitive.types.equals.display.name"/>
<!--suppress PluginXmlCapitalization -->
@@ -222,7 +222,7 @@
key="inspection.action.is.not.preview.friendly.display.name"/>
<localInspection language="JAVA" shortName="PsiElementConcatenation"
groupPathKey="inspections.group.path" groupKey="inspections.group.code"
enabledByDefault="true" level="WARNING"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="org.jetbrains.idea.devkit.inspections.PsiElementConcatenationInspection"
key="inspection.psi.element.concatenation.display.name"/>
<localInspection language="UAST" shortName="MigrateToOptControl"
@@ -1,10 +1,7 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.inspections;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.*;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.codeStyle.CodeStyleManager;
@@ -23,7 +20,7 @@ import org.jetbrains.idea.devkit.DevKitBundle;
import java.util.HashSet;
import java.util.Set;
public class PsiElementConcatenationInspection extends AbstractBaseJavaLocalInspectionTool {
public class PsiElementConcatenationInspection extends AbstractBaseJavaLocalInspectionTool implements CleanupLocalInspectionTool {
@NotNull
@Override
public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
@@ -1,6 +1,7 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.inspections;
import com.intellij.codeInspection.CleanupLocalInspectionTool;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemsHolder;
@@ -24,7 +25,7 @@ import java.util.List;
/**
* @author Konstantin Bulenkov
*/
public class UseGrayInspection extends DevKitUastInspectionBase {
public class UseGrayInspection extends DevKitUastInspectionBase implements CleanupLocalInspectionTool {
private static final String AWT_COLOR_CLASS_NAME = Color.class.getName();
private static final String GRAY_CLASS_NAME = Gray.class.getName();
@@ -1,6 +1,7 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.inspections.internal;
import com.intellij.codeInspection.CleanupLocalInspectionTool;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemsHolder;
@@ -21,7 +22,7 @@ import org.jetbrains.uast.visitor.AbstractUastNonRecursiveVisitor;
import java.util.ArrayList;
import java.util.List;
abstract class AbstractUseDPIAwareBorderInspection extends DevKitUastInspectionBase {
abstract class AbstractUseDPIAwareBorderInspection extends DevKitUastInspectionBase implements CleanupLocalInspectionTool {
private static final String JB_UI_CLASS_NAME = JBUI.class.getName();
private static final Integer ZERO = Integer.valueOf(0);
@@ -1,6 +1,7 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.inspections.internal;
import com.intellij.codeInspection.CleanupLocalInspectionTool;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemsHolder;
@@ -29,7 +30,7 @@ import java.util.Objects;
/**
* @author Konstantin Bulenkov
*/
public class UseCoupleInspection extends DevKitUastInspectionBase {
public class UseCoupleInspection extends DevKitUastInspectionBase implements CleanupLocalInspectionTool {
private static final String PAIR_CLASS_NAME = Pair.class.getName();
private static final String COUPLE_CLASS_NAME = Couple.class.getName();
@@ -1,6 +1,7 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.inspections.internal;
import com.intellij.codeInspection.CleanupLocalInspectionTool;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemsHolder;
@@ -21,7 +22,7 @@ import org.jetbrains.idea.devkit.inspections.DevKitUastInspectionBase;
import org.jetbrains.uast.*;
import org.jetbrains.uast.visitor.AbstractUastNonRecursiveVisitor;
abstract class UseEqualsInspectionBase extends DevKitUastInspectionBase {
abstract class UseEqualsInspectionBase extends DevKitUastInspectionBase implements CleanupLocalInspectionTool {
@SuppressWarnings("unchecked")
public static final Class<? extends UElement>[] HINTS = new Class[]{UBinaryExpression.class};
@@ -1,6 +1,7 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.inspections.internal;
import com.intellij.codeInspection.CleanupLocalInspectionTool;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemsHolder;
@@ -29,7 +30,7 @@ import java.awt.*;
/**
* @author Konstantin Bulenkov
*/
public class UseJBColorInspection extends DevKitUastInspectionBase {
public class UseJBColorInspection extends DevKitUastInspectionBase implements CleanupLocalInspectionTool {
private static final String AWT_COLOR_CLASS_NAME = Color.class.getName();
private static final String JB_COLOR_CLASS_NAME = JBColor.class.getName();