Skip to content

Commit

Permalink
Configure markdownlint (mld) via .mdlrc and style file
Browse files Browse the repository at this point in the history
Set lists indentation to 4 instead of default 2.
  • Loading branch information
evgenyz committed Jul 15, 2022
1 parent 918d0cd commit c2789f3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .mdl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
all
exclude_tag :line_length
rule 'MD007', :indent => 4
2 changes: 1 addition & 1 deletion .mdlrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tags "~line_length"
style ".mdl.rb"
38 changes: 19 additions & 19 deletions docs/manual/developer/04_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
## Labels

* Use labels efficiently
* For example, use only the minimal necessary labels
* For example, use only the minimal necessary labels
* Labels must have a clear and objective description
* New labels should be created in lowercase
* New labels should be agnostic to PRs and Issues
* Labels related to the same group/category should share the same colors, like in these examples:
* Assessment languages related labels, like "OVAL" and "OCIL", share the color <span style="color:#0e8a16">#0e8a16</span>
* Attention required labels, like "BLOCKER" and "productization-issue", share the color <span style="color:#e11d21">#e11d21</span>
* Benchmarks related labels, like "CIS" and "STIG", share the color <span style="color:#08d2d8">#08d2d8</span>
* Components related labels, like "Test Suite" and "Documentation", share the color <span style="color:#84b6eb">#84b6eb</span>
* Improvements related labels, like "New Product" or "New Rule", share the color <span style="color:#c2e0c6">#c2e0c6</span>
* "EyeCatcher" related labels, like a "Highlight" or "bugfix", share the color <span style="color:#fbca04">#fbca04</span>
* Product related labels, like "RHEL" and "Ubuntu", share the color <span style="color:#4141f4">#4141f4</span>
* Remediation related labels, like "Ansible" and "Bash", share the color <span style="color:#9bf442">#9bf442</span>
* Assessment languages related labels, like "OVAL" and "OCIL", share the color <span style="color:#0e8a16">#0e8a16</span>
* Attention required labels, like "BLOCKER" and "productization-issue", share the color <span style="color:#e11d21">#e11d21</span>
* Benchmarks related labels, like "CIS" and "STIG", share the color <span style="color:#08d2d8">#08d2d8</span>
* Components related labels, like "Test Suite" and "Documentation", share the color <span style="color:#84b6eb">#84b6eb</span>
* Improvements related labels, like "New Product" or "New Rule", share the color <span style="color:#c2e0c6">#c2e0c6</span>
* "EyeCatcher" related labels, like a "Highlight" or "bugfix", share the color <span style="color:#fbca04">#fbca04</span>
* Product related labels, like "RHEL" and "Ubuntu", share the color <span style="color:#4141f4">#4141f4</span>
* Remediation related labels, like "Ansible" and "Bash", share the color <span style="color:#9bf442">#9bf442</span>
* It is possible to have custom labels for ad-hoc tasks. These must be properly managed and removed when no longer necessary.
* Be careful changing labels names or removing labels. Some labels are used by bots and automated processes, like the release changelog generation:
* https://github.com/ComplianceAsCode/content/blob/master/.github/workflows/release-changelog.json
* https://github.com/ComplianceAsCode/content/blob/master/.github/workflows/release-changelog.json

## Pull Requests

Expand Down Expand Up @@ -88,9 +88,9 @@ and keep these guidelines in mind when writing new code.
* Shall use 4-space indentation
* Shall have a docstring comment describe what the macro does
* Shall have a docstring comment describing all parameters and their types
* Types shall be Python class names. (E.g. `str`, `bool`, `dict`, etc)
* Shall be last section of the docstring
* Shall have one blank after list before the close of the docstring block
* Types shall be Python class names. (E.g. `str`, `bool`, `dict`, etc)
* Shall be last section of the docstring
* Shall have one blank after list before the close of the docstring block
* Shall have two blank lines between macros

### Python
Expand Down Expand Up @@ -265,16 +265,16 @@ Control sections must be in the following order, all sections are required unles
* `documentation_complete`
* `id`
* `metadata`
* `reference`
* `version`
* `SMEs`
* `reference`
* `version`
* `SMEs`
* `title`
* Shall be short and descriptive
* Shall be short and descriptive
* `description` (HTML-Like)
* `extends` (Optional)
* Must be valid id of another profile id
* Must be valid id of another profile id
* `selections`
* Must be valid rule ids
* Must be valid rule ids

## Remediation

Expand Down

0 comments on commit c2789f3

Please sign in to comment.