Skip to main content

A simple linter for dbt projects

Project description

formatforge

A simple linter for dbt (Data Build Tool) projects, designed to help you maintain clean and consistent SQL code in your dbt models. formatforge focuses on enforcing SQL style guidelines such as using leading commas, uppercase SQL keywords, and lowercase for everything else, ensuring your dbt project adheres to your business's specific coding standards.

Installation

formatforge is built with Python and can be easily installed using Poetry. Ensure you have Poetry installed; if not, follow the installation instructions on the Poetry website.

To install formatforge, clone the repository and run the following command within the cloned directory:

$ poetry add formatforge

This command creates a virtual environment and installs all necessary dependencies.

Usage

After installation, you can run formatforge to lint your dbt project files. Here's a basic example:

$ formatforge uppercase path/to/your/model.sql

Replace path/to/your/model.sql with the actual path to the SQL file you want to lint.

Options

  • --file: Specify the SQL file to lint.
  • --uppercase: Enable or disable uppercase SQL keywords. Default is enabled.
  • --leading-comma: Enable or disable leading commas. Default is enabled.

Contributing

We welcome contributions to formatforge! If you have suggestions for improvements or bug fixes, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Develop your changes and ensure they adhere to the project's coding standards.
  4. Submit a pull request with a clear description of your changes.

Please refer to CONTRIBUTING.md for more detailed information on contributing.

Reporting Issues

If you encounter any issues or have suggestions for improvements, please open an issue on GitHub with a detailed description of the problem or suggestion. Include any relevant details that could help us understand or reproduce the issue.

License

formatforge is open source and available under the MIT License.

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

formatforge-0.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

formatforge-0.1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file formatforge-0.1.2.tar.gz.

File metadata

  • Download URL: formatforge-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.5 Darwin/23.2.0

File hashes

Hashes for formatforge-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cf5256af1b5e850bfa194059bde6fb701f764fd5246d5c05ce19e9affd0c549d
MD5 9182fcbadc20356c5923d8804743d2b0
BLAKE2b-256 405366ad2f70967539413f0e55b4476d1c30d2c2ef60bece721d9936e45dbdf2

See more details on using hashes here.

File details

Details for the file formatforge-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: formatforge-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.5 Darwin/23.2.0

File hashes

Hashes for formatforge-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 793cdc76c8dfa1c32ef0f53b643d723f6e088d994d770108303eaca13dfa0955
MD5 a80616e349f12cba7e5dec49c4ec8330
BLAKE2b-256 c60bd5752c562bd0689ca00777a3c5825d037ade5ca66d9a128e2854b5eaf95d

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