rust-clippy/clippy_lints/src/loops
xFrednet d647696c1f
Added clippy::version attribute to all normal lints
So, some context for this, well, more a story. I'm not used to scripting, I've never really scripted anything, even if it's a valuable skill. I just never really needed it. Now, `@flip1995` correctly suggested using a script for this in `rust-clippy#7813`...

And I decided to write a script using nushell because why not? This was a mistake... I spend way more time on this than I would like to admit. It has definitely been more than 4 hours. It shouldn't take that long, but me being new to scripting and nushell just wasn't a good mixture... Anyway, here is the script that creates another script which adds the versions. Fun...

Just execute this on the `gh-pages` branch and the resulting `replacer.sh` in `clippy_lints` and it should all work.

```nu
mv v0.0.212 rust-1.00.0;
mv beta rust-1.57.0;
mv master rust-1.58.0;

let paths = (open ./rust-1.58.0/lints.json | select id id_span | flatten | select id path);
let versions = (
    ls | where name =~ "rust-" | select name | format {name}/lints.json |
    each { open $it | select id | insert version $it | str substring "5,11" version} |
    group-by id | rotate counter-clockwise id version |
    update version {get version | first 1} | flatten | select id version);
$paths | each { |row|
    let version = ($versions | where id == ($row.id) | format {version})
    let idu = ($row.id | str upcase)
    $"sed -i '0,/($idu),/{s/pub ($idu),/#[clippy::version = "($version)"]\n    pub ($idu),/}' ($row.path)"
} | str collect ";" | str find-replace --all '1.00.0' 'pre 1.29.0' | save "replacer.sh";
```

And this still has some problems, but at this point I just want to be done -.-
2021-11-10 19:48:31 +01:00
..
empty_loop.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
explicit_counter_loop.rs Fix explicit_counter_loop suggestion for non-usize types 2021-11-08 22:21:05 -05:00
explicit_into_iter_loop.rs Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup 2021-07-29 12:16:06 +02:00
explicit_iter_loop.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
for_kv_map.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
for_loops_over_fallibles.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
iter_next_loop.rs fix(clippy): update loop lints to use arg.span 2021-09-06 23:30:04 -07:00
manual_flatten.rs Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup 2021-09-08 16:31:47 +02:00
manual_memcpy.rs Fix explicit_counter_loop suggestion for non-usize types 2021-11-08 22:21:05 -05:00
mod.rs Added clippy::version attribute to all normal lints 2021-11-10 19:48:31 +01:00
mut_range_bound.rs Implement equatable if let lint 2021-10-04 22:16:42 +03:30
needless_collect.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
needless_range_loop.rs Implement equatable if let lint 2021-10-04 22:16:42 +03:30
never_loop.rs Implement equatable if let lint 2021-10-04 22:16:42 +03:30
same_item_push.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
single_element_loop.rs Merge commit '7c7683c8efe447b251d6c5ca6cce51233060f6e8' into clippyup 2021-04-27 16:55:11 +02:00
utils.rs Fix explicit_counter_loop suggestion for non-usize types 2021-11-08 22:21:05 -05:00
while_immutable_condition.rs Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup 2021-06-03 08:41:37 +02:00
while_let_loop.rs Merge commit 'cb7915b00c235e9b5861564f3be78dba330980ee' into clippyup 2021-09-28 18:03:12 +01:00
while_let_on_iterator.rs Merge commit 'cb7915b00c235e9b5861564f3be78dba330980ee' into clippyup 2021-09-28 18:03:12 +01:00