Skip to content

Conversation

@withshubh
Copy link
Contributor

Description

This PR fixes a few issues that were affecting the code quality.

Summary of changes

  • Replace t.Sub(time.Now()) with time.Until
  • Remove unnecessary wrapping of function call
  • Remove unnecessary blank (_) identifier
  • Fix check for empty string

Copy link
Contributor

@mrnugget mrnugget left a comment

Choose a reason for hiding this comment

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

Cool! Thanks for this!

Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

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

Thanks! Obviously I didn't know for range ... was a thing. 😃

@LawnGnome LawnGnome merged commit 72f8188 into sourcegraph:main Feb 17, 2021
@withshubh
Copy link
Contributor Author

@mrnugget @LawnGnome 👋

I would like to inform you that I ran DeepSource analyzer on my fork of this repository to detect these issues. Have a look at the issues caught in this repository by DeepSource here.

DeepSource is a code review automation tool that detects code quality issues and helps you to automatically fix some of them. You can use DeepSource to track test coverage, Detect problems in Dockerfiles, etc. in addition to detecting issues in code.

Can I submit a new PR with the configuration file which I used to configure the analysis?
You can merge the configuration file to Activate the analysis to continuously analyze the repo and fix code quality issues.

scjohns pushed a commit that referenced this pull request Apr 24, 2023
* Replace `t.Sub(time.Now())` with `time.Until`

* Remove unnecessary wrapping of function call

* Remove unnecessary blank (_) identifier

* Fix check for empty string
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