Added a --spec-exclude command line flag to exclude specs by regular expression.

Review Request #747 - Created July 25, 2014 and submitted

Information
Garrett Malmquist
pants
garrett/spec-exclude-regex
391
Reviewers
pants-reviews
jsirois, lahosken, zundel
Multiple expressions can be specified by setting the flag more than once. This is in the same
vein as Eric's earlier work on excluding specs with the ^ expression, but this is more powerful
in that it (a) uses regexes, and (b) is an actual flag, and can therefore be specified in
.pants.rc.

Prompted by the need to exclude some automatically generated targets we have internally.

Most of the diff is test code; actual changes are pretty small.
Wrote tests in pants_test/commands/test_spec_exclude_integration.py (which pass).

Issues

  • 2
  • 1
  • 0
  • 3
Description From Last Updated
I would rather see this done with a bit of set arithmetic rather than a magic sentinel value. Patrick Lawson Patrick Lawson
Why break here? It seems reasonable to map all of the patterns that a given target happens to match. Patrick Lawson Patrick Lawson
Larry Hosken
Eric Ayers
Patrick Lawson
John Sirois
Patrick Lawson
Eric Ayers
Garrett Malmquist
Review request changed

Status: Closed (submitted)

Loading...