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

Add whitespace to lodestar/network #1844

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Dec 7, 2020

  • better readability

@github-actions github-actions bot added the scope-networking All issues related to networking, gossip, and libp2p. label Dec 7, 2020
@dapplion dapplion force-pushed the dapplion/whitespace/lodestar-network branch from fc1e027 to 73c069a Compare December 7, 2020 21:22
@@ -6,14 +6,14 @@ import {SnappyFramesUncompress} from "./snappy-frames/uncompress";

export function getCompressor(encoding: ReqRespEncoding): (data: Buffer) => AsyncGenerator<Buffer> {
switch (encoding) {
case ReqRespEncoding.SSZ_SNAPPY: {
Copy link
Member

Choose a reason for hiding this comment

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

We don't have rule to enforce brackets on case statements. 😞
Brackets really helps out to notice case boundaries.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For switch statements with a lot of short cases not using brackets is pretty clean. If the case code grows brackets are nice so I'm not sure about making them mandatory

@wemeetagain wemeetagain merged commit c71da24 into master Dec 8, 2020
@wemeetagain wemeetagain deleted the dapplion/whitespace/lodestar-network branch December 8, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-networking All issues related to networking, gossip, and libp2p.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants