Rule represent a linter rule
| 42 | |
| 43 | // Rule represent a linter rule |
| 44 | type Rule interface { |
| 45 | // Name returns name of the rule, it should be a unique identifier |
| 46 | Name() string |
| 47 | |
| 48 | // Apply calls with arguments and flags for the rule from config file |
| 49 | // if flags or arguments are invalid or not expected return an error |
| 50 | // Apply is called before Validate |
| 51 | Apply(setting RuleSetting) error |
| 52 | |
| 53 | // Validate validates the rule for given commit message |
| 54 | // if given commit is valid, return true and messages slice are ignored |
| 55 | // if invalid, return a error messages with false |
| 56 | Validate(msg Commit) (issue *Issue, isValid bool) |
| 57 | } |
no outgoing calls
no test coverage detected