Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2a16950

Browse files
committedAug 7, 2023
update rules doc
1 parent 340ccf9 commit 2a16950

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed
 

‎docs/Builder/RulesPageBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function build(): string
5454
'generic' => $param->type->isGeneric() ? JsonType::to($param->type->generic) : null,
5555
'description' => $param->description,
5656
'examples' => new Arrayee($param->examples),
57+
'isGenericObject' => $param->type->generic && class_exists($param->type->generic),
5758
];
5859
}
5960

‎docs/Builder/templates/rules.md.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Currently is available that rules:
1717
{% else %}
1818
<td rowspan="{{ max(rule.params.count, 1) }}">{{ rule.description }}</td>
1919
<td>{{ rule.params.first.name }}</td>
20-
<td>{{ rule.params.first.description }} {% if rule.params.first.examples.count > 0 %}<br/> Examples: {% for example in rule.params.first.examples %} {{ example }}{% if loop.last == false %},{% endif%} {% endfor %}{% endif %}</td>
20+
<td>{{ rule.params.first.description }} {% if rule.params.first.isGenericObject %} <br/> See details in Config JSON Schema{% endif %}{% if rule.params.first.examples.count > 0 %}<br/> Examples: {% for example in rule.params.first.examples %} {{ example }}{% if loop.last == false %},{% endif%} {% endfor %}{% endif %}</td>
2121
<td>{{ rule.params.first.type }}{% if rule.params.first.generic %} of {{ rule.params.first.generic }}s {% endif %}</td>
2222
{% endif %}
2323
</tr>
2424
{% for param in rule.params.skip(1) %}
2525
<tr>
2626
<td>{{ param.name }}</td>
27-
<td>{{ param.description }} {% if rule.params.first.examples.count > 0 %}<br/> Examples: {% for example in rule.params.first.examples %} {{ example }}{% if loop.last == false %},{% endif%} {% endfor %}{% endif %}</td>
27+
<td>{{ param.description }} {% if rule.params.first.isGenericObject %} <br/> See details in Config JSON Schema{% endif %} {% if rule.params.first.examples.count > 0 %}<br/> Examples: {% for example in rule.params.first.examples %} {{ example }}{% if loop.last == false %},{% endif%} {% endfor %}{% endif %}</td>
2828
<td>{{ param.type }}{% if param.generic %} of {{ param.generic }}s {% endif %}</td>
2929
</tr>
3030
{% endfor %}

‎docs/rules.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Currently is available that rules:
6161
</tr>
6262
<tr>
6363
<td>projectCode</td>
64-
<td>Project code </td>
64+
<td>Project code </td>
6565
<td>string</td>
6666
</tr>
6767
<tr>
@@ -73,7 +73,7 @@ Currently is available that rules:
7373
</tr>
7474
<tr>
7575
<td>projectCode</td>
76-
<td>Project code <br/> Examples: &quot;yt.my-company.ru&quot; </td>
76+
<td>Project code <br/> Examples: &quot;yt.my-company.ru&quot; </td>
7777
<td>string</td>
7878
</tr>
7979
<tr>
@@ -87,7 +87,7 @@ Currently is available that rules:
8787
<td rowspan="1">@mr-linter/has_changes</td>
8888
<td rowspan="1">Merge Request must have changes in {files}.</td>
8989
<td>changes</td>
90-
<td>Array of need changes </td>
90+
<td>Array of need changes <br/> See details in Config JSON Schema</td>
9191
<td>array of objects </td>
9292
</tr>
9393
<tr>
@@ -120,7 +120,7 @@ Currently is available that rules:
120120
</tr>
121121
<tr>
122122
<td>tags</td>
123-
<td>Tags parsing options </td>
123+
<td>Tags parsing options </td>
124124
<td>object</td>
125125
</tr>
126126
<tr>
@@ -132,7 +132,7 @@ Currently is available that rules:
132132
</tr>
133133
<tr>
134134
<td>fileLinesMax</td>
135-
<td>Maximum allowed number of changed lines in a file </td>
135+
<td>Maximum allowed number of changed lines in a file </td>
136136
<td>integer</td>
137137
</tr>
138138
<tr>
@@ -150,4 +150,4 @@ Currently is available that rules:
150150
<td>array of strings </td>
151151
</tr>
152152
</tbody>
153-
</table>
153+
</t

0 commit comments

Comments
 (0)
Please sign in to comment.