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

How to build and package

(notes for foregetful dan)

# https://packaging.python.org/en/latest/tutorials/packaging-projects/
python3 -m build
python3 -m twine upload dist/*

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.1.tar.gz (8.3 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.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dang_sqlfluffer-0.1.1.tar.gz
  • Upload date:
  • Size: 8.3 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.1.tar.gz
Algorithm Hash digest
SHA256 e64f26bbbf2f2ad62463998372135dcf26a8da88a210bb350aeaa2a97385ac0d
MD5 36a43e0c121f1ae2a3de56935d4cfffa
BLAKE2b-256 1e47e39ea6bab0f2a02aa51c80c4caf70a4108f8ba9fedb7281bea9905c6c325

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dang_sqlfluffer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9bcdad2fc4207e6c6e5b85bb6bd6da0cde61e63d76a7af383cfb192203b4d714
MD5 8d75b861cd1d8c512a1bdbc997ce0292
BLAKE2b-256 0aeb469bb9a61471793b7f7d7537dad2f90bdb62ed4e3a1d3f0c16cef4bf0526

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