New 🌊 wave for @helm

Commit 1114e769

1114e769d170Merged

Svyatoslav Dumchenko <[email protected]> · 4 years ago · 32 files · ~32 modified

Description

Merge pull request #239 from helmwave/error-wrap

Wrap external errors

Details

Commit
1114e769d170
Parent
6ed7ccb73812
Merge parent
477d33580022

.golangci.ymlmodifiedView file

@@ -22,7 +22,7 @@
2222 - maligned # deprecated
2323 - scopelint # deprecated
2424 - varnamelen # I don't think short names are bad
25- - wrapcheck # TODO: need to wrap all external errors into our own
25+ #- wrapcheck # TODO: need to wrap all external errors into our own
2626 - wsl # lots of style checks
2727
2828 # all available settings of specific linters
@@ -353,6 +353,41 @@
353353 multi-if: false # Enforces newlines (or comments) after every multi-line if statement
354354 multi-func: false # Enforces newlines (or comments) after every multi-line function signature
355355
356+ wrapcheck:
357+ # An array of strings that specify substrings of signatures to ignore.
358+ # If this set, it will override the default set of ignored signatures.
359+ # See https://github.com/tomarrell/wrapcheck#configuration for more information.
360+ ignoreSigs:
361+ - .Errorf(
362+ - errors.New(
363+ - errors.Unwrap(
364+ - .Wrap(
365+ - .Wrapf(
366+ - .WithMessage(
367+ - .WithMessagef(
368+ - .WithStack(
369+ ignoreSigRegexps:
370+ - \.New.*Error\(
371+ ignorePackageGlobs:
372+ - encoding/*
373+ - github.com/pkg/*
374+ - github.com/helmwave/helmwave/*
375+
376+ wsl:
377+ # See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for
378+ # documentation of available settings. These are the defaults for
379+ # `golangci-lint`.
380+ allow-assign-and-anything: false
381+ allow-assign-and-call: true
382+ allow-cuddle-declarations: false
383+ allow-multiline-assign: true
384+ allow-separated-leading-comment: false
385+ allow-trailing-comment: false
386+ force-case-trailing-whitespace: 0
387+ force-err-cuddling: false
388+ force-short-decl-cuddling: false
389+ strict-append: true
390+
356391 issues:
357392 # Independently from option `exclude` we use default exclude patterns,
358393 # it can be disabled by this option. To list all