I am writing some custom SonarQube - Rule in java language. I would like to check the content of methods/classes/etc
First I thought I can get the content in a String format from block().body().toString(), but it was something else.
Then I found that the block().body().get(i).firstToken.text - returns the first word of the “i-th line of that code-block”, and the lastToken.text the last word, which is the “;” sign.
Could you please help me how could I get the whole Line of Code?