You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
➤ `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.
53
53
54
54
As another example, this query finds all annotation types that only have a single annotation element, which has name ``value``:
55
55
@@ -64,7 +64,7 @@ As another example, this query finds all annotation types that only have a singl
64
64
)
65
65
select anntp
66
66
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/>`__.
@@ -122,7 +122,7 @@ This makes it very easy to write our query for finding methods that override ano
122
122
not overriding.getAnAnnotation() instanceof OverrideAnnotation
123
123
select overriding, "Method overrides another method, but does not have an @Override annotation."
124
124
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.
126
126
127
127
Example: Finding calls to deprecated methods
128
128
--------------------------------------------
@@ -192,13 +192,13 @@ For instance, consider this slightly updated example:
192
192
.. code-block:: java
193
193
194
194
classA {
195
-
@Deprecatedvoidm() {}
195
+
@Deprecatedvoidm() {}
196
196
197
-
@Deprecatedvoidn() {
198
-
m();
199
-
}
197
+
@Deprecatedvoidn() {
198
+
m();
199
+
}
200
200
201
-
@SuppressWarnings("deprecated")
201
+
@SuppressWarnings("deprecated")
202
202
voidr() {
203
203
m();
204
204
}
@@ -235,7 +235,7 @@ Now we can extend our query to filter out calls in methods carrying a ``Suppress
235
235
and not call.getCaller().getAnAnnotation() instanceof SuppressDeprecationWarningAnnotation
236
236
select call, "This call invokes a deprecated method."
237
237
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.
0 commit comments