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

lints! #190

Closed
wants to merge 1 commit into from
Closed

lints! #190

wants to merge 1 commit into from

Conversation

seanmonstar
Copy link
Member

Specifically, this will prevent 2 code smells:

  1. glob: use foo::* is by default denied. use self::sub::* is fine, as way to uplift sub modules. For uses of bad globs, they must be covered with a #[glob = "explanation"] attribute.
  2. str_to_string: Micro benchmarks show it's 5x slower than &str.into_string(). So this lint denies such usage.

@seanmonstar
Copy link
Member Author

oh dangit, i forgot to feature gate the attributes

@reem
Copy link
Contributor

reem commented Dec 11, 2014

I think it might be best to move these lints into other repos/crates, since they are actually generally useful (I'd like to use them in other projects, especially str_to_string) and it keeps the codebase of hyper itself short.

We could have a hyper/lints or you could just stick them in your own repo.

@Manishearth
Copy link
Contributor

The tostring lint has been upstreamed into Clippy. I think the glob one would be nice to have as well, PRs welcome! :)

@seanmonstar seanmonstar deleted the pocketlint branch January 28, 2015 01:58
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

3 participants