Skip to content
/ pgsql-workspace Public template

A ready-to-use workspace for SQL projects focused on PostgreSQL. It features a devcontainer with custom VS Code settings and essential repo files, along with integrated formatting, linting, spell checking, pre-commit hooks, and automated release and dependency updates.

License

Notifications You must be signed in to change notification settings

Jekwwer/pgsql-workspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PostgreSQL Workspace

GitHub Release GitHub Release Date GitHub commits since latest release Libraries.io dependency status for GitHub repo Issues Maintained GitHub License

Project Overview πŸš€

This repository is a robust template for working with SQL files, primarily oriented towards PostgreSQL. It comes equipped with tools for code formatting and linting, spell checking, a ready-to-use devcontainer, custom VS Code settings, essential repository files, automated releasing, and extensive documentation to support effective project management and customization.

Features ✨

  • Devcontainer: Provides an Ubuntu-based environment with Python and Node support, custom VS Code settings and extensions, and a local PostgreSQL service.
  • Formatting: Ensures a consistent code style using Prettier, EditorConfig, markdownlint, and SQLFluff for SQL files.
  • Spell Checking: Automatically highlights spelling errors.
  • Pre-commit Hooks: Automates quality checks before each commit.
  • Release Automation: Manages releases automatically.
  • Dependency Updates Automation: Keeps dependencies up-to-date via Dependabot.

Installation πŸ“¦

This setup is designed for GitHub Codespaces. Running locally has not been tested and may require additional configuration.

Open in GitHub Codespaces

Usage πŸ› οΈ

Formatting

Most formatting tasks are automated and enforced using various tools. Feel free to adjust these settings for your project. The repository configurations are described in the [STYLEGUIDE.md][STYLEGUIDE].

  • SQL Files: The project uses SQLFluff for SQL file formatting. SQLFluff automatically formats SQL files in the editor when the following settings are enabled (already configured in the devcontainer):

    • editor.formatOnPaste: true
    • editor.formatOnSave: true
    • files.autoSave: onFocusChange

    To check your SQL code, run:

    npm run sqlfluff:check

    To fix fixable issues, run:

    npm run sqlfluff:write
  • Prettier-supported Files: Use Prettier to format all other files supported by Prettier.

    To apply formatting to your code, run:

    npm run format:write

    For a formatting check without modifying files, run:

    npm run format:check

Spell Checking

To run spell checking, execute:

npm run spell:check

Adjust the cspell.json configuration file if needed.

Contributing πŸ‘₯

Contributions are welcome! Please read the Contributing Guidelines and check the Issues page.

License πŸ›‘οΈ

This project is licensed under the MIT License.

Contact πŸ“¬

For questions, reach out via evgenii.shiliaev@jekwwer.com or open an issue.


This document is based on a template by Evgenii Shiliaev, licensed under CC BY 4.0. All additional content is licensed under LICENSE.

About

A ready-to-use workspace for SQL projects focused on PostgreSQL. It features a devcontainer with custom VS Code settings and essential repo files, along with integrated formatting, linting, spell checking, pre-commit hooks, and automated release and dependency updates.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •