about summary refs log tree commit diff
path: root/clippy_lints/src/int_plus_one.rs
AgeCommit message (Collapse)AuthorLines
2024-08-21Start removing `snippet_opt`Jason Newcomb-3/+3
2024-08-17Remove redundant doc commentsAlex Macleod-2/+0
2023-11-25Use absolute path for `declare_tool_lint` in `declare_clippy_lint`Alex Macleod-1/+1
2023-10-23Set existing doc-tests to `no_run`Alex Macleod-2/+2
2022-11-21Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-16/+12
2022-11-16Use `token::Lit` in `ast::ExprKind::Lit`.Nicholas Nethercote-11/+12
Instead of `ast::Lit`. Literal lowering now happens at two different times. Expression literals are lowered when HIR is crated. Attribute literals are lowered during parsing. This commit changes the language very slightly. Some programs that used to not compile now will compile. This is because some invalid literals that are removed by `cfg` or attribute macros will no longer trigger errors. See this comment for more details: https://github.com/rust-lang/rust/pull/102944#issuecomment-1277476773
2022-11-15Extend `needless_borrowed_reference` to structs and tuples, ignore _Alex Macleod-16/+12
2022-10-06Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyupPhilipp Krones-2/+2
2022-09-23Apply uninlined_format-args to clippy_lintsYuri Astrakhan-2/+2
This change is needed for the uninlined_format-args lint to be merged. See https://github.com/rust-lang/rust-clippy/pull/9233
2022-06-16Merge commit 'd7b5cbf065b88830ca519adcb73fad4c0d24b1c7' into clippyupflip1995-2/+1
2022-06-05Improve lint doc consistencySerial-2/+1
2022-05-21Merge 'rust-clippy/master' into clippyupxFrednet-1/+1
2022-05-07Replace `#[allow]` with `#[expect]` in ClippyxFrednet-1/+1
2021-12-06Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyupflip1995-0/+1
2021-11-10Added `clippy::version` attribute to all normal lintsxFrednet-0/+1
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-04Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyupflip1995-2/+2
2021-10-24Update rustfmtCameron Steffen-2/+2
2021-07-29Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyupflip1995-5/+5
2021-07-28Update lint documentation to use markdown headlinesxFrednet-5/+5
2021-03-25Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyupflip1995-2/+2
2021-03-15Don't re-export clippy_utils::diagnostics::*Cameron Steffen-2/+1
2021-03-15Move some utils to clippy_utils::source moduleCameron Steffen-1/+2
2021-01-30Merge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyupflip1995-12/+12
2021-01-20Add new lint `upper_case_acronyms`Hirochika Matsumoto-12/+12
2020-08-28Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyupflip1995-3/+3
2020-08-11int_plus_one: make lint adhere to lint message conventionMatthias Krüger-3/+3
2020-06-09Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippyLzu Tao-1/+0
2020-06-01Fix more code examplesThibsG-1/+0
2020-04-18Fixes internal lint warning in code base.xiongmao86-10/+5
2020-04-17Cleanup: Rename 'db' variable to 'diag'Philipp Hansch-2/+2
2020-03-01Rustup to rust-lang/rust#69592Yuki Okushi-1/+1
2020-02-21Fix falloutflip1995-1/+1
2020-01-13Rustup to rust-lang/rust#68045Yuki Okushi-1/+1
2020-01-11Rustup to rust-lang/rust#67806Yuki Okushi-3/+2
2020-01-07Normalize lint messagesYuki Okushi-1/+1
2019-12-04Rustup to rust-lang/rust#66878Matthias Krüger-1/+2
2019-10-15Add a new lint for unused selfJames Wang-22/+21
2019-09-27Rustup to rust-lang/rust#64813flip1995-7/+7
2019-08-28Update int_plus_one suggestion textPhilipp Hansch-1/+1
This is now in line with the recommendations from here: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/struct.Diagnostic.html#method.span_suggestion
2019-08-02Doctests: Fix all complexity lint docsPhilipp Hansch-3/+7
cc #4319
2019-04-17Use lint pass macrosMatthew Kraai-16/+6
Fixes #3917.
2019-03-05move lint documentation into macro invocationsAndy Russell-17/+17
2019-01-27rustup https://github.com/rust-lang/rust/pull/57907/Matthias Krüger-1/+1
for file in `fd \.rs$` ; do sed -i s/span_suggestion_with_applicability/span_suggestion/g $file ; done for file in `fd \.rs$` ; do sed -i s/span_suggestion_short_with_applicability/span_suggestion_short/g $file ; done for file in `fd \.rs$` ; do sed -i s/span_suggestions_with_applicability/span_suggestions/g $file ; done
2019-01-27rustup https://github.com/rust-lang/rust/pull/57726Matthias Krüger-0/+4
2019-01-08Remove all copyright license headersPhilipp Hansch-9/+0
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2018-12-29Remove crate:: prefixes from crate pathsKonrad Borowski-4/+4
This is somewhat misleading, as those are actually external crates, and don't need a crate:: prefix.
2018-11-27Run rustfmt on clippy_lintsflip1995-9/+14
2018-10-06Add license header to Rust filesManish Goregaokar-0/+10
2018-09-20Fill in Applicability from review comments by @flip1995Vitaly _Vi Shukela-1/+1
2018-09-20Fix indentsVitaly _Vi Shukela-5/+5