yoheimuta / protolint

A pluggable linter and fixer to enforce Protocol Buffer style and conventions.
MIT License
555 stars 51 forks source link

Configure rule severity via protolint config #416

Closed profhenry closed 2 months ago

profhenry commented 2 months ago

https://github.com/yoheimuta/protolint/pull/335 introduced the severity feature. By default all rules have the ERROR severity. It seems that it was intended to configure the severity for a rule via the protolint config file. Unfortunately this does not work :-/.

For example when adding

rules_option:
    max_line_length:
      severity: warning

to the protolint config you get the following error

yaml: unmarshal errors:
  line 26: field severity not found in type config.MaxLineLengthOption
profhenry commented 2 months ago

Configuring the severity does not work for MaxLineLengthRule :-/. This will be fixed with #419.