rust/tests
bors 56ccd30a27 Auto merge of #8127 - dswij:8090, r=xFrednet
Fix `enum_variants` FP on prefixes that are not camel-case

closes #8090

Fix FP on `enum_variants` when prefixes are only a substring of a camel-case word. Also adds some util helpers on `str_utils` to help parsing camel-case strings.

This changes how the lint behaves:

1. previously if the Prefix is only a length of 1, it's going to get ignored, i.e. these were previously ignored and now is warned
```rust
enum Foo {
    cFoo,
    cBar,
    cBaz,
}

enum Something {
    CCall,
    CCreate,
    CCryogenize,
}
```

2. non-ascii characters that doesn't have casing will not be split,
```rust
enum NonCaps {
    PrefixXXX,
    PrefixTea,
    PrefixCake,
}
```
will be considered as `PrefixXXX`, `Prefix`, `Prefix`, so this won't lint as opposed to fired previously.

changelog: [`enum_variant_names`] Fix FP when first prefix are only a substring of a camel-case word.

---

 (Edited by `@xFrednet` removed some non ascii characters)
2021-12-28 12:01:21 +00:00
..
cargo Merge commit 'cb7915b00c' into clippyup 2021-09-28 18:03:12 +01:00
ui Auto merge of #8127 - dswij:8090, r=xFrednet 2021-12-28 12:01:21 +00:00
ui-cargo Merge commit '27afd6ade4' into clippyup 2021-09-08 16:31:47 +02:00
ui-internal Merge commit 'a5d597637d' into clippyup 2021-12-06 12:33:31 +01:00
ui-toml Fix grammar issues 2021-12-07 10:08:22 -05:00
ui_test Merge commit '91496c2ac6' into clippyup 2021-10-21 13:11:36 +02:00
clippy.toml Merge commit '3ae8faff4d' into clippyup 2021-06-03 08:41:37 +02:00
compile-test.rs Merge commit 'a5d597637d' into clippyup 2021-12-06 12:33:31 +01:00
dogfood.rs Merge commit 'cb7915b00c' into clippyup 2021-09-28 18:03:12 +01:00
fmt.rs Merge commit 'a5d597637d' into clippyup 2021-12-06 12:33:31 +01:00
integration.rs Merge commit 'cb7915b00c' into clippyup 2021-09-28 18:03:12 +01:00
lint_message_convention.rs Merge commit '27afd6ade4' into clippyup 2021-09-08 16:31:47 +02:00
missing-test-files.rs Merge commit 'e181011378' into clippyup 2021-11-04 12:52:36 +00:00
versioncheck.rs Merge commit '27afd6ade4' into clippyup 2021-09-08 16:31:47 +02:00