Rule represent a linter rule
| 55 | |
| 56 | // Rule represent a linter rule |
| 57 | type Rule interface { |
| 58 | // Name returns name of the rule, it should be a unique identifier |
| 59 | Name() string |
| 60 | |
| 61 | // Apply calls with arguments and flags for the rule from config file |
| 62 | // if flags or arguments are invalid or not expected return an error |
| 63 | // Apply is called before Validate |
| 64 | Apply(setting RuleSetting) error |
| 65 | |
| 66 | // Validate validates the rule for given commit message |
| 67 | // if given commit is valid, return true and messages slice are ignored |
| 68 | // if invalid, return a error messages with false |
| 69 | Validate(msg Commit) (issue *Issue, isValid bool) |
| 70 | } |
no outgoing calls
no test coverage detected