Skip to content

filters: supporting alternative characters for quote#1874

Merged
stevvooe merged 1 commit intocontainerd:masterfrom
stevvooe:regexp-quoting-syntax
Dec 5, 2017
Merged

filters: supporting alternative characters for quote#1874
stevvooe merged 1 commit intocontainerd:masterfrom
stevvooe:regexp-quoting-syntax

Conversation

@stevvooe
Copy link
Copy Markdown
Member

@stevvooe stevvooe commented Dec 5, 2017

The regexp syntax can have some nasty characters to handle quoting
correctly, in practice. In certain scenarios a double quote works well,
but it can affect readability for certain regexps. This introduces a
quoting mode that treats / and | as a double quote to make the
quoting in regular expressions more familiar and readable.

This change is introduced in a backwards compatible manner, so existing
regexp quoting is not affected.

Closes #1233

Signed-off-by: Stephen J Day [email protected]

@stevvooe stevvooe added this to the 1.0.0 milestone Dec 5, 2017
@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 5, 2017

Codecov Report

Merging #1874 into master will decrease coverage by 0.48%.
The diff coverage is 28.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1874      +/-   ##
==========================================
- Coverage   49.14%   48.65%   -0.49%     
==========================================
  Files          86       87       +1     
  Lines        8389     8568     +179     
==========================================
+ Hits         4123     4169      +46     
- Misses       3591     3714     +123     
- Partials      675      685      +10
Flag Coverage Δ
#linux 52.1% <30%> (-0.58%) ⬇️
#windows 43.65% <28.87%> (-0.45%) ⬇️
Impacted Files Coverage Δ
filters/parser.go 80.36% <100%> (+0.88%) ⬆️
filters/scanner.go 77.52% <100%> (+0.12%) ⬆️
filters/quote.go 22.22% <22.22%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9caf9b...4dfcf60. Read the comment docs.

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

The regexp syntax can have some nasty characters to handle quoting
correctly, in practice. In certain scenarios a double quote works well,
but it can affect readability for certain regexps. This introduces a
quoting mode that treats `/` and `|` as a double quote to make the
quoting in regular expressions more familiar and readable.

This change is introduced in a backwards compatible manner, so existing
regexp quoting is not affected.

Signed-off-by: Stephen J Day <[email protected]>
@stevvooe stevvooe force-pushed the regexp-quoting-syntax branch from 3960d6a to 4dfcf60 Compare December 5, 2017 04:06
@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Dec 5, 2017

LGTM

@stevvooe stevvooe merged commit 7e1bc9c into containerd:master Dec 5, 2017
@stevvooe stevvooe deleted the regexp-quoting-syntax branch December 5, 2017 04:38
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.

4 participants