normalize filespec exclude usage

Review Request #4348 — Created Nov. 2, 2016 and submitted

3795, 4018
benjyw, stuhood, yujiec
Sometimes we use exclude and sometimes we use excludes. It looks like there might be bugs do to that.

This patch ensures all of the glob and filespec related exclude names use exclude and not excludes.

Wrote a couple regression tests for the only bug I saw remaining and made them pass.

  1. I vaguely recall that there are usages of "excludes" in several BUILD files in OSS pants (testprojects/, examples/, etc). You may want to clean them up or some tests may fail.

    1. This is only for globs. We also have a kwarg called excludes for jar_library which works differently. The test failures in CI are due to error message changes. We already disallow excludes in BUILD files in that globs raise on unknown kwargs:

    2. Ah right. What used in BUILD file is already "exclude". Sorry for the wrong advice. It's great that you caught the bug in where it tries to use key "excludes" but should be "exclude". Making everything be "exclude" looks much better!

  1. Ship It!
  1. In description: bugs *due* to that.

Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as