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

Turn on linter (clippy) #12

Merged
merged 3 commits into from
Feb 4, 2016
Merged

Turn on linter (clippy) #12

merged 3 commits into from
Feb 4, 2016

Conversation

JohanLorenzo
Copy link
Contributor

Until we get a better test framework, we can have more checks on the code itself.

@@ -52,6 +52,11 @@ fn main() {
return;
}
};

if { true } {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This changeset will be removed once we know travis shows:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And that worked!

src/main.rs:56:8: 56:16 warning: omit braces around single expression condition, #[warn(block_in_if_condition_expr)] on by default

src/main.rs:56     if { true } {

                      ^~~~~~~~

src/main.rs:56:8: 56:16 help: try

if true {

    println!("always true condition");

} ... 

for further information visit https://github.com/Manishearth/rust-clippy/wiki#block_in_if_condition_expr

@JohanLorenzo
Copy link
Contributor Author

@fabricedesre r?

fabricedesre added a commit that referenced this pull request Feb 4, 2016
@fabricedesre fabricedesre merged commit 7d9a9d5 into fxbox:master Feb 4, 2016
@JohanLorenzo JohanLorenzo deleted the turn-on-linter branch March 4, 2016 11:04
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.

2 participants