Skip to content
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

False positives in IPv6 addresses #848

Open
weiznich opened this issue Oct 6, 2023 · 2 comments
Open

False positives in IPv6 addresses #848

weiznich opened this issue Oct 6, 2023 · 2 comments
Labels
bug Not as expected

Comments

@weiznich
Copy link

weiznich commented Oct 6, 2023

I'm setting up typos as part of the diesel CI workflow. While doing that I noticed the following "false" positives:

  • Detecting "typos" in IPv6 network addresses:
error: `ba` should be `by`, `be`
  --> ./diesel_tests/tests/types.rs:1240:71
     |
1240 |     let value = ipnet::IpNet::V6(ipnet::Ipv6Net::from_str("2001:4f8:3:ba::/64").unwrap());
     |                                                                       ^^
     |

  • Detecting typos in strangely cased words:
error: `Ot` should be `To`, `Of`, `Or`, `Not`
  --> ./dsl_auto_type/src/auto_type/case.rs:43:55
   |
43 |                             `SHOUTY_SNAKE_CASE`, `dO_nOt_cHaNgE_cAsE`"
   |                                                       ^^
   |

@epage
Copy link
Collaborator

epage commented Oct 6, 2023

For the second, there isn't really much we can do. Options for you include

  • Making that a recognized identifier in your config
  • Using the regex ignores to match patterns you have for this
  • Use regex to create line ignores as a stopgap until we have other systems in place

For the first, I can see adding IPv6 detection. In the mean time, feel free to use any of the options mentioned for the second case.

In the future, please create issues for individual concerns. In this case, I'm just going to repurpose this for IPv6

@epage epage changed the title False positives while trying to use typos on the diesel repository False positives in IPv6 addresses Oct 6, 2023
@epage epage added the bug Not as expected label Oct 6, 2023
@TimTheBig
Copy link

Have a look my proposal in #1101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not as expected
Projects
None yet
Development

No branches or pull requests

3 participants