Rule java:S1197 (and probably variants in other languages) says to attach brackets to the type rather than the identifier, e.g., use “
Foo bar;” rather than “
The textRange dict returned using the web_api (e.g., issues/search) gives the range of only the actual brackets (so textrange.endOffset == textrange.startOffset+1 ALWAYS, assuming no space between the brackets. So in the example above, startOffset is the index of the [ and endOffset is the index of the ]. It would be more useful, for scripting purposes, to have the entire string included, e.g., startOffset is the index of the F and endOffset is the index of the ].