Using GitHub Actions to Annotate PRsΒΆ

There are two way to utilize SQLFluff to annotate Github PRs.

  1. When sqlfluff lint is run with the --format github-annotation-native option, it produces output formatted as Github workflow commands which are converted into pull request annotations by Github.

  2. When sqlfluff lint is run with the --format github-annotation option, it produces output compatible with this action from yuzutech. Which uses Github API to annotate the SQL in GitHub pull requests.

Warning

At present (December 2023), limitations put in place by Github mean that only the first 10 annotations will be displayed if the first option (using github-annotation-native) is used. This is a not something that SQLFluff can control itself and so we currently recommend using the the second option above and the action from yuzutech.

There is an open feature request for GitHub Actions which you can track to follow this issue.

For more information and examples on using SQLFluff in GitHub Actions, see the sqlfluff-github-actions repository.