-
Notifications
You must be signed in to change notification settings - Fork 36
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
Various cleanup fixes #20
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 52.86% 53.57% +0.71%
==========================================
Files 21 22 +1
Lines 978 1034 +56
==========================================
+ Hits 517 554 +37
- Misses 429 450 +21
+ Partials 32 30 -2
Continue to review full report at Codecov.
|
…led linters later.
…le, and unit-test this.
…method to compare info objects
@twelho @stefanprodan ready for review & merge 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits, otherwise LGTM 👍
@@ -223,6 +224,7 @@ func NewClient(ctx context.Context, optFns ...ClientOption) (gitprovider.Client, | |||
// the default. | |||
var gh *github.Client | |||
var domain string | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started adding all these spaces because of the whitespace linter wsl, but then was just like "nah, I don't care" and left half-way through 😂
I think I'll live things as-is now, and someone can later make whitespace consistent across the project.
Low-hanging fruit anyways.
bitbucket/doc.go
Outdated
@@ -17,5 +17,6 @@ limitations under the License. | |||
package bitbucket | |||
|
|||
import ( | |||
// Dummy import until we have the implementation ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a TODO
.
.golangci.yml
Outdated
# - godox don't error although there are TODOs in the code | ||
- funlen | ||
- whitespace | ||
# - wsl allow "non-ideomatic" whitespace formattings for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideomatic
➡ idiomatic
@@ -99,6 +103,7 @@ func (c *TeamsClient) List(ctx context.Context) ([]gitprovider.Team, error) { | |||
if err != nil { | |||
return nil, err | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another space character here.
@@ -73,6 +74,7 @@ func (c *OrganizationsClient) List(ctx context.Context) ([]gitprovider.Organizat | |||
if apiObj.Login == nil { | |||
return nil, fmt.Errorf("didn't expect login to be nil for org: %+v: %w", apiObj, gitprovider.ErrInvalidServerData) | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space
github/resource_repository.go
Outdated
return false, nil | ||
} | ||
// Otherwise, make the desired state the actual state | ||
return true, r.Update(ctx) | ||
} | ||
|
||
// Delete deletes the current resource irreversebly. | ||
// Delete deletes the current resource irreversible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
irreversibly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh I just changed this based on the linter's suggestion without even looking at it 😂
gitlab/doc.go
Outdated
@@ -17,5 +17,6 @@ limitations under the License. | |||
package gitlab | |||
|
|||
import ( | |||
// Dummy import until we have the implementation ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add TODO
.
gitprovider/gitprovider.go
Outdated
type GenericDeletable interface { | ||
// Delete deletes the current resource irreversebly. | ||
type Deletable interface { | ||
// Delete deletes the current resource irreversible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
irreversibly
Addressed comments, ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Nice cleanup 🏅
This PR:
CreatableInfo
into the more descriptiveInfoRequest
andDefaultedInfoRequest
, which*Info
structs should implement