devcontainers-contrib / features

🐳 Extra add-in features for Devcontainers and GitHub Codespaces
MIT License
240 stars 126 forks source link

Extend the sqlfluff feature to support the injection of sqlfluff plugins #551

Closed ovirs closed 9 months ago

ovirs commented 10 months ago

Problem

I'm are using the sqlfluff linter in a dbt project. Support for dbt in sqlfluff is added via the sqlfluff-templater-dbt plugin which needs to be installed alongside sqlfluff.

Solution

Extend the sqlfluff feature to support an optional plugins option that can pass a space separated list of plugins to be installed.

Example:

{
  "features": {
    "ghcr.io/devcontainers-contrib/features/sqlfluff:1": {
      "version": "latest",
      "plugins": "sqlfluff-templater-dbt==2.3.5"
    }
  }
}

Notes

First time contributing to this project - feel free to let me know if there's anything else I need/should add

danielbraun89 commented 9 months ago

Hi @ovirs thanks for the contribution! I will merge your PR as is, and might standardize it later with a follow up PR