ekristen/libnuke

View on GitHub
pkg/filter/filter.go

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%

Method Filter.UnmarshalYAML has 53 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (f *Filter) UnmarshalYAML(unmarshal func(interface{}) error) error {
    var value string

    if unmarshal(&value) == nil {
        f.Type = Exact
Severity: Minor
Found in pkg/filter/filter.go - About 1 hr to fix

    Method Filter.Match has 52 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (f *Filter) Match(o string) (bool, error) { //nolint:gocyclo
        switch f.Type {
        case Empty, Exact:
            return f.Value == o, nil
    
    
    Severity: Minor
    Found in pkg/filter/filter.go - About 1 hr to fix

      Method Filter.Match has 10 return statements (exceeds 4 allowed).
      Wontfix

      func (f *Filter) Match(o string) (bool, error) { //nolint:gocyclo
          switch f.Type {
          case Empty, Exact:
              return f.Value == o, nil
      
      
      Severity: Major
      Found in pkg/filter/filter.go - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status