# Style-guide enforcement for GitHub pull requests

import { Aside, LinkCard } from '@astrojs/starlight/components';

EkLine is a complete, standalone tool for enforcing a style guide on every GitHub pull request. It reviews your documentation changes, posts the issues inline on the PR, and blocks the merge until they're resolved. You install one GitHub Action, add one token, and EkLine handles the rest.

You don't assemble a linter, wire up an output adapter, or hand-write rule files. The rules, the style guides, the AI review, the link checking, and the inline PR comments all ship in the product.

<LinkCard
  title="Set up your first PR review"
  description="Add the GitHub Action and run a review in about 3 minutes."
  href="/reviewer/quickstart/github-action/"
/>

## What EkLine enforces out of the box

Every PR review checks your prose against a full style guide, not a handful of regular expression rules you maintain yourself:

- **Style guides** — Choose Google, Microsoft, or Marketing, or build a custom standard from your own rules. Set it once and every PR uses it.
- **Grammar and spelling** — Typos, punctuation, and syntax, with a project dictionary for your product names and jargon.
- **Voice and tone** — Active voice, present tense, sentence length, and readability.
- **Terminology** — Consistent product names and technical terms across the whole repository.
- **Structure and links** — Heading hierarchy, plus broken-link and broken-email detection.

Browse the [rules reference](/reviewer/rules) to see every rule EkLine enforces.

## Set it up on GitHub

Two steps put EkLine on every pull request. For the full walkthrough, follow the [GitHub Action quickstart](/reviewer/quickstart/github-action).

1. Add your EkLine token as a repository secret named `EK_TOKEN`. Get the token from **Settings > Organization > Access** in the [EkLine Dashboard](https://ekline.io/dashboard).

2. Add this workflow at `.github/workflows/ekline.yml`:

   ```yaml
   name: EkLine
   on: [pull_request]

   jobs:
     docs:
       runs-on: ubuntu-latest
       permissions:
         contents: read
         pull-requests: write
       steps:
         - uses: actions/checkout@v4
         - uses: ekline-io/ekline-github-action@v6
           with:
             content_dir: .
             ek_token: ${{ secrets.EK_TOKEN }}
             github_token: ${{ secrets.GITHUB_TOKEN }}
             reporter: github-pr-review
   ```

Open a pull request and EkLine reviews it automatically, posting inline comments on the lines that break a rule.

<Aside type="tip">
Set `content_dir` to your docs folder, such as `./docs`. Use `.` to scan the whole repository.
</Aside>

## Configure your rules

EkLine reads its settings from an `ekline.config.json` file at your repository root. Commit it so every pull request and every teammate enforces the same standard:

```json title="ekline.config.json"
{
  "contentDirectory": ["docs"],
  "styleGuide": "google",
  "ignore": ["EK00001", "EK00004"]
}
```

- **Pick a style guide** with the `styleGuide` key. See [Choose and apply a style guide](/reviewer/configuration/style-guides).
- **Disable rules that don't fit your project** with the `ignore` key, or suppress a single line with an [inline ignore comment](/reviewer/configuration/ignoring-rules#inline-ignore-comments).
- **Add your own rules and terminology** for a custom standard. See [Custom rules](https://ekline.io/guidelines/rules).
- **Accept product names and jargon** with a [project dictionary](/reviewer/configuration/dictionary) so spell-check leaves them alone.

For every configuration key, see the [configuration file reference](/reviewer/configuration/ignoring-rules).

## Block merges until docs pass

By default, EkLine posts its findings as comments without failing the check, so a pull request can still merge. To turn the review into a required gate:

1. Add `fail_on_error: true` to the action so the job fails when EkLine finds an issue:

   ```yaml
   - uses: ekline-io/ekline-github-action@v6
     with:
       content_dir: .
       ek_token: ${{ secrets.EK_TOKEN }}
       github_token: ${{ secrets.GITHUB_TOKEN }}
       reporter: github-pr-review
       fail_on_error: true
   ```

2. In your repository, go to **Settings > Branches** and add a branch protection rule for `main`.

3. Under **Require status checks to pass before merging**, select the EkLine check.

GitHub then prevents the merge until EkLine passes. See the [GitHub Actions integration reference](/reviewer/integrations/github-integration) for every reporter and filter option.

## EkLine compared to assembling Vale and reviewdog

Teams that want style-guide enforcement on GitHub often reach for a do-it-yourself stack: the Vale linter, a set of hand-written rule files, and reviewdog to turn the output into inline PR comments. That works, but you own every piece of it. EkLine delivers the same outcome as a single managed tool.

| Capability | EkLine | Vale + reviewdog (DIY) |
|------------|--------|------------------------|
| Style-guide rules | 60+ rules plus Google, Microsoft, and Marketing presets, built in | You install and maintain rule packages, or write your own |
| Inline PR comments | Built in | You configure reviewdog separately |
| Merge blocking | GitHub check you mark required | GitHub check you mark required |
| AI-powered suggestions | Built in | Not available |
| Terminology and dictionary | Built in | You maintain vocabulary files |
| Link and email checking | Built in | Separate tooling |
| Setup | One token, one workflow file | Multiple tools to wire together and keep updated |
| Maintenance | Managed by EkLine | You own upgrades and rule tuning |

Choose EkLine when you want style-guide enforcement on every pull request without building and maintaining a review pipeline yourself. Choose the DIY stack when you need total control over each component and are ready to maintain it.

<Aside type="note">
EkLine also runs on [GitLab CI](/reviewer/integrations/gitlab-integration), [Bitbucket Pipelines](/reviewer/integrations/bitbucket-integration), the [CLI](/reviewer/integrations/cli-integration), and [VS Code](/reviewer/integrations/vscode-integration), so the same style guide applies wherever your team writes.
</Aside>

## Related

- [GitHub Action quickstart](/reviewer/quickstart/github-action) — Run your first PR review in about 3 minutes.
- [GitHub Actions integration reference](/reviewer/integrations/github-integration) — Every reporter, filter, and configuration option.
- [Choose and apply a style guide](/reviewer/configuration/style-guides) — Pick the standard EkLine enforces.
- [Configuration file reference](/reviewer/configuration/ignoring-rules) — Every `ekline.config.json` key.