{"repo":"bolajiwahab/pgrubic","free":true,"listed":false,"github":"https://github.com/bolajiwahab/pgrubic","clone":"git clone https://github.com/bolajiwahab/pgrubic.git","description":"PostgreSQL linter and formatter for schema migrations and design best practices.","language":"Python","stars":17,"topics":["formatter","linter","postgresql","sql","static-code-analysis","style-guide","formatting","static-analysis","pre-commit-hook","postgres"],"license":"GPL-3.0","category":"dev-tools","readme_excerpt":"pgrubic pgrubic is a PostgreSQL linter and formatter for schema migrations and design best practices. Features - Over 100+ rules - Automatic violation correction (e.g., automatically add concurrently to index create statements) - River style code formatting for DML statements - Almost identical styling with pg dump for DDL statements - Python 3.12+ compatibility - Automatic caching to avoid reformatting unchanged files - Violations suppression, statement level, and file level Getting Started For more, see the documentation. Installation pgrubic is only supported on Python 3.12 or higher . Usage For linting, try any of the following: Sample output from linting: For formatting, try any of the following: pgrubic can also be used as a pre-commit hook: Configuration pgrubic can be configured via the [ pgrubic.toml ] file in either the current directory, up to the root directory or the path set by the PGRUBIC CONFIG PATH environment variable. The following configuration options are available in the [ pgrubic.toml ] with the following defaults: Some configuration options can be supplied via CLI arguments such as --check , --diff , --fix . Rules There are 100+ rules. All rules are enabled by default. For a complete list, see here. Formatting style pgrubic uses River style code formatting. Contributing We welcome and greatly appreciate contributions. If you would like to contribute, please see the contributing guidelines. Support Encountering issues? Take a look at the existing GitHub","default_branch":null,"files":null,"tree":[],"storefront":"/r/bolajiwahab","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bolajiwahab/pgrubic/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}