{"id":18794517,"url":"https://github.com/liquipedia/sqllint","last_synced_at":"2025-12-29T18:30:12.067Z","repository":{"id":47462476,"uuid":"344533164","full_name":"Liquipedia/SqlLint","owner":"Liquipedia","description":"A thin wrapper around the SqlParser from the phpMyAdmin project which can be used to lint any amount of sql files from the command line.","archived":false,"fork":false,"pushed_at":"2022-11-11T14:30:38.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-14T13:42:49.062Z","etag":null,"topics":["lint","linter","linting","mysql","sql"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Liquipedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-04T16:10:14.000Z","updated_at":"2023-06-18T03:47:01.000Z","dependencies_parsed_at":"2023-01-21T19:45:49.977Z","dependency_job_id":null,"html_url":"https://github.com/Liquipedia/SqlLint","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liquipedia%2FSqlLint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liquipedia%2FSqlLint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liquipedia%2FSqlLint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liquipedia%2FSqlLint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Liquipedia","download_url":"https://codeload.github.com/Liquipedia/SqlLint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239718563,"owners_count":19685766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lint","linter","linting","mysql","sql"],"created_at":"2024-11-07T21:29:39.461Z","updated_at":"2025-12-29T18:30:12.015Z","avatar_url":"https://github.com/Liquipedia.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SqlLint\n![Code Style](https://github.com/Liquipedia/SqlLint/workflows/Code%20Style/badge.svg)\n\u003ca href=\"https://packagist.org/packages/liquipedia/sqllint\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/liquipedia/sqllint\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/liquipedia/sqllint\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/liquipedia/sqllint\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/liquipedia/sqllint\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/liquipedia/sqllint\" alt=\"License\"\u003e\u003c/a\u003e\n\nThis is a thin wrapper around the SqlParser from the [phpMyAdmin project][1] which can be used to lint any amount of sql files from the command line.\n\n## Installation\n\nPlease use [Composer][2] to install:\n\n```sh\ncomposer require liquipedia/sqllint --dev\n```\n\n## Usage\n\n### Command line utility\n\n```sh\n./vendor/bin/sqllint\n```\n\n```sh\n./vendor/bin/sqllint --report=junit \u003e report-junit.xml\n```\n\n### Via composer script\n\nAdd this to your composer.json\n\n```json\n{\n\t\"require-dev\": {\n\t\t\"liquipedia/sqllint\": \"*\"\n\t},\n\t\"scripts\": {\n\t\t\"sqllint\": [\n\t\t\t\"sqllint\"\n\t\t],\n\t\t\"sqllint-junit\": [\n\t\t\t\"sqllint --report=junit \u003e report-junit.xml\"\n\t\t]\n\t}\n}\n```\n\nand run\n\n```sh\ncomposer sqllint\n```\n\n### Parameter\nTo check out parameters, please refer to the `src/Parameters.php` file or use the `--help` parameter.\n\n### `.sqllint.json`\nParameters for SqlLint can optionally also be provided via a `.sqllint.json` file in the project root. Parameters passed via command line always have precedence over the parameters set in `.sqllint.json`.\n\nExample:\n```json\n{\n\t\"report\": \"junit\"\n}\n```\n\n[1]:https://github.com/phpmyadmin/sql-parser\n[2]:https://getcomposer.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquipedia%2Fsqllint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliquipedia%2Fsqllint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquipedia%2Fsqllint/lists"}