Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmueller committed Nov 27, 2024
1 parent 1bc7275 commit 82e2626
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 11 deletions.
103 changes: 93 additions & 10 deletions docs/manual/rules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -108,33 +108,101 @@ Ensures there is only one top-level heading per document.
|Rule severity level
|===

== Planned Rules
== Block Rules

=== BLOCK001: Block Termination

[.planned]
Checks for properly terminated blocks.
Checks for properly terminated blocks in AsciiDoc files. This rule helps prevent incomplete or malformed block structures that could lead to incorrect rendering.

.Supported Block Types
* Listing blocks (`----`)
* Example blocks (`====`)
* Sidebar blocks (`****`)
* Literal blocks (`....`)
* Quote blocks (`____`)
* Table blocks (`|===`)
* Comment blocks (`////`)
* Passthrough blocks (`++++`)

.Valid Example
[source,asciidoc]
----
[source,python]
.Example Title
====
This is an example block.
It has proper opening and closing delimiters.
====
----
def hello():
print("Hello")

.Invalid Example
[source,asciidoc]
----
.Example Title
====
This block is not properly terminated.
More content...
----

.Configuration Options
[cols="1,1,2"]
|===
|Option |Default |Description

|enabled
|true
|Enable/disable rule

|severity
|error
|Rule severity level
|===

=== BLOCK002: Block Spacing

Ensures proper spacing around blocks by checking for blank lines before and after block structures.

.Rules
1. A blank line should precede a block (except when it follows a heading)
2. A blank line should follow a block (except when it's followed by a heading)

.Valid Example
[source,asciidoc]
----
Some text before the block.
----
Block content
----
More text after the block.
----

.Invalid Example
[source,asciidoc]
----
[source,python]
Some text before the block.
----
Block content
----
def hello():
print("Hello")
# Missing block termination
More text after the block.
----

.Configuration Options
[cols="1,1,2"]
|===
|Option |Default |Description

|enabled
|true
|Enable/disable rule

|severity
|warning
|Rule severity level
|===

== Planned Rules

=== WS001: Whitespace

[.planned]
Expand All @@ -155,6 +223,21 @@ code
----
----

=== TABLE001: Table Formatting

[.planned]
Ensures consistent table formatting.

=== IMG001: Image Attributes

[.planned]
Checks for required image attributes like alt text.

=== LINK001: Link Validation

[.planned]
Validates internal and external links.

== Rule Development

=== Creating New Rules
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/rules.adoc.meta
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Documentation of all rules
Documentation of all linter rules

0 comments on commit 82e2626

Please sign in to comment.