(dst *string, ruleName string, setting lint.RuleSetting)
| 27 | } |
| 28 | |
| 29 | func applyCaseArg(dst *string, ruleName string, setting lint.RuleSetting) error { |
| 30 | if err := setStringArg(dst, setting.Argument); err != nil { |
| 31 | return errInvalidArg(ruleName, err) |
| 32 | } |
| 33 | if slices.Contains(casing.All, *dst) { |
| 34 | return nil |
| 35 | } |
| 36 | return errInvalidArg(ruleName, fmt.Errorf("unknown case %q, valid values: %v", *dst, casing.All)) |
| 37 | } |
| 38 | |
| 39 | // TypeCaseRule validates that commit type matches a given case format. |
| 40 | // Argument: one of the casing.* constants (e.g. casing.Lower). |
no test coverage detected