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

Various code quality fixes/linting #1762

Merged

Conversation

thevilledev
Copy link
Contributor

Minor fixes, including:

  • Use a more descriptive FileMode in tests and in octal format to match os.Filemode
  • Fix tag in ClientUserAgent field for VaultConfig
  • Omit comparison to bool constants
  • Remove unconditionally terminated loops from various tests
  • Remove unused printWarnings() method from VaultWriteQuery
  • Remove once parameter from newWatcher() as it's reachable through config parameter as well

Figured it would make sense to put it all into a single PR rather than multiple (almost) one-line changes :)

@thevilledev thevilledev requested a review from a team as a code owner June 10, 2023 18:29
@thevilledev thevilledev requested review from steshageo and removed request for a team June 10, 2023 18:29
@roncodingenthusiast roncodingenthusiast self-requested a review June 21, 2023 13:35
@@ -1398,7 +1398,7 @@ func NewClientSet(c *config.Config) (*dep.ClientSet, error) {
}

// newWatcher creates a new watcher.
func newWatcher(c *config.Config, clients *dep.ClientSet, once bool) *watch.Watcher {
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch 👍🏾

@@ -146,12 +146,6 @@ func sha1Map(m map[string]interface{}) string {
return fmt.Sprintf("%.4x", h.Sum(nil))
}

func (d *VaultWriteQuery) printWarnings(warnings []string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this isn't used but i wonder why it was added in the first place

@roncodingenthusiast roncodingenthusiast merged commit a3e4db1 into hashicorp:main Jun 21, 2023
@thevilledev thevilledev deleted the chore/code-quality-fixes branch June 21, 2023 16:49
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.

2 participants