Skip to content

Commit c1f741f

Browse files
Format code with gofumpt (#141)
1 parent 7153f5e commit c1f741f

15 files changed

Lines changed: 10 additions & 24 deletions

File tree

command/auth/login/login.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ type LoginOptions struct {
2323

2424
// NewCmdLogin handles the login functionality for the CLI
2525
func NewCmdLogin() *cobra.Command {
26-
2726
doc := heredoc.Docf(`
2827
Log in to DeepSource using the CLI.
2928
@@ -64,7 +63,6 @@ func NewCmdLogin() *cobra.Command {
6463

6564
// Run executes the auth command and starts the login flow if not already authenticated
6665
func (opts *LoginOptions) Run() (err error) {
67-
6866
// Fetch config
6967
cfg, _ := config.GetConfig()
7068
opts.User = cfg.User

command/config/generate/analyzers_input.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func populateMetadata(optionalFields []string, jsonParsed *gabs.Container) []Ana
132132
func (o *Options) extractRequiredAnalyzerMetaFields() error {
133133
var optionalFields []string
134134
var requiredMetaData []AnalyzerMetadata
135-
var analyzerFieldsData = make(map[string][]AnalyzerMetadata)
135+
analyzerFieldsData := make(map[string][]AnalyzerMetadata)
136136

137137
// Extract `optional_required` fields of analyzer meta of selected analyzers
138138
for _, activatedAnalyzer := range o.ActivatedAnalyzers {

command/config/generate/input.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010

1111
// Responsible for collecting user input for generating DeepSource config
1212
func (o *Options) collectUserInput() error {
13-
1413
deepsource, err := deepsource.New(deepsource.ClientOpts{
1514
Token: config.Cfg.Token,
1615
HostName: config.Cfg.Host,

command/config/validate/validate.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ type Options struct{}
2525
// NewCmdValidate handles the validation of the DeepSource config (.deepsource.toml)
2626
// Internally it uses the package `configvalidator` to validate the config
2727
func NewCmdValidate() *cobra.Command {
28-
2928
o := Options{}
3029
cmd := &cobra.Command{
3130
Use: "validate",

command/issues/list/list_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ func TestListJSON(t *testing.T) {
6363
}
6464

6565
func TestListSARIF(t *testing.T) {
66-
6766
t.Run("must work with single language repositories", func(t *testing.T) {
6867
// export issues to SARIF
6968
issues_data := ReadIssues("./testdata/dummy/issues.json")
@@ -112,7 +111,6 @@ func TestListSARIF(t *testing.T) {
112111
}
113112

114113
func TestFilterIssuesByPath(t *testing.T) {
115-
116114
t.Run("must work with files", func(t *testing.T) {
117115
issues_data := ReadIssues("./testdata/dummy/issues_data_multi.json")
118116
issues_docker := ReadIssues("./testdata/dummy/issues_docker.json")
@@ -137,7 +135,6 @@ func TestFilterIssuesByPath(t *testing.T) {
137135
}
138136

139137
func TestFilterIssuesByAnalyzer(t *testing.T) {
140-
141138
t.Run("must work with a single analyzer", func(t *testing.T) {
142139
issues_data := ReadIssues("./testdata/dummy/issues_data_multi.json")
143140
issues_docker := ReadIssues("./testdata/dummy/issues_docker.json")

command/repo/status/status.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ type RepoStatusOptions struct {
2020

2121
// NewCmdRepoStatus handles querying the activation status of the repo supplied as an arg
2222
func NewCmdRepoStatus() *cobra.Command {
23-
2423
opts := RepoStatusOptions{
2524
RepoArg: "",
2625
TokenExpired: config.Cfg.IsExpired(),

command/repo/view/view.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ type RepoViewOptions struct {
2727
}
2828

2929
func NewCmdRepoView() *cobra.Command {
30-
3130
opts := RepoViewOptions{
3231
RepoArg: "",
3332
SelectedRemote: &utils.RemoteData{},

configvalidator/generic_config_validator.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,4 @@ func (c *ConfigValidator) validateGenericConfig() {
9090
c.validateVersion()
9191
c.validateExcludePatterns()
9292
c.validateTestPatterns()
93-
9493
}

deepsource/analyzers/queries/get_analyzers.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ type IGQLClient interface {
4343
}
4444

4545
func (a AnalyzersRequest) Do(ctx context.Context, client IGQLClient) ([]analyzers.Analyzer, error) {
46-
4746
req := graphql.NewRequest(listAnalyzersQuery)
4847

4948
// set header fields

deepsource/issues/issues_list.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ type Issue struct {
1919
IssueCode string `json:"issue_code"` // DeepSource code for the issue reported
2020
Location Location `json:"location"` // The location data for the issue reported
2121
Analyzer AnalyzerMeta // The Analyzer which raised the issue
22-
2322
}

0 commit comments

Comments
 (0)