rust-clippy/clippy_lints/src/methods
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
..
bind_instead_of_map.rs Use Span::from_expansion instead of in_macro 2021-11-05 08:50:17 -05:00
bytes_nth.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
chars_cmp.rs Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup 2021-04-08 17:50:13 +02:00
chars_cmp_with_unwrap.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
chars_last_cmp.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
chars_last_cmp_with_unwrap.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
chars_next_cmp.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
chars_next_cmp_with_unwrap.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
clone_on_copy.rs Update rustfmt 2021-10-24 12:52:38 -05:00
clone_on_ref_ptr.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
cloned_instead_of_copied.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
expect_fun_call.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
expect_used.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
extend_with_drain.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
filetype_is_file.rs Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup 2021-04-08 17:50:13 +02:00
filter_map.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
filter_map_identity.rs Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup 2021-07-01 18:17:38 +02:00
filter_map_next.rs Merge commit '7c7683c8efe447b251d6c5ca6cce51233060f6e8' into clippyup 2021-04-27 16:55:11 +02:00
filter_next.rs Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup 2021-09-08 16:31:47 +02:00
flat_map_identity.rs Reuse is_expr_identity_function for flat_map_identity 2021-06-07 23:20:11 +02:00
flat_map_option.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
from_iter_instead_of_collect.rs Merge commit '7bfc26ec8e7a454786668e7e52ffe527fc649735' into clippyup 2021-08-12 11:16:25 +02:00
get_unwrap.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
implicit_clone.rs Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup 2021-04-22 11:31:13 +02:00
inefficient_to_string.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
inspect_for_each.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
into_iter_on_ref.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
iter_cloned_collect.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
iter_count.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
iter_next_slice.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
iter_nth.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
iter_nth_zero.rs Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup 2021-06-03 08:41:37 +02:00
iter_skip_next.rs Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup 2021-04-08 17:50:13 +02:00
iterator_step_by_zero.rs Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup 2021-06-03 08:41:37 +02:00
manual_saturating_arithmetic.rs rustc_target: move LayoutOf to ty::layout. 2021-09-02 01:17:14 +03:00
manual_split_once.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
manual_str_repeat.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
map_collect_result_unit.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
map_flatten.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
map_identity.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
map_unwrap_or.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
mod.rs Added clippy::version attribute to all normal lints 2021-11-10 19:48:31 +01:00
ok_expect.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
option_as_ref_deref.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
option_map_or_none.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
option_map_unwrap_or.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
or_fun_call.rs Update rustfmt 2021-10-24 12:52:38 -05:00
search_is_some.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
single_char_add_str.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
single_char_insert_string.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
single_char_pattern.rs Merge commit 'b71f3405606d49b9735606b479c3415a0ca9810f' into clippyup 2021-05-06 12:20:44 +02:00
single_char_push_string.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
skip_while_next.rs Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup 2021-04-08 17:50:13 +02:00
string_extend_chars.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
suspicious_map.rs improved help message for suspicious_map 2021-10-05 19:09:08 +00:00
suspicious_splitn.rs Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup 2021-09-08 16:31:47 +02:00
uninit_assumed_init.rs Handle PR feedbacks first round 2021-10-09 05:38:19 -04:00
unnecessary_filter_map.rs Merge remote-tracking branch 'upstream/master' into rustup 2021-10-07 11:11:23 +02:00
unnecessary_fold.rs Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup 2021-06-03 08:41:37 +02:00
unnecessary_lazy_eval.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
unwrap_or_else_default.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
unwrap_used.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
useless_asref.rs Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup 2021-04-08 17:50:13 +02:00
utils.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
wrong_self_convention.rs Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup 2021-06-03 08:41:37 +02:00
zst_offset.rs Fix all occurences of needless_borrow internally 2021-04-06 10:43:47 -04:00