Skip to content

Commit 4d71887

Browse files
committed
update codestyle
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent f111cc0 commit 4d71887

12 files changed

+51
-19
lines changed

.editorconfig

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,38 @@ indent_size = 4
1414
[Makefile]
1515
indent_style = tab
1616

17-
[*.yml]
18-
indent_size = 2
19-
20-
[*.yaml]
17+
[{*.yml, *.yaml}]
2118
indent_size = 2
2219

2320
[*.conf]
2421
indent_size = 2
2522

2623
[*.go]
27-
indent_style = tab
2824
indent_size = 4
25+
indent_style = tab
26+
ij_continuation_indent_size = 4
27+
ij_go_GROUP_CURRENT_PROJECT_IMPORTS = true
28+
ij_go_add_leading_space_to_comments = true
29+
ij_go_add_parentheses_for_single_import = true
30+
ij_go_call_parameters_new_line_after_left_paren = true
31+
ij_go_call_parameters_right_paren_on_new_line = true
32+
ij_go_call_parameters_wrap = off
33+
ij_go_fill_paragraph_width = 80
34+
ij_go_group_stdlib_imports = true
35+
ij_go_import_sorting = goimports
36+
ij_go_keep_indents_on_empty_lines = false
37+
ij_go_local_group_mode = project
38+
ij_go_move_all_imports_in_one_declaration = true
39+
ij_go_move_all_stdlib_imports_in_one_group = true
40+
ij_go_remove_redundant_import_aliases = false
41+
ij_go_run_go_fmt_on_reformat = true
42+
ij_go_use_back_quotes_for_imports = false
43+
ij_go_wrap_comp_lit = off
44+
ij_go_wrap_comp_lit_newline_after_lbrace = true
45+
ij_go_wrap_comp_lit_newline_before_rbrace = true
46+
ij_go_wrap_func_params = off
47+
ij_go_wrap_func_params_newline_after_lparen = true
48+
ij_go_wrap_func_params_newline_before_rparen = true
49+
ij_go_wrap_func_result = off
50+
ij_go_wrap_func_result_newline_after_lparen = true
51+
ij_go_wrap_func_result_newline_before_rparen = true

azure-devops-client/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package AzureDevopsClient
33
import (
44
"errors"
55
"fmt"
6-
resty "github.com/go-resty/resty/v2"
7-
"github.com/prometheus/client_golang/prometheus"
86
"net/url"
97
"strconv"
108
"strings"
119
"sync/atomic"
10+
11+
resty "github.com/go-resty/resty/v2"
12+
"github.com/prometheus/client_golang/prometheus"
1213
)
1314

1415
type AzureDevopsClient struct {

collector_base.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package main
22

33
import (
4+
"time"
5+
46
log "github.com/sirupsen/logrus"
57
devopsClient "github.com/webdevops/azure-devops-exporter/azure-devops-client"
6-
"time"
78
)
89

910
type CollectorBase struct {

collector_processor_agentpool.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
56
log "github.com/sirupsen/logrus"
67
)
78

collector_processor_general.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
56
log "github.com/sirupsen/logrus"
67
)
78

collector_processor_project.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
56
log "github.com/sirupsen/logrus"
67
devopsClient "github.com/webdevops/azure-devops-exporter/azure-devops-client"
78
)

collector_processor_query.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
56
log "github.com/sirupsen/logrus"
67
)
78

collector_project.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package main
22

33
import (
44
"context"
5+
"sync"
6+
57
log "github.com/sirupsen/logrus"
68
devopsClient "github.com/webdevops/azure-devops-exporter/azure-devops-client"
7-
"sync"
89
)
910

1011
type CollectorProject struct {

config/opts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package config
22

33
import (
44
"encoding/json"
5-
log "github.com/sirupsen/logrus"
65
"time"
6+
7+
log "github.com/sirupsen/logrus"
78
)
89

910
type (

main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ package main
22

33
import (
44
"fmt"
5-
"github.com/jessevdk/go-flags"
6-
"github.com/prometheus/client_golang/prometheus/promhttp"
7-
log "github.com/sirupsen/logrus"
8-
AzureDevops "github.com/webdevops/azure-devops-exporter/azure-devops-client"
9-
"github.com/webdevops/azure-devops-exporter/config"
105
"net/http"
116
"os"
127
"path"
138
"runtime"
149
"strings"
10+
11+
"github.com/prometheus/client_golang/prometheus/promhttp"
12+
log "github.com/sirupsen/logrus"
13+
AzureDevops "github.com/webdevops/azure-devops-exporter/azure-devops-client"
14+
"github.com/webdevops/azure-devops-exporter/config"
1515
)
1616

1717
const (

0 commit comments

Comments
 (0)