Skip to content

Ignoring Rules

Handle false positives and intentional exceptions by ignoring EkLine rules globally via config or selectively using inline comments.

Sometimes EkLine flags content you want to keep as-is. This guide helps you decide how to handle these situations and shows you the options available.

When EkLine flags something, you have three options:

SituationRecommended action
EkLine is right, fix the issueEdit your content
False positive on specific contentUse an inline ignore comment
Rule doesn’t apply to your projectDisable the rule in config

When EkLine flags an issue in a PR comment or CLI output, you’ll see the rule ID in brackets:

[EK00300] "responce" should be "response"

The rule ID (like EK00300) is what you use in ignore comments to target specific rules instead of ignoring everything.


The comment syntax varies by file type. EkLine automatically detects the format.

<!-- ekline-ignore-file -->
<!-- ekline-ignore-start -->
<!-- ekline-ignore-end -->
<!-- ekline-ignore-next-line EK00001 -->
<!-- ekline-ignore-line -->

File types: .md, .markdown, .html, .htm, .xml, .dita, .ditamap


For rules you want to disable across your entire project, use the config file.

In ekline.config.json:

{
"contentDirectory": ["docs"],
"ignore": ["EK00001", "EK00004"]
}

These rules won’t be checked anywhere in your project.

Use inline comments to ignore rules for specific content without affecting the rest of your documentation.

ScopeSyntax
Entire file<!-- ekline-ignore-file -->
Section<!-- ekline-ignore-start --><!-- ekline-ignore-end -->
Next line<!-- ekline-ignore-next-line -->
Same line<!-- ekline-ignore-line -->

Add rule IDs to target specific rules: <!-- ekline-ignore-next-line EK00001 -->

Add reasons to document why: <!-- ekline-ignore-next-line EK00001 -- legacy naming -->

The most common pattern. Place the comment on the line before the content you want to ignore.

<!-- ekline-ignore-next-line -->
This line won't be checked.
This line will be checked normally.

With specific rules:

<!-- ekline-ignore-next-line EK00001, EK00033 -->
Only those rules are ignored. Other rules still apply to this line.

Add the comment at the end of the line you want to ignore.

The `oldParam` field is deprecated. <!-- ekline-ignore-line EK00001 -->

Wrap content in start/end comments to ignore a block.

Regular checked content here.
<!-- ekline-ignore-start -->
Everything in this section is ignored.
Multiple lines, code blocks, whatever you need.
<!-- ekline-ignore-end -->
Back to checked content.

With specific rules:

<!-- ekline-ignore-start EK00001, EK00002 -->
Only the specified rules are ignored in this section.
<!-- ekline-ignore-end -->

Place anywhere in the file (top recommended).

<!-- ekline-ignore-file -->
# Auto-Generated Reference
All content in this file is ignored.

With specific rules:

<!-- ekline-ignore-file EK00001 -->

Document why you’re ignoring a rule. This helps future maintainers (including yourself) understand the decision.

<!-- ekline-ignore-next-line EK00300 -- intentional for backwards compatibility -->
<!-- ekline-ignore-start EK00031 -- passive voice required by legal -->
<!-- ekline-ignore-file -- generated from OpenAPI spec -->

For files that shouldn’t be checked at all:

{
"contentDirectory": ["docs"],
"excludeFiles": ["CHANGELOG.md", "generated/*.md"]
}

For directories that shouldn’t be checked:

{
"contentDirectory": ["docs"],
"excludeDirectories": ["node_modules", "api-reference/generated"]
}

Customer quotes, legal text, or historical references often violate style rules intentionally.

<!-- ekline-ignore-next-line EK00300 -- customer testimonial, preserve original spelling -->
"I definately love this product!" - Jane D.

Old APIs sometimes have typos baked into their contracts.

<!-- ekline-ignore-next-line EK00300 -- legacy API field name -->
The endpoint returns a `responce` object for backwards compatibility.

Code examples with intentional “errors”

Section titled “Code examples with intentional “errors””

Documentation showing what not to do, or demonstrating error messages.

<!-- ekline-ignore-start -- example of incorrect usage -->
```js
// DON'T do this - the parameter is mispelled
fetch('/api?qurey=test')
```
<!-- ekline-ignore-end -->

Legal text and formal contracts sometimes require passive voice.

<!-- ekline-ignore-next-line EK00031 -- passive voice required by legal -->
The agreement must be signed by the customer before activation.

Files generated from OpenAPI specs or other sources.

<!-- ekline-ignore-file -- auto-generated from openapi.yaml -->

Instead of ignoring all rules, target the specific rule causing the issue.

// Bad - ignores everything
<!-- ekline-ignore-next-line -->
// Good - only ignores the specific rule
<!-- ekline-ignore-next-line EK00001 -->

A reason takes seconds to write and saves minutes of confusion later.

// Bad - future you won't remember why
<!-- ekline-ignore-next-line EK00001 -->
// Good - clear intent
<!-- ekline-ignore-next-line EK00001 -- legacy API naming -->

Inline ignores can become stale. When updating documentation:

  • Check if the ignored content still exists
  • Check if the reason still applies
  • Remove ignores that are no longer needed

If you’re adding the same inline ignore repeatedly, it’s a sign you should use the config file instead.

{
"ignore": ["EK00042"]
}

  • Case insensitive: EKLINE-IGNORE-FILE works the same as ekline-ignore-file
  • Flexible whitespace: Extra spaces are tolerated
  • Code blocks excluded: Comments inside fenced code blocks (```) are not processed
  • Unclosed sections: ekline-ignore-start without ekline-ignore-end extends to end of file