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

Suppress some annoying lints in what way #27

Open
qryxip opened this issue Sep 9, 2020 · 4 comments
Open

Suppress some annoying lints in what way #27

qryxip opened this issue Sep 9, 2020 · 4 comments

Comments

@qryxip
Copy link
Member

qryxip commented Sep 9, 2020

BTW, how do we suppress clippy::many_single_char_names? Adding #![allow] to each module, or the crate root?

#![allow(clippy::many_single_char_names)]

Originally posted by @qryxip in #3 (comment)

@qryxip
Copy link
Member Author

qryxip commented Sep 9, 2020

I prefer adding to each module/item or avoid single-character variable names in the first place, but adding to lib.rs is a reasonable approach since many_single_char_names gets easily triggered.

@qryxip
Copy link
Member Author

qryxip commented Sep 9, 2020

@kenkoooo
Copy link
Contributor

kenkoooo commented Sep 9, 2020

I think many_single_char_name warning is still useful. I know AtCoder's library is using a lot of single-character variables. To avoid confusing the library users, it's better not to change the behavior and the interface. But we can change the variable names. It will help reviewers read the code and find bugs and help users understand the algorithms.

@qryxip
Copy link
Member Author

qryxip commented Sep 9, 2020

note: Clippy is currently bundled with rustup (if you newly install Rust, you'll also install cargo-clippy), and be intended to used as a static code analysis tool running on editors such as VSCode.

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

No branches or pull requests

2 participants