mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[groovy] inspection descriptions
ChangeToMethod ChangeToOperator ClashingGetters ClashingTraitMethods DelegatesTo GrAnnotationReferencingUnknownIdentifiers GitOrigin-RevId: fd1d8b8e6e6615f1ecc930b85eb77b5f20a7f28a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
366c4967e6
commit
9698ba64a0
@@ -1,12 +1,13 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>Reports operator invocations that can be replaced with method calls, for example:</p>
|
||||
Reports operator invocations that can be replaced with method calls.
|
||||
<p><b>Example:</b></p>
|
||||
<pre><code>
|
||||
a + b
|
||||
a + b
|
||||
</code></pre>
|
||||
<p>After the quick-fix is applied:</p>
|
||||
<pre><code>
|
||||
a.plus(b)
|
||||
a.plus(b)
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>Reports method calls that can be replaced with operator invocations, for example:</p>
|
||||
Reports method calls that can be replaced with operator invocations.
|
||||
<p><b>Example:</b></p>
|
||||
<pre><code>
|
||||
a.plus(b)
|
||||
a.plus(b)
|
||||
</code></pre>
|
||||
<p>After the quick-fix is applied:</p>
|
||||
<pre><code>
|
||||
a + b
|
||||
a + b
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>Reports boolean methods which can be accessed via the same property name. The result of accessing such property might be unexpected.</p>
|
||||
<p>Example:</p>
|
||||
Reports boolean methods which can be accessed via the same property name.
|
||||
<p>The result of accessing such property might be unexpected.</p>
|
||||
<p><b>Example:</b></p>
|
||||
<pre><code>
|
||||
class X {
|
||||
boolean isFoo() { true }
|
||||
boolean getFoo() { false }
|
||||
}
|
||||
class X {
|
||||
boolean isFoo() { true }
|
||||
boolean getFoo() { false }
|
||||
}
|
||||
|
||||
new X().foo // getFoo() will be called
|
||||
// getFoo() will be called
|
||||
new X().foo
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>Reports classes which implement two or more traits which contain methods with same signatures. The result of calling such methods might be unexpected.</p>
|
||||
Reports classes which implement two or more traits which contain methods with same signatures.
|
||||
<p>The result of calling such methods might be unexpected.</p>
|
||||
<p>The quick-fix adds an explicit overriding method.</p>
|
||||
<p>Example:</p>
|
||||
<p><b>Example:</b></p>
|
||||
<pre><code>
|
||||
trait T1 {
|
||||
def foo() {}
|
||||
}
|
||||
trait T1 {
|
||||
def foo() {}
|
||||
}
|
||||
|
||||
trait T2 {
|
||||
def foo() {}
|
||||
}
|
||||
trait T2 {
|
||||
def foo() {}
|
||||
}
|
||||
|
||||
class X implements T1, T2 {}
|
||||
class X implements T1, T2 {}
|
||||
|
||||
new X().foo() // T2.foo() will be called
|
||||
// T2.foo() will be called
|
||||
new X().foo()
|
||||
</code></pre>
|
||||
<p>After the quick-fix is applied:</p>
|
||||
<pre><code>
|
||||
class X implements T1, T2 {
|
||||
@Override
|
||||
Object foo() {
|
||||
return T2.super.foo()
|
||||
}
|
||||
}
|
||||
class X implements T1, T2 {
|
||||
@Override
|
||||
Object foo() {
|
||||
return T2.super.foo()
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>Reports unused <code>@DelegatesTo.Target</code> annotations and unresolved <code>@DelegatedTo.target</code> attribute values, for example:</p>
|
||||
Reports unused <code>@DelegatesTo.Target</code> annotations and unresolved <code>@DelegatedTo.target</code> annotation attribute values.
|
||||
<p><b>Example:</b></p>
|
||||
<pre><code>
|
||||
// unused target 't1' and unresolved target 't2'
|
||||
def m(
|
||||
@DelegatesTo.Target('t1') target,
|
||||
@DelegatesTo(target = 't2') Closure c
|
||||
) {}
|
||||
// unused target 't1' and unresolved target 't2'
|
||||
def m(
|
||||
@DelegatesTo.Target('t1') target,
|
||||
@DelegatesTo(target = 't2') Closure c
|
||||
) {}
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>Reports unresolved identifiers in <code>@TupleConstructor</code> and <code>@MapConstructor</code> <code>includes</code> and <code>excludes</code> attribute values, for example:</p>
|
||||
Reports unresolved identifiers in <code>@TupleConstructor</code> and <code>@MapConstructor</code>
|
||||
<code>includes</code> and <code>excludes</code> annotation attribute values.
|
||||
<p><b>Example:</b></p>
|
||||
<pre><code>
|
||||
// unresolved 'c'
|
||||
@TupleConstructor(includes = ['a', 'b', 'c'])
|
||||
class X {
|
||||
def a
|
||||
def b
|
||||
}
|
||||
// unresolved 'c'
|
||||
@TupleConstructor(includes = ['a', 'b', 'c'])
|
||||
class X {
|
||||
def a
|
||||
def b
|
||||
}
|
||||
</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user