CodeQL migration: Java topics - change titles & add intros (2164)#2866
CodeQL migration: Java topics - change titles & add intros (2164)#2866hubwriter merged 4 commits intogithub:docs-preparationfrom hubwriter:alistairs-docs-preparation-1
Conversation
That's a good point. When the link text was written, this documentation was embedded in LGTM. Clearly we should have thought to update the text when we moved the documentation out of LGTM. Given that this is used across the entire set of documents, please can you raise an issue. It sounds like we need to decide whether to keep these links and, if so, what the new link text should be. |
|
Your comments on the "Types in Java" and "Expressions and statements in Java" titles - this is a good point and probably also applies to similar topics/titles in Python. Possibly, once we've discussed the content type of these topics with Emily, it may be easier to define a more descriptive title. |
What you say about this topic makes sense. Based on the information in the library overview section "Abstract syntax tree", it sounds as if your second suggestion might be the right answer. That is, add a short conceptual section explaining that these are the CodeQL classes used to model Java statements and expressions. |
felicitymay
left a comment
There was a problem hiding this comment.
Your "small editorial changes" look good to me. It's great to see some of the old passive voice disappearing 😃
A couple of very minor comments. Otherwise the only thing I wanted to mention was that the link text will need to be manually updated at some point, unfortunately Sphinx doesn't handle this 😞
|
|
||
| Overview | ||
| -------- | ||
| When you need to analyze a Java program, you can make use of the large collection of classes in the Java library for CodeQL. |
There was a problem hiding this comment.
Not entire sure about using "need" here, perhaps "want" or simply "When you analyze..."?
|
|
||
| Overview | ||
| -------- | ||
| When you need to analyze a Java program, you can make use of the large collection of classes in the Java library for CodeQL. |
There was a problem hiding this comment.
Java library for CodeQL
I think this needs to be "CodeQL library for Java" because the library is written in CodeQL.
| -------- | ||
| When you need to analyze a Java program, you can make use of the large collection of classes in the Java library for CodeQL. | ||
|
|
||
| About the Java library |
There was a problem hiding this comment.
While it's long winded, I think this also needs to be "the CodeQL library for Java".
| For dealing with generic methods, there are classes ``GenericMethod``, ``ParameterizedMethod`` and ``RawMethod``, which are entirely analogous to the like-named classes for representing generic types. | ||
|
|
||
| More information on working with types can be found in the :doc:`tutorial on types and the class hierarchy <types-class-hierarchy>`. | ||
| For more information on working with types, see the :doc:`tutorial on types and the class hierarchy <types-class-hierarchy>`. |
There was a problem hiding this comment.
Since this topic is no longer called a tutorial, this probably needs to be updated. This is likely to affect other links too.
|
|
||
| Overview | ||
| -------- | ||
| You can use the location of entities within Java code to look for potential errors. Locations allow you to deduce the presence, or absence, of white space which, in some cases, may indicate a problem. |
There was a problem hiding this comment.
The second sentence could perhaps be simplified?
| You can use the location of entities within Java code to look for potential errors. Locations allow you to deduce the presence, or absence, of white space which, in some cases, may indicate a problem. | |
| You can use the location of entities within Java code to look for potential errors. Locations allow you to deduce how white space is used which, in some cases, may indicate a problem. |
There was a problem hiding this comment.
I think the longer version is clearer.
shati-patel
left a comment
There was a problem hiding this comment.
Thanks for improving these topics @hubwriter! This looks good already.
I agree with your comments about the titles. The "AST class reference" is basically a summary of CodeQL classes that let you work with Java statements and expressions. Also, I think your suggestion of "Overflow-prone comparisons in Java" is a much better title than "Expressions and statements" 💯
(And thanks for removing "thus"! 🙈)
| Navigating the call graph | ||
| ========================= | ||
|
|
||
| CodeQL provides an API for identifying code that calls other code, and code that can be called from elsewhere. This allows you to find, for example, methods that are never used. |
There was a problem hiding this comment.
Not something you introduced, but it's a bit odd to talk about an "API" here instead of "library". The CodeQL libraries work as an API for interacting with code, but we don't use this terminology much in the docs. (And in fact we should probably get rid of it entirely to avoid confusion.) The classes/predicates for navigating the call graph are part of the CodeQL library (just like the other classes for working with annotations, locations, Javadoc...)
Perhaps remove "API" from the intro at least? (and possibly from the header and example below - but we can deal with those other mentions separately, including in some other topics: "Location API", "Javadoc API" etc)
|
Created an issue to discuss/decide about text of links to the query console: |
|
@hubwriter this looks pretty good to me. I'd be in favour of merging this (pending approval from @shati-patel and @felicitymay), with a view to having another pass through when the other 'CodeQL for X' PRs have all been completed. What do you think? |
|
@jf205 - thanks, I'm happy to merge this whenever. |
Fair point. Looks like you could just drop that commit before you merge. |
|
@hubwriter: #3035 is now merged, so it looks like you can cleanly merge this PR without dropping |
|
Merging |
product-documentation issue #2164
Summary
This changes the titles of the Java topics in the "Learning" section, and adds intros as the first paragraph.
I've also made some small editorial changes to bring the style a little more in line with GitHub's writing style. However, I haven't made any larger content changes or structural changes.
Changes in this PR
Points needing attention