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

Remove wildcard imports #1077

Merged
merged 2 commits into from Jul 6, 2018

Conversation

Projects
None yet
2 participants
@ppannuto
Copy link
Member

ppannuto commented Jul 6, 2018

Pull Request Overview

We've talked about this before in person, and most of Tock adheres to it, but a few wildcard imports have made their way into the tree. I've been doing a whole bunch of refactoring lately, and it's been a potent reminder of why wildcard imports are troublesome (hard to find where variables / objects come from).

As added benefit, there were a few instances (especially in the networking stack) where we were using wildcards to export interfaces that were exporting all public elements when in practice only one or two were actually used. Echoing the sentiment of #955, explicit exports help ensure that only the intended interface is available.

This removes all of the wildcard imports in the Tock tree and adds a formatting rule to check for them in the future.

Testing Strategy

Compiling.

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make formatall.

ppannuto added some commits Jul 5, 2018

@niklasad1
Copy link
Member

niklasad1 left a comment

👍

@ppannuto ppannuto merged commit c9792f4 into master Jul 6, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@ppannuto ppannuto deleted the no-more-asterisks branch Jul 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment