Skip to content

Commit

Permalink
If suppress marker is null, don't check for suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
gwilymatgearset committed Feb 12, 2020
1 parent 28ce8f6 commit bcf1c88
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -357,13 +357,15 @@ private static CommentInformation extractInformationFromComments(String source,
Token token = lexer.nextToken();
int endIndex = lexer.getCharIndex();

boolean checkForCommentSuppression = suppressMarker != null;

while (token.getType() != Token.EOF) {
if (token.getType() == ApexLexer.BLOCK_COMMENT) {
// Filter only block comments starting with "/**"
if (token.getText().startsWith("/**")) {
tokenLocations.add(new ApexDocTokenLocation(startIndex, token));
}
} else if (token.getType() == ApexLexer.EOL_COMMENT) {
} else if (checkForCommentSuppression && token.getType() == ApexLexer.EOL_COMMENT) {
// check if it starts with the suppress marker
String trimmedCommentText = token.getText().substring(2).trim();

Expand Down

0 comments on commit bcf1c88

Please sign in to comment.