chore: more work done and planning with AI.
This commit is contained in:
@@ -1,26 +1,68 @@
|
||||
# PgTidy house style — all fields shown with their default values.
|
||||
# PgTidy house style — all fields with their default values.
|
||||
# Place as .pgtidy.yaml in your project root (or any parent directory).
|
||||
# Any field you omit keeps its default.
|
||||
|
||||
# Indentation string for one level (two spaces).
|
||||
indent: " "
|
||||
# --- Core ---
|
||||
|
||||
# Line terminator written by the formatter.
|
||||
newline: "\n"
|
||||
indent: " " # One indentation level (two spaces).
|
||||
newline: "\n" # Line terminator emitted by the formatter.
|
||||
|
||||
# Casing for SQL keywords (SELECT, FROM, WHERE, …).
|
||||
# --- Casing ---
|
||||
# upper | lower | preserve
|
||||
keyword_case: upper
|
||||
|
||||
# Casing for unquoted identifiers (column names, variable names, …).
|
||||
# upper | lower | preserve
|
||||
ident_case: lower
|
||||
keyword_case: upper # SQL keywords (SELECT, FROM, WHERE, …)
|
||||
ident_case: lower # Unquoted identifiers (column/variable names)
|
||||
type_case: lower # Built-in type names (text, integer, boolean, …)
|
||||
alias_case: lower # Token immediately following AS in SELECT / FROM
|
||||
builtin_case: lower # Built-in function names (COALESCE, MAX, NOW, …)
|
||||
custom_type_case: lower # User-defined / domain types not in the built-in set
|
||||
|
||||
# Casing for built-in type names (text, integer, boolean, …).
|
||||
# upper | lower | preserve
|
||||
type_case: lower
|
||||
# --- Query layout ---
|
||||
|
||||
# Comma placement in multi-line parameter / column lists.
|
||||
# leading → comma at the start of the continuation line (,col)
|
||||
# trailing → comma at the end of the preceding line (col,)
|
||||
commas: leading
|
||||
commas: leading # leading → ,col | trailing → col,
|
||||
|
||||
align_columns: false # Pad SELECT list items so values align vertically
|
||||
align_line_comments: false # Align trailing -- comments within a block
|
||||
select_align_as: false # Pad between expression and AS keyword in SELECT list
|
||||
set_align_equal: false # Align = in UPDATE SET list
|
||||
indent_join: false # Extra indentation for JOIN … ON lines
|
||||
join_indent_size: 1 # Number of extra indent levels for JOINs
|
||||
|
||||
# always | when_long | never
|
||||
where_wrap: always # Each AND/OR condition on its own line
|
||||
|
||||
where_and_or_indent: true # AND/OR indented one level under WHERE
|
||||
|
||||
# --- Subqueries ---
|
||||
# same_line | new_line
|
||||
|
||||
subquery_opening: same_line # Opening ( placement
|
||||
subquery_content: new_line # Content indentation inside parens
|
||||
subquery_closing: new_line # Closing ) placement
|
||||
subquery_space_before_paren: false # Space before ( in subqueries
|
||||
|
||||
# --- INSERT ---
|
||||
|
||||
insert_collapse_values: true # Fold multiple VALUES rows onto fewer lines
|
||||
|
||||
# --- Routines (functions / procedures) ---
|
||||
|
||||
align_param_types: true # Pad param names so type column aligns across all params
|
||||
routine_as_wrap: true # Newline before AS $$ (false = keep AS on same line)
|
||||
|
||||
# --- PL/pgSQL body ---
|
||||
|
||||
plpgsql_max_blank_lines: 1 # Max consecutive blank lines in body
|
||||
plpgsql_declare_align_type: false # Align type column in DECLARE block
|
||||
plpgsql_declare_align_eq: false # Align := / = in DECLARE block
|
||||
plpgsql_if_then_newline: true # THEN on its own line (false = same line as condition)
|
||||
plpgsql_loop_collapse: true # Collapse empty loop bodies to one line
|
||||
|
||||
# --- Expressions ---
|
||||
|
||||
binary_op_align: false # Align =, <>, || etc. vertically in WHERE/expression lists
|
||||
space_after_comma_in_calls: false # Space after , in function calls: func(a, b)
|
||||
case_when_wrap: false # Each WHEN … THEN on its own line
|
||||
case_end: new_line # END placement: same_line | new_line
|
||||
case_collapse: false # Collapse short CASE expressions to one line
|
||||
record_space_before_paren: false # Space before ( in ROW(…) / record constructors
|
||||
|
||||
Reference in New Issue
Block a user