mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Java: allow to suppress inspection using @SuppressWarnings("module") that javac understands (IDEA-357459)
for "Java module name contradicts the convention" inspection GitOrigin-RevId: bb1a350e601ec93f4c54c1fef096d3d771ec9617
This commit is contained in:
committed by
intellij-monorepo-bot
parent
73f4a3ae08
commit
e94aebcbf7
@@ -87,9 +87,9 @@
|
||||
<applicationService serviceInterface="com.intellij.codeInspection.SuppressManager"
|
||||
serviceImplementation="com.intellij.codeInspection.SuppressManagerImpl"/>
|
||||
<annotator language="JAVA" implementationClass="com.intellij.codeInsight.daemon.impl.JavaDocAnnotator"/>
|
||||
<localInspection language="JAVA" shortName="JavaModuleNaming" enabledByDefault="true" level="WARNING"
|
||||
groupPath="Java" groupBundle="messages.InspectionsBundle" groupKey="group.names.naming.conventions"
|
||||
bundle="messages.JavaAnalysisBundle" key="inspection.java.module.naming"
|
||||
<localInspection language="JAVA" shortName="JavaModuleNaming" suppressId="module" alternativeId="JavaModuleNaming"
|
||||
enabledByDefault="true" level="WARNING" groupPath="Java" groupBundle="messages.InspectionsBundle"
|
||||
groupKey="group.names.naming.conventions" bundle="messages.JavaAnalysisBundle" key="inspection.java.module.naming"
|
||||
implementationClass="com.intellij.codeInspection.java19modules.JavaModuleNamingInspection"/>
|
||||
<localInspection language="JAVA" shortName="JavaModuleDefinition" enabledByDefault="true" level="WARNING"
|
||||
groupPath="Java" groupBundle="messages.InspectionsBundle" groupKey="group.names.declaration.redundancy"
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.java.codeInspection
|
||||
|
||||
import com.intellij.codeInspection.java19modules.JavaModuleNamingInspection
|
||||
@@ -25,6 +11,7 @@ class JavaModuleNamingTest : LightJava9ModulesCodeInsightFixtureTestCase() {
|
||||
}
|
||||
|
||||
fun testSimple() = highlighting("""module <warning descr="Module name component 'foo1' should avoid terminal digits">foo1</warning>.bar { }""")
|
||||
fun testSuppress() = highlighting("""@SuppressWarnings("module") module foo1.bar { }""")
|
||||
fun testDevanagariDigitsAreBannedToo() = highlighting("""module <warning descr="Module name component 'foo१' should avoid terminal digits">foo१</warning>.bar { }""")
|
||||
fun testMiddleDigitsAllowed() = highlighting("""module f0o.b4r { }""")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user