Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
borama committed Oct 3, 2024
1 parent 62f62dc commit 2c34602
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ your [SCM hooks](https://github.com/sds/overcommit).
* [Linters](#linters)
* [Editor Integration](#editor-integration)
* [Git Integration](#git-integration)
* [GitHub Integration](#github-integration)
* [Rake Integration](#rake-integration)
* [Contributing](#contributing)
* [Changelog](#changelog)
Expand Down Expand Up @@ -181,6 +182,35 @@ If you'd like to integrate `slim-lint` into your Git workflow, check out
[overcommit](https://github.com/sds/overcommit), a powerful and flexible
Git hook manager.

## Github Integration

To run `slim-lint` in your [GitHub Actions](https://docs.github.com/en/actions) CI pipeline,
use the `github` reporter, for example:

```yml
on:
pull_request:
push:
branches: [ main ]
jobs:
lint:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Lint Slim templates for consistent style
run: bundle exec slim-lint -r github app/views
```

On lint failures, this setup will create annotations in your pull requests on GitHub.

## Rake Integration

To execute `slim-lint` via a [Rake](https://github.com/ruby/rake) task, make
Expand Down

0 comments on commit 2c34602

Please sign in to comment.