-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Tracking issue] Rearrange location of some of the existing lints #6680
Comments
@magurotuna @camsteffen Shall we kick this off sometime this month? I could focus on |
Also feel free to split this not only in multiple commits, but also in multiple PRs. |
@nahuakang Sure! But frankly I don't want to promise anything from me at this point. For organization, I would recommend we comment here on what group you're currently working on. But you don't have to do an entire group. |
If If it just refers to unrelated group names, ignore what I said =) |
@phansch The |
I'll work on "transmute" group :) |
I'll work on |
@Y-Nak @nahuakang @magurotuna Do you want to cross-review your PRs to make sure that you all used the same "style" for the restructuring, so the Clippy code is consistent? That would be a big help for me reviewing those PRs because I don't have to compare them to eachother. |
Can do. Mine is ready for review. @Y-Nak @magurotuna is either of yours ready for a first comparison? :) |
After a quick scan of the PRs it seems that all are ready for review. 👍 |
Yes, mine is ready too. I'll have a look at the PRs of @nahuakang and @Y-Nak when I have time :) |
@flip1995 Sure, I'll review them. |
|
@Y-Nak Good catch! I updated the PR description. |
Can I work on |
@TaKO8Ki |
Refactor: arrange transmute lints This PR arranges `transmute` lints so that they can be accessed more easily. Basically, I followed the instruction described in #6680 as to how to do the refactoring. - `declare_clippy_lint!` and `impl LintPass` is placed in `transmute/mod.rs` - Uitlity functions is placed in `transmute/utils.rs` - Each lint function about `transmute` is moved into its own module, like `transmute/useless_transmute.rs` For ease of review, I refactored step by step, keeping each commit small. For instance, all I did in 2451781 was to move `useless_transmute` into its own module. --- changelog: Refactor `transmute.rs` file into `transmute` module.
Some good teamwork happening in here! |
Refactor: arrange lints in `methods` module This PR arranges methods lints so that they can be accessed more easily. Basically, I refactored them following the instruction described in #6680. changelog: Move lints in methods module into their own modules.
@magurotuna |
@TaKO8Ki Sure thing! Done it. |
…nsch Refactor lints in methods module This PR refactors methods lints other than the lints I refactored in #6826 and moves some functions to methods/utils.rs. Basically, I follow the instruction described in #6680. **For ease of review, I refactored step by step, keeping each commit small.** closes #6886 cc: `@phansch,` `@flip1995,` `@Y-Nak` changelog: Move lints in methods module to their own modules and some function to methods/utils.rs.
I'm working on Btw, it would be better to discuss how to refactor |
Agreed. I don't see any specific reason why the lints that are currently categorized as "misc" are there. "misc" is so ambiguous that it makes people think a new lint that seems trivial to them should go into "misc". What kind of lints seem trivial to people differs from person to person IMO. Thus it makes more sense to me too, to separate the lints in "misc" and declare individual lint passes for them. |
I think for |
Cool! I updated the description of this issue, adding a |
Organize functions into functions module Ref: #6680 Rearrange lints in `functions`. changelog: none
@magurotuna Could you update the TODO list? Refactoring |
@Y-Nak Great job! Updated. |
Oh, we missed |
@Y-Nak Sure, added! Anyway, recently I've been mostly working on another project so I don't have enough time to refactor |
Can I also work on |
Sure! If you have questions on where lints should go, I think the best place to discuss this is on Zulip. |
Refactor: arrange lints in misc_early module This PR arranges misc_early lints so that they can be accessed more easily. Basically, I refactored them following the instruction described in #6680. cc: `@Y-Nak,` `@flip1995,` `@magurotuna` changelog: Move lints in misc_early module into their own modules.
Split matches Part of #6680 changelog: None
Currently, the lint rules grouped as "methods" reside in
clippy_lints/src/methods
as there are a number of rules belonging to the "methods" group.However, although the other groups such as "loops", "types", "transmute" and "misc" also have many relavent rules, they reside not in
clippy_lints/src/<group_name>
but inclippy_lints/src
.It would be great to have these groups located under
<group_name>
directory just like "methods". So I open this issue to do this refactoring and to keep track of it.loops (done by @nahuakang & @Y-Nak Refactor: organize loops file into loops module (Delegated) #6824)types (done by @Y-Nak Tracking Issue for refactoringtypes.rs
#6724)transmute (done by @magurotuna Refactor: arrange transmute lints #6716)functions (done by @Y-Nak Organize functions into functions module #6990)methods (also needs to be refactored because currently most of rule implementation are included inclippy_lints/src/methods/mod.rs
. Would be good if the implementations went toclippy_lints/src/methods/<lint_name>.rs
.) (done by @TaKO8Ki [Tracking Issue] Refactor lints in methods module #6886)misc
, split the lints one by one, and move them into where they fit most. )misc
) (in progress by @TaKO8Ki Refactor: arrange lints in misc_early module #7166, [Tracking Issue] Refactor lints in misc_early module #7208)How to rearrange is like the following, proposed by @flip1995 on zulip
proposed by @camsteffen:
CC @nahuakang @camsteffen
The text was updated successfully, but these errors were encountered: