Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linter running on intentionally bad Thrift test files #6943

Merged
merged 1 commit into from Dec 17, 2018

Conversation

Eric-Arellano
Copy link
Contributor

Problem

./pants lint :: had never ran against the intentionally bad Thrift files we use for testing Scrooge. While working on #6913, due to changes made to the files, ./pants lint :: started to complain about them.

These files are intentionally bad, so ./pants lint :: complaining is not helpful.

Solution

Use the TEST_BUILD pattern to work around the linter complaining. We name the BUILD file instead TEST_BUILD, and then during the unit test use a context manager to temporarily rename to BUILD.

./pants lint :: was not running against the intentionally bad Thrift files we use for testing, until this PR changed those files so surfaced the issue.

This commit implements the TEST_BUILD pattern to work around the linter complaining.
Copy link
Contributor

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Very nice! Thanks!

@illicitonion illicitonion merged commit 9b8528b into pantsbuild:master Dec 17, 2018
@Eric-Arellano Eric-Arellano deleted the fix-scrooge-linter branch December 17, 2018 14:24
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.

None yet

2 participants