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

[Automation] Add make targets to group imports #185

Closed
8 tasks
andrewnguyen22 opened this issue Aug 29, 2022 · 5 comments · Fixed by #758
Closed
8 tasks

[Automation] Add make targets to group imports #185

andrewnguyen22 opened this issue Aug 29, 2022 · 5 comments · Fixed by #758
Assignees
Labels
code health Nice to have code improvement community Open to or owned by a non-core team member tooling tooling to support development, testing et al

Comments

@andrewnguyen22
Copy link
Contributor

andrewnguyen22 commented Aug 29, 2022

Objective

Group imports across the entire codebase, while also deliniating between internal and external imports.

Origin Document

This is a nicety 'code hygeine' target that was closed as low priority but re-raised by the engineering team.

See this comment from the CirclCI team:

Screenshot 2023-03-09 at 6 05 52 PM

See this comment from the Pocket team:

Screenshot 2023-03-09 at 6 06 09 PM

Goals

  • Organize & sort go imports through the whole codebase
  • Group internal and external imports separately

Deliverables

  • A make target that triggers gosimports across the whole codebase
  • A CI integration that triggers gosimports on any PR

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @andrewnguyen22
Co-Owners: @Olshansk

@Olshansk
Copy link
Member

Olshansk commented Sep 3, 2022

@andrewnguyen22 Feel free to delete the two two lines next time you create a new issue

Screen Shot 2022-09-03 at 1 17 17 PM

@Olshansk Olshansk added priority:medium community Open to or owned by a non-core team member tooling tooling to support development, testing et al labels Sep 3, 2022
@Olshansk Olshansk changed the title Add make targets to group imports [Automation] Add make targets to group imports Sep 4, 2022
@Olshansk Olshansk moved this from TODO to Up Next in V1 Dashboard Sep 4, 2022
@jessicadaugherty jessicadaugherty moved this from Up Next to Backlog in V1 Dashboard Oct 5, 2022
@Olshansk
Copy link
Member

@okdas Do you know if this is something the automation work you did can support by default?

@jessicadaugherty jessicadaugherty removed community Open to or owned by a non-core team member starter task labels Dec 21, 2022
@jessicadaugherty
Copy link
Contributor

Removing from community bounty board until we can connect with @okdas about this @Olshansk

@Olshansk
Copy link
Member

Low priority and not very imprtant. The automated linter handles the important parts

@github-project-automation github-project-automation bot moved this from Backlog to Done in V1 Dashboard Feb 24, 2023
@Olshansk Olshansk added community Open to or owned by a non-core team member and removed priority:medium labels Mar 10, 2023
@Olshansk Olshansk reopened this Mar 10, 2023
@Olshansk
Copy link
Member

Reopening this issue per a discussion that happened here: https://github.com/pokt-network/pocket/pull/546/files#r1120746209

Screenshot 2023-03-09 at 6 02 16 PM

@Olshansk Olshansk moved this from Done to Backlog in V1 Dashboard Mar 10, 2023
@Olshansk Olshansk self-assigned this Apr 19, 2023
@Olshansk Olshansk moved this from Backlog to In Review in V1 Dashboard Apr 19, 2023
Olshansk added a commit that referenced this issue May 17, 2023
## Description

Grouped all the imports using [gosimports](https://github.com/rinchsan/gosimports).

## Issue

Fixes #185

## Type of change

Please mark the relevant option(s):

- [ ] New feature, functionality or library
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Major breaking change
- [ ] Documentation
- [ ] Other <!-- add details here if it a different type of change -->

## List of changes

- Added `gosimports` as a makefile helper (`make go_imports`) and to the installation tools
- Added `goimports` as a linter config file
- Ran `go_imports` on everything

## Testing

- [x] `make develop_test`; if any code changes were made
- [ ] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced
- [ ] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made

## Required Checklist

- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment))
- [ ] I have tested my changes using the available tooling
- [ ] I have updated the corresponding CHANGELOG

### If Applicable Checklist

- [ ] I have updated the corresponding README(s); local and/or global
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s)
- [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s)
@github-project-automation github-project-automation bot moved this from In Review to Done in V1 Dashboard May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Nice to have code improvement community Open to or owned by a non-core team member tooling tooling to support development, testing et al
Projects
Status: Done
5 participants