As a general thought for the future: would it be terrible for performance to add a new xml_parsed_content_nocomments elements in the output of get_source_expression()? To avoid the gymnastics in each individual linter.
Originally posted by @Bisaloo in #2901 (review)
Having to remember whether to strip out comments is a pain. What's the right way to fix this in get_souce_expressions()? My memory is keep.source=TRUE is required for getParseData() to work, and anyway fully stripping out all line+column info in addition to COMMENT nodes is probably a step too far for the task of skipping over comments.