Git Product home page Git Product logo

vscode-sqlfluff-extended's People

Contributors

alex-mirkin avatar dependabot[bot] avatar dorzey avatar emekdahl avatar itsvipa avatar robertostermann avatar ssassi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vscode-sqlfluff-extended's Issues

Problem with dbt templater

Hi, I've been running into a similar issue as this issue on the other vscode-sqlfluff repository. When I set

[sqlfluff]
dialect = snowflake
templater = dbt

inside of my .sqlfluff file I am unable to get the extension to properly lint my files, but when I either leave templater argument blank or set it to Jinja the extension functions properly.
I'm running sqlfluff v. 1.1.0 and sqlfluff-templater-dbt v. 1.1.0 on MacOS. Happy to provide any other information that may be of use.

mojibake (text garbling) may occur when execute fix

mojibake occurs when fixing the following file.
"sqlfluff" directly does not cause this, so I believe it has something to do with the extension.

sqlfluff command

sqlfluff fix --dialect bigquery --config .sqlfluff work/a.sql

This command does not cause mojibake. ("force" would have done the same.)

target sql file

-- 割引金額
select a from b;

after fixed

-- 割引��額
SELECT a FROM b;

.sqlfluff

[sqlfluff]
exclude_rules = L032, L016

[sqlfluff:rules:L010]
capitalisation_policy = upper

[sqlfluff:rules:L014]
extended_capitalisation_policy = lower
ignore_words = _PARTITIONTIME, _PARTITIONDATE

[sqlfluff:rules:L019]
comma_style = leading

[sqlfluff:rules:L026]
force_enable = False

[sqlfluff:rules:L057]
quoted_identifiers_policy = none

settings.json

    "sqlfluff.dialect": "bigquery",
    "sqlfluff.config": ".sqlfluff",
    "sqlfluff.linter.run": "onSave",

Reference link

https://en.wikipedia.org/wiki/Mojibake

Format removing file content

Hi!
Thanks for doing this extension. The original was not working for me so I tried this one.
The linTER is working correctly, but the format option is removing the content of the file.
Do you know why it could be happening?

configuration file cannot be read

configuration file cannot be read.
Where is the default "sqllfluff.format.workingDirectory"?

I expected the root of the project, but it seems different.

error

Error loading config: Extra config '.sqlfluff' does not exist.

settings.json

    "sqlfluff.dialect": "bigquery",
    "sqlfluff.linter.run": "onSave",
    "sqlfluff.config": ".sqlfluff",

directory tree

/
├ sql
│  └ a.py <- format target file
└ .sqlfluff

temporary solution

    "sqlfluff.dialect": "bigquery",
    "sqlfluff.linter.run": "onSave",
    "sqlfluff.config": ".sqlfluff",
    "sqlfluff.format.workingDirectory": "d:/github/repository_name" <- new!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.