Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fe87188

Browse files
committedSep 10, 2019
dev: enable whitespace linter on this repo
The whitespace linter was added in #673. Enable it and fix found issues.
1 parent c7dee2c commit fe87188

File tree

4 files changed

+1
-4
lines changed

4 files changed

+1
-4
lines changed
 

‎.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ linters:
7575
- unparam
7676
- unused
7777
- varcheck
78+
- whitespace
7879

7980
# don't enable:
8081
# - depguard - until https://github.com/OpenPeeDeeP/depguard/issues/7 gets fixed

‎pkg/commands/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func (e *Executor) initConfig() {
3434
}
3535
e.initRunConfiguration(pathCmd) // allow --config
3636
cmd.AddCommand(pathCmd)
37-
3837
}
3938

4039
func (e *Executor) executePathCmd(_ *cobra.Command, args []string) {

‎pkg/lint/load.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ type ContextLoader struct {
3939

4040
func NewContextLoader(cfg *config.Config, log logutils.Log, goenv *goutil.Env,
4141
lineCache *fsutils.LineCache, fileCache *fsutils.FileCache) *ContextLoader {
42-
4342
return &ContextLoader{
4443
cfg: cfg,
4544
log: log,

‎pkg/lint/runner.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ type Runner struct {
3131

3232
func NewRunner(astCache *astcache.Cache, cfg *config.Config, log logutils.Log, goenv *goutil.Env,
3333
lineCache *fsutils.LineCache, dbManager *lintersdb.Manager) (*Runner, error) {
34-
3534
icfg := cfg.Issues
3635
excludePatterns := icfg.ExcludePatterns
3736
if icfg.UseDefaultExcludes {
@@ -101,7 +100,6 @@ type lintRes struct {
101100

102101
func (r *Runner) runLinterSafe(ctx context.Context, lintCtx *linter.Context,
103102
lc *linter.Config) (ret []result.Issue, err error) {
104-
105103
defer func() {
106104
if panicData := recover(); panicData != nil {
107105
err = fmt.Errorf("panic occurred: %s", panicData)

0 commit comments

Comments
 (0)
Please sign in to comment.