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

General tidying #1052

Merged
merged 8 commits into from Dec 6, 2023
Merged

General tidying #1052

merged 8 commits into from Dec 6, 2023

Conversation

danieleades
Copy link
Contributor

I hope you don't mind me poking around and kicking the tyres like this?

Description

  • adds boilerplate for workspace lints
  • adds 'inline format args' as a workspace lint
  • promotes 'forbidden' lints to workspace lints
  • remove instances of 'needless pass by value'

@reviewpad reviewpad bot added the Large Large sized PR label Dec 5, 2023
} else {
assert_eq!(
format!("/ip4/127.0.0.1/udp/11101/quic-v1/p2p/{}", peer_id),
format!("/ip4/127.0.0.1/udp/11101/quic-v1/p2p/{peer_id}"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
format!("/ip4/127.0.0.1/tcp/11101/p2p/{}", peer_id),
multiaddr
);
assert_eq!(format!("/ip4/127.0.0.1/tcp/11101/p2p/{peer_id}"), multiaddr);

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
format!("/ip4/127.0.0.1/tcp/11101/p2p/{}", peer_id),
multiaddr
);
assert_eq!(format!("/ip4/127.0.0.1/tcp/11101/p2p/{peer_id}"), multiaddr);

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
} else {
assert_eq!(
format!("/ip4/127.0.0.1/udp/11101/quic-v1/p2p/{}", peer_id),
format!("/ip4/127.0.0.1/udp/11101/quic-v1/p2p/{peer_id}"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
format!("/ip4/127.0.0.1/tcp/11101/p2p/{}", peer_id),
multiaddr
);
assert_eq!(format!("/ip4/127.0.0.1/tcp/11101/p2p/{peer_id}"), multiaddr);

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
genesis_port, peer_id
);
let genesis_multi_addr =
format!("/ip4/127.0.0.1/udp/{genesis_port:?}/quic-v1/p2p/{peer_id}");

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
@@ -249,12 +248,10 @@

let peer_id = self.rpc_client.obtain_peer_id(rpc_address).await?;
#[cfg(not(feature = "quic"))]
let genesis_multi_addr = format!("/ip4/127.0.0.1/tcp/{:?}/p2p/{}", genesis_port, peer_id);
let genesis_multi_addr = format!("/ip4/127.0.0.1/tcp/{genesis_port:?}/p2p/{peer_id}");

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
@danieleades danieleades marked this pull request as ready for review December 5, 2023 21:38
@danieleades danieleades marked this pull request as draft December 5, 2023 21:45
@danieleades danieleades marked this pull request as ready for review December 5, 2023 21:50
Copy link

reviewpad bot commented Dec 5, 2023

Reviewpad Report

‼️ Errors

  • Unconventional title detected: 'General tidying' illegal 'G' character in commit message type: col=00

@joshuef
Copy link
Contributor

joshuef commented Dec 6, 2023

Amazing, thanks very much @danieleades .

Don't worry about this failing test atm. That's birttle on main and being looked at already 👍 🙇

@b-zee
Copy link
Contributor

b-zee commented Dec 6, 2023

Good stuff! I've taken the liberty to move a few more warnings over from sn_node too. The remaining lints cause many warnings on the other crates or tests, so I've not added those for now:

missing_docs,
unreachable_pub,
unused_qualifications,
unused_results,
clippy::unwrap_used

@b-zee b-zee enabled auto-merge December 6, 2023 08:32
@b-zee b-zee added this pull request to the merge queue Dec 6, 2023
Merged via the queue into maidsafe:main with commit f4ed662 Dec 6, 2023
29 checks passed
@danieleades danieleades deleted the refactor branch December 6, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Large Large sized PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants