Skip to content

Whisper: Remove linter warnings#15972

Merged
karalabe merged 4 commits into
ethereum:masterfrom
gballet:whisper-v6-lint
Jan 26, 2018
Merged

Whisper: Remove linter warnings#15972
karalabe merged 4 commits into
ethereum:masterfrom
gballet:whisper-v6-lint

Conversation

@gballet
Copy link
Copy Markdown
Member

@gballet gballet commented Jan 25, 2018

While working on the libp2p switch, I found that errors where drowned in linter warnings. This PR fixes most of them.

Most of the changes are simple comments, however one of them introduces a slight API change by making NewSentMessage an un-exported method. The rationale was that the linter was complaining about returning a non-exported type. Since this non-exported type is part of the internal implementation and I have projects for changing that object in an upcoming cleanup, I have elicited not to export it any longer.

The remaining lint errors are because of auto-generated
files and one is because an exported function has a non-
exported return type. Changing this would break the API,
and will be part of another commit for easier reversal.
This is an API change, which is why it's in its own commit.
This change was initiated after the linter complained that
the returned type wasn't exported. I chose to un-export
the function instead of exporting the type, because that
type is an implementation detail that I would like to
change in the near future to make the code more
readable and with an increased coverage.
@gballet gballet requested a review from gluk256 January 25, 2018 12:59
Copy link
Copy Markdown
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM

@karalabe karalabe merged commit 367c329 into ethereum:master Jan 26, 2018
@karalabe karalabe added this to the 1.8.0 milestone Jan 26, 2018
prestonvanloon pushed a commit to prestonvanloon/go-ethereum that referenced this pull request Apr 2, 2018
* whisper: fixes warnings from the code linter

* whisper: more non-API-breaking changes

The remaining lint errors are because of auto-generated
files and one is because an exported function has a non-
exported return type. Changing this would break the API,
and will be part of another commit for easier reversal.

* whisper: un-export NewSentMessage to please the linter

This is an API change, which is why it's in its own commit.
This change was initiated after the linter complained that
the returned type wasn't exported. I chose to un-export
the function instead of exporting the type, because that
type is an implementation detail that I would like to
change in the near future to make the code more
readable and with an increased coverage.

* whisper: update gencodec output after upgrading it to new lint standards
mariameda pushed a commit to NiluPlatform/go-nilu that referenced this pull request Aug 23, 2018
* whisper: fixes warnings from the code linter

* whisper: more non-API-breaking changes

The remaining lint errors are because of auto-generated
files and one is because an exported function has a non-
exported return type. Changing this would break the API,
and will be part of another commit for easier reversal.

* whisper: un-export NewSentMessage to please the linter

This is an API change, which is why it's in its own commit.
This change was initiated after the linter complained that
the returned type wasn't exported. I chose to un-export
the function instead of exporting the type, because that
type is an implementation detail that I would like to
change in the near future to make the code more
readable and with an increased coverage.

* whisper: update gencodec output after upgrading it to new lint standards
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

Successfully merging this pull request may close these issues.

3 participants