Skip to content

Consider include a source-free or otherwise-stripped XML tree with get_source_expressions() #2968

@MichaelChirico

Description

@MichaelChirico

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions