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

Deny all the pedantic clippy lints that we already obey #2201

Conversation

mulkieran
Copy link
Member

@mulkieran mulkieran commented Sep 1, 2020

@mulkieran mulkieran force-pushed the develop-2.1.0-pedantic-lints branch 2 times, most recently from 42c8ac9 to 3fb999e Compare September 1, 2020 02:51
@mulkieran mulkieran changed the title Develop 2.1.0 pedantic lints Two improvements to the clippy Makefile target Sep 1, 2020
@mulkieran mulkieran self-assigned this Sep 1, 2020
@mulkieran mulkieran requested a review from jbaublitz September 1, 2020 02:54
@mulkieran mulkieran force-pushed the develop-2.1.0-pedantic-lints branch from 3fb999e to d841277 Compare September 1, 2020 03:14
Copy link
Member

@jbaublitz jbaublitz left a comment

Choose a reason for hiding this comment

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

It looks like beta is failing.

@mulkieran mulkieran force-pushed the develop-2.1.0-pedantic-lints branch from d841277 to 179b917 Compare September 2, 2020 22:16
@mulkieran
Copy link
Member Author

rebased.

@mulkieran
Copy link
Member Author

pedantic beta clippy lint has bad suggestion (probably also false positive): rust-lang/rust-clippy#5822.

@mulkieran mulkieran force-pushed the develop-2.1.0-pedantic-lints branch from 53f2d31 to 2bf4014 Compare September 3, 2020 13:32
@mulkieran
Copy link
Member Author

rebased.

@mulkieran mulkieran force-pushed the develop-2.1.0-pedantic-lints branch 4 times, most recently from a81e8da to 55066cd Compare September 3, 2020 15:14
@mulkieran mulkieran force-pushed the develop-2.1.0-pedantic-lints branch from 55066cd to 0b86e15 Compare September 10, 2020 01:00
@mulkieran
Copy link
Member Author

rebased.

@mulkieran mulkieran changed the title Two improvements to the clippy Makefile target Deny all the pedantic clippy lints that we already obey Sep 10, 2020
@mulkieran
Copy link
Member Author

stratisd failure clearly spurious.

Allow the ones that we don't obey. We obey far more than we disobey.

In due course, remove the allows and change the code for pedantic lints
that we should obey. Comment the others to explain why we don't obey them.

If, through experience, we learn that there is some pedantic lint that we
were obeying, but that is not helpful, add the lint to the list of allowed
pedantic lints, accompanied with a comment explaining why it is allowed.

Signed-off-by: mulhern <[email protected]>
@mulkieran mulkieran force-pushed the develop-2.1.0-pedantic-lints branch from 0b86e15 to b6b2edc Compare September 10, 2020 12:02
@mulkieran
Copy link
Member Author

rebased.

-A clippy::single_match_else \
-A clippy::too_many_lines \
-A clippy::unseparated_literal_suffix \
-A clippy::unused_self
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious about this one. This may actually be good information to have. We could then theoretically remove self if it's not used which I could see improving code quality so that a reference to self is not taken if it's not needed, allowing us to have slightly more flexibility when bumping up against the borrow checker.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, take that allow off and the results are actually somewhat interesting. But I think this makes sense to merge for now. You can pursue that later if you want to, or maybe it would be a good learning opportunity for @lleshchi.

Copy link
Member

Choose a reason for hiding this comment

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

I'll approve then. Would you like me to file another issue to follow up on that?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll approve then. Would you like me to file another issue to follow up on that?

Yes, please do.

@mulkieran mulkieran merged commit 2c6dd05 into stratis-storage:develop-2.1.0 Sep 10, 2020
@mulkieran mulkieran deleted the develop-2.1.0-pedantic-lints branch September 10, 2020 14:29
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.

3 participants