Skip to main content

my convenient opinionated wrapper around sqlfluff

Project description

dang-sqlfluffer

PyPI Changelog Tests License

my convenient opinionated wrapper around sqlfluff

Current status

Invoke either lint or fix; lint is default.

# default behavior is to lint using config/my.sqlfluff
$ echo 'select 1 as id, 2 hello, 3 world order by id' | dang-sqlfluff -

== [stdin] FAIL                                                                                                                      L:   1 | P:   1 | CP01 | Keywords must be upper case.
                       | [capitalisation.keywords]
L:   1 | P:   1 | LT09 | Select targets should be on a new line unless there is
                       | only one select target. [layout.select_targets]
L:   1 | P:  10 | CP01 | Keywords must be upper case.
                       | [capitalisation.keywords]
L:   1 | P:  19 | AL02 | Implicit/explicit aliasing of columns.
                       | [aliasing.column]
L:   1 | P:  28 | AL02 | Implicit/explicit aliasing of columns.
                       | [aliasing.column]
L:   1 | P:  34 | CP01 | Keywords must be upper case.
                       | [capitalisation.keywords]
L:   1 | P:  40 | CP01 | Keywords must be upper case.
                       | [capitalisation.keywords]
All Finished 📜 🎉!

Boilerplate

Installation

Install this tool using pip:

pip install dang-sqlfluffer

Usage

For help, run:

dang-sqlfluff --help

You can also use:

python -m dang_sqlfluffer --help

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd dang-sqlfluffer
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

python -m pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dang_sqlfluffer-0.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dang_sqlfluffer-0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file dang_sqlfluffer-0.1.tar.gz.

File metadata

  • Download URL: dang_sqlfluffer-0.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for dang_sqlfluffer-0.1.tar.gz
Algorithm Hash digest
SHA256 8c6ae4571069d8e4ba86947a9194c3e6c0791311c5f35da0f3f91fc31c72f251
MD5 0aa2179249bdde7c9123afc398f91dc7
BLAKE2b-256 934ddc0a81fe2752054ce996bc2955d46e56e2c80b7db28c07888c1433fed599

See more details on using hashes here.

File details

Details for the file dang_sqlfluffer-0.1-py3-none-any.whl.

File metadata

  • Download URL: dang_sqlfluffer-0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for dang_sqlfluffer-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab2b0499e57f5e456008e328ac51ed6f3de70584063aacc7f134f4280515e7ff
MD5 22e98f77391d0ebbc2ae259b524bb3e9
BLAKE2b-256 6f901cf0ad854af0872548c8aaaf92c399bb8d7ef0d2a053e99ad99fc7de6c8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page