Skip to content

2.25.1.0-b21

@jaki jaki tagged this 13 Dec 22:13
Summary:
Add some more arc lint rules for postgres files:

- bad_variable_declaration_spacing: variable declarations come in two
  styles:

  - no alignment: only one space between type name and variable name.
  - alignment: the variable name should be aligned to 12 cols after the
    start of the type name (the indent level).  If the type name is too
    large for such alignment to be possible, then fall back to the above
    no alignment case.

- bad_spacing_after_if_else_for_while: there should be a space between
  "if" and "(".  Similar for "if else", "for", and "while".

Also improve existing likely_bad_*_in_err* rules to avoid false
positives on unrelated functions such as "GUC_check_errdetail" by
enforcing whitespace before "errdetail".  And fix
likely_bad_function_signature to not have backslash in a bracket
expression because that is interpretted as a literal backslash, not
escaping the '('.

Lastly, reorganize the entire script with comments and grouping relevant
rules.
Jira: DB-14496

Test Plan:
Close: #25298
Jenkins: skip

Reviewers: tnayak, amartsinchyk, patnaik.balivada

Reviewed By: patnaik.balivada

Subscribers: patnaik.balivada, yql

Differential Revision: https://phorge.dev.yugabyte.com/D40518
Assets 2
Loading