-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add lint to check that all crates have #![unstable] #31627
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
3b14f48
to
9d796e7
Compare
@@ -24,6 +24,7 @@ | |||
|
|||
interesting_files = ['.rs', '.py', '.js', '.sh', '.c', '.h'] | |||
uninteresting_files = ['miniz.c', 'jquery', 'rust_android_dummy'] | |||
stable_whitelist = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It surprises me that the whitelist is empty. std and core are stable and AFAICT nothing else encodes the knowledge that they're allowed to be stable, so surely they should be in the whitelist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, Travis says that make tidy
passes. Have you tried purposefully omitting an #[unstable]
annotation to see if the code catches that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it in my latest commit. Apparently the real culprit is the re.match
down at if fileinput.isFirstLine()
- what I really wanted was re.search()
instead.
fad5a19
to
1d5f6ee
Compare
@@ -195,6 +208,9 @@ def interesting_file(f): | |||
update_counts(current_name) | |||
assert len(current_contents) > 0 | |||
do_license_check(current_name, current_contents) | |||
if len(needs_unstable_attr) != 0: | |||
for f in needs_unstable_attr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines could be simplified to just for f in needs_unstable_attr:
Holy crap, tidy is really hacky. But apart from the style nit and the Travis failure (should't libcollectionstest be unstable?) this change LGTM. |
a35116b
to
daf3c0a
Compare
Currently Travis CI builds with two failures:
Shall I go ahead and add the unstable attribute to these two files? |
Nah it should be ok to whitelist those two (they're not shipped) |
daf3c0a
to
1739883
Compare
Updated. |
1e2941f
to
6f092c8
Compare
⌛ Testing commit 6f092c8 with merge b3a8364... |
⛄ The build was interrupted to prioritize another pull request. |
⌛ Testing commit 6f092c8 with merge 19896f8... |
⛄ The build was interrupted to prioritize another pull request. |
⌛ Testing commit 6f092c8 with merge 0f8f7d5... |
💔 Test failed - auto-win-gnu-64-opt |
@bors: retry On Mon, Feb 15, 2016 at 7:03 PM, bors [email protected] wrote:
|
⌛ Testing commit 6f092c8 with merge 29e8ac5... |
Fixes #31122.