Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass a configuration programmatically #1983

Closed
jacopofar opened this issue Nov 26, 2021 · 2 comments
Closed

Pass a configuration programmatically #1983

jacopofar opened this issue Nov 26, 2021 · 2 comments

Comments

@jacopofar
Copy link
Contributor

The documentation shows it's possible to run linting and parsing programmatically, but I cannot find a way to pass a configuration when doing it, even after reading the code.

My use case is that I have a few folders with many SQL files containing placeholders that require templating, and want to parse these files without creating config files or generating one on the fly based on other sources.

Is it possible to specify a configuration programmatically as a FluffConfig object?

@jpy-git
Copy link
Contributor

jpy-git commented Nov 26, 2021

Hi @jacopofar, this has already been discussed a lot recently and I've started looking at implementing it.

see #1244 for main discussion and we carried out poll yesterday on how people want the option implemented.

This will be passed as a path rather than a FluffConfig. Reasoning being we don't want to expose sqlfluff internals in the simple API.

Think we can close this issue as a duplicate.

@jacopofar
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants