{"library":"sqruff","title":"Sqruff SQL Linter","type":"library","description":"Sqruff is a high-performance SQL linter and formatter written in Rust, designed for speed and portability. It supports various SQL dialects, including ANSI, BigQuery, and Postgres, with ongoing development for others like Snowflake and Clickhouse. Currently at version 0.38.0, it maintains an active release cadence with frequent updates and is often noted for its significant speed improvement over similar tools.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install sqruff"],"cli":{"name":"sqruff","version":"sqruff 0.38.0"}},"imports":["Run 'sqruff <command>' from the terminal"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":"https://quarylabs.com","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/sqruff/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"# Create a SQL file to lint\necho \"SELECT  col1, col2 FROM my_table;\" > bad_sql.sql\n\n# Create a configuration file (e.g., .sqruff)\necho \"[sqruff]\\ndialect = postgres\" > .sqruff\n\n# Run the linter\nsqruff lint bad_sql.sql\n\n# Or lint all SQL files in the current directory with the config\nsqruff lint .\n\n# Run the formatter\nsqruff format bad_sql.sql\n","lang":"bash","description":"This quickstart demonstrates how to install Sqruff and use its primary command-line interface to lint and format a SQL file. It involves creating a sample SQL file and a `.sqruff` configuration file to specify the SQL dialect.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}