https://github.com/lowlydba/tsqllint-action
✅ Github Action to run TSQLLint.
https://github.com/lowlydba/tsqllint-action
actions github-actions hacktoberfest lint linter t-sql tsqllint
Last synced: 11 months ago
JSON representation
✅ Github Action to run TSQLLint.
- Host: GitHub
- URL: https://github.com/lowlydba/tsqllint-action
- Owner: lowlydba
- License: mit
- Created: 2022-08-28T20:23:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-19T15:33:54.000Z (about 1 year ago)
- Last Synced: 2025-02-21T19:01:49.746Z (11 months ago)
- Topics: actions, github-actions, hacktoberfest, lint, linter, t-sql, tsqllint
- Language: PowerShell
- Homepage:
- Size: 96.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# TSQLLint GitHub Action
[](https://github.com/lowlydba/tsqllint-action/actions/workflows/lint.yml)
[](https://github.com/lowlydba/tsqllint-action/actions/workflows/test.yml)
This action runs the latest [TSQLLint](https://github.com/tsqllint/tsqllint).
## Inputs
### `path`
**Optional** - Space separated path(s) to run linter against.
Wildcards can be specified using `*`.
Default is `*.sql`.
### `config`
**Optional** - Path to a [configuration file](https://github.com/tsqllint/tsqllint#configuration)
for the linter.
Default is `.github/linters/.tsqllintrc`
### `comment`
**Optional** - Create comment with summary of linter results.
Default is `false`.
### `only-changed-files`
**Optional** - If run in a pull request, only lint Modified or Added files.
Default is `false`.
### `append-comment`
**Optional** - Append results from multiple runs in a single comment if `comment` is also `true`.
Default is `false`.
### `summary`
**Optional** - Add linter results to the job summary.
Default is `false`.
### `compare-branch`
**Optional** - Branch to diff against when using `only-changed-files`.
Default is `main`.
## Examples
```yml
jobs:
build:
name: Lint Code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3.0.2
- name: TSQLLint
uses: lowlydba/tsqllint-action@v1.0.0
with:
path: "*.sql *.tsql"
config: "./.github/linter-conf/.tsqllintrc_150"
comment: true
```
## Visuals

## Notes
* If using `append`, running [marocchino/sticky-pull-request-comment][sticky-pull-request] first with the `delete` parameter may be required.
See the test workflow as an example.
[sticky-pull-request]: https://github.com/marocchino/sticky-pull-request-comment