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

SQL Style Guide och linter #47

Open
mosbth opened this issue Feb 5, 2022 · 2 comments
Open

SQL Style Guide och linter #47

mosbth opened this issue Feb 5, 2022 · 2 comments
Assignees

Comments

@mosbth
Copy link
Member

mosbth commented Feb 5, 2022

Is is of importance to follow style guides when coding in all programming languages.

When we code SQL we could follow the following guide:

If you disagree with things in the styleguide, then read:

@mosbth mosbth self-assigned this Feb 5, 2022
@mosbth mosbth changed the title SQL Style Guide SQL Style Guide och linter Jan 25, 2024
@mosbth
Copy link
Member Author

mosbth commented Jan 25, 2024

Apropå linter som säkerställer att man följer en kodstil

Vi har fått in lite tips om tex 'Prettier SQL VSCode' som är en plugin till vscode.

det var någon som hade frågat angående sql-formatter i VSCode. Satt och letade lite och hittade en som verkade trevlig så tänkte bara dela med mig. Den heter Prettier SQL VSCode. Man kan ställa in allt möjligt. tex att keyword ska vara right-align. man kan skriva keywords med små bokstäver så ändrar den till stora när man sparar etc etc...

https://marketplace.visualstudio.com/items?itemName=inferrinizzard.prettier-sql-vscode

@mosbth
Copy link
Member Author

mosbth commented Jan 25, 2024

När man vill köra motsvarande via terminalen så är nog detta ingången:
https://www.npmjs.com/package/prettier-plugin-sql

Det är alltså en extension/plugin till kodformatteraren prettier.
https://prettier.io/

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

No branches or pull requests

1 participant