Skip to content

Commit ab24566

Browse files
committed
Update query console links in annotations.rst
Removes 'eclipse-cdt/cdt' and 'gradle/gradle' from the queried projects because they cannot be queried currently, and instead queries all demo projects which are currently available.
1 parent 13ffd73 commit ab24566

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/language/learn-ql/java/annotations.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ We could then write this query to find all ``@SuppressWarnings`` annotations att
4949
anntp.hasQualifiedName("java.lang", "SuppressWarnings")
5050
select ann, ann.getValue("value")
5151
52-
➤ `See the full query in the query console on LGTM.com <https://lgtm.com/query/632150601>`__. Several of the LGTM.com demo projects use the ``@SuppressWarnings`` annotation. Looking at the ``value``\ s of the annotation element returned by the query, we can see that the *apache/activemq* project uses the ``"rawtypes"`` value described above.
52+
➤ `See the full query in the query console on LGTM.com <https://lgtm.com/query/1775658606775222283/>`__. Several of the LGTM.com demo projects use the ``@SuppressWarnings`` annotation. Looking at the ``value``\ s of the annotation element returned by the query, we can see that the *apache/activemq* project uses the ``"rawtypes"`` value described above.
5353

5454
As another example, this query finds all annotation types that only have a single annotation element, which has name ``value``:
5555

@@ -64,7 +64,7 @@ As another example, this query finds all annotation types that only have a singl
6464
)
6565
select anntp
6666
67-
➤ `See the full query in the query console on LGTM.com <https://lgtm.com/query/669220001>`__.
67+
➤ `See the full query in the query console on LGTM.com <https://lgtm.com/query/2145264152490258283/>`__.
6868

6969
Example: Finding missing ``@Override`` annotations
7070
--------------------------------------------------
@@ -122,7 +122,7 @@ This makes it very easy to write our query for finding methods that override ano
122122
not overriding.getAnAnnotation() instanceof OverrideAnnotation
123123
select overriding, "Method overrides another method, but does not have an @Override annotation."
124124
125-
➤ `See this in the query console on LGTM.com <https://lgtm.com/query/1505752756202/>`__. In practice, this query may yield many results from compiled library code, which aren't very interesting. It's therefore a good idea to add another conjunct ``overriding.fromSource()`` to restrict the result to only report methods for which source code is available.
125+
➤ `See this in the query console on LGTM.com <https://lgtm.com/query/7419756266089837339/>`__. In practice, this query may yield many results from compiled library code, which aren't very interesting. It's therefore a good idea to add another conjunct ``overriding.fromSource()`` to restrict the result to only report methods for which source code is available.
126126

127127
Example: Finding calls to deprecated methods
128128
--------------------------------------------
@@ -192,13 +192,13 @@ For instance, consider this slightly updated example:
192192
.. code-block:: java
193193
194194
class A {
195-
@Deprecated void m() {}
195+
@Deprecated void m() {}
196196
197-
@Deprecated void n() {
198-
m();
199-
}
197+
@Deprecated void n() {
198+
m();
199+
}
200200
201-
@SuppressWarnings("deprecated")
201+
@SuppressWarnings("deprecated")
202202
void r() {
203203
m();
204204
}
@@ -235,7 +235,7 @@ Now we can extend our query to filter out calls in methods carrying a ``Suppress
235235
and not call.getCaller().getAnAnnotation() instanceof SuppressDeprecationWarningAnnotation
236236
select call, "This call invokes a deprecated method."
237237
238-
➤ `See this in the query console on LGTM.com <https://lgtm.com/query/665760001>`__. It's fairly common for projects to contain calls to methods that appear to be deprecated.
238+
➤ `See this in the query console on LGTM.com <https://lgtm.com/query/8706367340403790260/>`__. It's fairly common for projects to contain calls to methods that appear to be deprecated.
239239

240240
Further reading
241241
---------------

0 commit comments

Comments
 (0)