Skip to content

finer-tuned handling of ambiguous XML nodes for infix operators - #2115

Merged
MichaelChirico merged 11 commits into
mainfrom
infix-node
Sep 8, 2023
Merged

MichaelChirico merged 11 commits into
mainfrom
infix-node

Conversation

@MichaelChirico

Copy link
Copy Markdown
Collaborator

Towards #1977. This is sort of a breaking change, though it doesn't affect any defaults, but I think the new behavior is much cleaner.

@codecov-commenter

codecov-commenter commented Sep 7, 2023 •

Copy link
Copy Markdown

Codecov Report

Merging #2115 (d83abb4) into main (dd445d8) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head d83abb4 differs from pull request most recent head 0c6ee05. Consider uploading reports for the commit 0c6ee05 to get more accurate results

@@            Coverage Diff             @@
##             main    #2115      +/-   ##
==========================================
- Coverage   99.65%   99.65%   -0.01%     
==========================================
  Files         120      120              
  Lines        5242     5231      -11     
==========================================
- Hits         5224     5213      -11     
  Misses         18       18              
Files Changed Coverage Δ
R/shared_constants.R 93.54% <ø> (ø)
R/infix_spaces_linter.R 100.00% <100.00%> (ø)
R/undesirable_operator_linter.R 100.00% <100.00%> (ø)

Comment thread NEWS.md Resolved
Comment thread R/shared_constants.R Resolved
Comment thread R/undesirable_operator_linter.R Outdated
needs_exact_string <- !is.na(undesirable_operator_metadata$exact_string_value[included_operators])
needs_exact_string <- operator_nodes %in% infix_metadata$xml_tag[infix_metadata$ambiguous_node]
operator_nodes[needs_exact_string] <- sprintf(
"%s[text() = '%s']",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snippet could be refactored into infix_metadata (xml_token?) to avoid duplication.

@MichaelChirico

Copy link
Copy Markdown
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants