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

chore: add and fix more lints, improve docs #4765

Merged
merged 14 commits into from
Sep 25, 2023
Merged

chore: add and fix more lints, improve docs #4765

merged 14 commits into from
Sep 25, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Sep 25, 2023

See commits, just boring changes:

  • impl Debug on everything
  • sync all lints, add rustdoc::all
  • fix them
  • split lint ci
  • add --generate-link-to-definition, --show-type-layout, and #![feature(doc_cfg, doc_auto_cfg)] unstable features to rustdoc builds for better documentation

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #4765 (b297ad8) into main (0f9def0) will decrease coverage by 0.14%.
Report is 1 commits behind head on main.
The diff coverage is 12.10%.

Impacted file tree graph

Files Changed Coverage Δ
bin/reth/src/cli/ext.rs 6.79% <ø> (ø)
bin/reth/src/db/clear.rs 9.09% <ø> (ø)
bin/reth/src/db/get.rs 75.64% <ø> (ø)
bin/reth/src/dirs.rs 71.01% <0.00%> (ø)
bin/reth/src/node/cl_events.rs 0.00% <0.00%> (ø)
bin/reth/src/runner.rs 54.34% <0.00%> (-1.09%) ⬇️
crates/blockchain-tree/src/blockchain_tree.rs 83.61% <0.00%> (-0.11%) ⬇️
crates/consensus/auto-seal/src/lib.rs 0.00% <0.00%> (ø)
crates/consensus/beacon/src/engine/hooks/mod.rs 55.55% <0.00%> (-6.95%) ⬇️
crates/consensus/beacon/src/engine/hooks/prune.rs 77.92% <0.00%> (-7.80%) ⬇️
... and 85 more

... and 4 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.52% <3.82%> (-0.03%) ⬇️
unit-tests 63.39% <11.46%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 32.07% <22.22%> (-0.04%) ⬇️
blockchain tree 83.69% <50.00%> (-0.05%) ⬇️
pipeline 88.53% <ø> (ø)
storage (db) 73.49% <13.04%> (-0.22%) ⬇️
trie 94.52% <12.50%> (-0.25%) ⬇️
txpool 49.51% <40.00%> (-0.48%) ⬇️
networking 76.92% <4.65%> (-0.19%) ⬇️
rpc 57.67% <0.00%> (-0.03%) ⬇️
consensus 62.84% <5.88%> (-0.26%) ⬇️
revm 28.33% <100.00%> (ø)
payload builder 8.20% <0.00%> (-0.12%) ⬇️
primitives 86.50% <42.85%> (-0.06%) ⬇️

@onbjerg onbjerg added the C-debt Refactor of code section that is hard to understand or maintain label Sep 25, 2023
Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm overall

bin/reth/src/db/clear.rs Outdated Show resolved Hide resolved
bin/reth/src/db/clear.rs Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
bin/reth/src/p2p/mod.rs Outdated Show resolved Hide resolved
crates/interfaces/src/sync.rs Show resolved Hide resolved
@@ -1037,6 +1039,7 @@ pub(crate) enum PeerCommand {

/// Actions the peer manager can trigger.
#[derive(Debug)]
#[allow(missing_docs)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this allow is not needed i think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can also be resolved by adding a simple one liner to PeerRemoved

Copy link
Member Author

@DaniPopes DaniPopes Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

struct-like variants' fields need docs (c in enum A { B { c: ... } })

Copy link
Member Author

@DaniPopes DaniPopes Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW this whole module/crate is weird, I would appreciate someone taking a look after this PR with unreachable_pub because a lot of the public structs reference private ones in docs and I don't know which should be public or not

crates/storage/codecs/derive/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supportive, only minor nits

.github/workflows/ci.yml Show resolved Hide resolved
crates/interfaces/src/sync.rs Show resolved Hide resolved
@@ -1037,6 +1039,7 @@ pub(crate) enum PeerCommand {

/// Actions the peer manager can trigger.
#[derive(Debug)]
#[allow(missing_docs)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can also be resolved by adding a simple one liner to PeerRemoved

@DaniPopes DaniPopes added this pull request to the merge queue Sep 25, 2023
Merged via the queue into main with commit 8f9d290 Sep 25, 2023
23 checks passed
@DaniPopes DaniPopes deleted the dani/better-docs branch September 25, 2023 15:57
Copy link

@Mti-isf Mti-isf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants