Skip to content

Commit d9612cd

Browse files
authored
Upgrade CI Markdown checks (#2497)
* Upgrade CI Markdown checks - Use tcort/github-action-markdown-link-check instead of deprecated gaurav-nelson/github-action-markdown-link-check. - Pin actions to SHA version to mitigate possible supply chain attacks. - Consolidate markdown checks into a single workflow. Signed-off-by: Florian Hotze <dev@florianhotze.com> * Comment out broken link check as it was previously disabled Signed-off-by: Florian Hotze <dev@florianhotze.com> * Adjust markdownlint config for new version Signed-off-by: Florian Hotze <dev@florianhotze.com> * Fix markdownlint Signed-off-by: Florian Hotze <dev@florianhotze.com> --------- Signed-off-by: Florian Hotze <dev@florianhotze.com>
1 parent c8da430 commit d9612cd

14 files changed

Lines changed: 115 additions & 95 deletions

File tree

.github/.markdownlint.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@ default: true
22

33
# Expect dash usage for unorderd lists
44
MD004:
5-
style: dash
5+
style: dash
66

77
# Allow long line lengths
88
MD013: false
99

1010
# Allow duplicate headers for different nesting
1111
MD024:
12-
allow_different_nesting: true
12+
siblings_only: true
1313

1414
# Allow Multiple top level headers in the same document
1515
MD025: false
1616

1717
# Allow trailing punctuation in headers
1818
MD026: false
1919
MD029:
20-
style: one
20+
style: one
2121

2222
# Allow inline HTML
2323
MD033: false
2424

2525
# Code block style
2626
MD046:
27-
style: fenced
27+
style: fenced
2828

2929
# Emphasiszis in underscore
3030
MD049:
31-
style: underscore
32-
31+
style: underscore
32+
3333
# Strong in asterisk
3434
MD050:
35-
style: asterisk
35+
style: asterisk

.github/workflows/brokenLinkCheck.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/markdown.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Check Markdown For Errors
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags-ignore:
8+
- '**'
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
markdownlint:
15+
name: markdownlint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
# pinning to SHA to mitigate possible supply chain attack
22+
- name: Run markdownlint-cli
23+
uses: nosborn/github-action-markdown-cli@58bcfd1af530d87a13d51b76e6713b52602e3613 # v3.4.0
24+
with:
25+
files: .
26+
config_file: ".github/.markdownlint.yaml"
27+
28+
# markdown-link-check:
29+
# name: Broken Links Check
30+
# runs-on: ubuntu-latest
31+
# steps:
32+
# - name: Checkout repository
33+
# uses: actions/checkout@v4
34+
#
35+
# # pinning to SHA to mitigate possible supply chain attack
36+
# - name: Check for broken links
37+
# uses: tcort/github-action-markdown-link-check@a800ad5f1c35bf61987946fd31c15726a1c9f2ba # v1.1.0
38+
# with:
39+
# use-quiet-mode: 'yes' # only show errors in output
40+
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links

.github/workflows/markdownlint.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

administration/runtime.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ Usage: openhab:send <item> <command> - sends a command for an item
7474

7575
### Links
7676

77-
| Command | Description |
78-
|---------------------------------------------------------|----------------------------------------------------------------------------------|
79-
| `openhab:links list` | lists all links |
80-
| `openhab:links link <itemName> <channelUID>` | links an item with to channel |
81-
| `openhab:links unlink <itemName> <thingUID>` | unlinks an item with to channel |
82-
| `openhab:links clear` | removes all managed links |
83-
| `openhab:links orphan <list|purge>` | lists/purges all orphaned - one missing element (either item or channel) - links |
77+
| Command | Description |
78+
|----------------------------------------------|----------------------------------------------------------------------------------|
79+
| `openhab:links list` | lists all links |
80+
| `openhab:links link <itemName> <channelUID>` | links an item with to channel |
81+
| `openhab:links unlink <itemName> <thingUID>` | unlinks an item with to channel |
82+
| `openhab:links clear` | removes all managed links |
83+
| `openhab:links orphan <list\|purge>` | lists/purges all orphaned - one missing element (either item or channel) - links |
8484

8585
### Audio
8686

configuration/actions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ If there is no `dayset-weekend` defined, calls to `isWeekend` will generate erro
308308
Config file location: `$OH_CONF/services/ephemeris.cfg`.
309309

310310
Fields:
311+
311312
Field | Description
312313
-|-
313314
`country` | Country to use to get the built in list of bank holidays, uses the standard two letter country code.

configuration/blockly/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ layout: documentation
33
title: Rules Blockly
44
---
55
<!-- markdownlint-disable MD036 -->
6+
<!-- markdownlint-disable MD039 -->
67

78
# Blockly Reference
89

configuration/items.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ The default icon will be used for negative numbers, or above 100 i.e. the availa
424424
Dimmer type Items work in the same way, being limited to 0-100 anyway.
425425

426426
For a dimmable light (0-100%), you might provide icons as in the example:
427+
427428
| File name | Description |
428429
| ----------------- | ---------------------------------------------------- |
429430
| `mydimmer.svg` | Default icon (used in undefined states) |

configuration/jsr223.md

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -533,100 +533,128 @@ All parameters are Strings.
533533
Read the JSR223 language specific documentation for examples of using these `TriggerType` objects.
534534

535535
::: details timer.DateTimeTrigger
536+
536537
| Parameter | Description |
537-
| ---------- | ---------------------- |
538+
|------------|------------------------|
538539
| `itemName` | The name of the `Item` |
540+
539541
:::
540542

541543
::: details timer.GenericCronTrigger
544+
542545
| Parameter | Description |
543-
| ---------------- | ------------------- |
546+
|------------------|---------------------|
544547
| `cronExpression` | The cron expression |
548+
545549
:::
546550

547551
::: details timer.TimeOfDayTrigger
552+
548553
| Parameter | Description |
549-
| --------- | -------------------------- |
554+
|-----------|----------------------------|
550555
| `time` | The time in "hh:mm" format |
556+
551557
:::
552558

553559
::: details core.ItemCommandTrigger
560+
554561
| Parameter | Description |
555-
| ---------- | ------------------------ |
562+
|------------|--------------------------|
556563
| `itemName` | The name of the `Item` |
557564
| `command` | The `Command` (optional) |
565+
558566
:::
559567

560568
::: details core.ItemStateUpdateTrigger
569+
561570
| Parameter | Description |
562-
| ---------- | ---------------------- |
571+
|------------|------------------------|
563572
| `itemName` | The name of the `Item` |
564573
| `state` | The `State` (optional) |
574+
565575
:::
566576

567577
::: details core.ItemStateChangeTrigger
578+
568579
| Parameter | Description |
569-
| --------------- | ------------------------------- |
580+
|-----------------|---------------------------------|
570581
| `itemName` | The name of the `Item` |
571582
| `previousState` | The previous `State` (optional) |
572583
| `state` | The `State` (optional) |
584+
573585
:::
574586

575587
::: details core.GroupCommandTrigger
588+
576589
| Parameter | Description |
577-
| ----------- | --------------------------- |
590+
|-------------|-----------------------------|
578591
| `groupName` | The name of the `GroupItem` |
579592
| `command` | The `Command` (optional) |
593+
580594
:::
581595

582596
::: details core.GroupStateUpdateTrigger
597+
583598
| Parameter | Description |
584-
| ----------- | --------------------------- |
599+
|-------------|-----------------------------|
585600
| `groupName` | The name of the `GroupItem` |
586601
| `state` | The `State` (optional) |
602+
587603
:::
588604

589605
::: details core.GroupStateChangeTrigger
606+
590607
| Parameter | Description |
591-
| --------------- | ------------------------------- |
608+
|-----------------|---------------------------------|
592609
| `groupName` | The name of the `GroupItem` |
593610
| `previousState` | The previous `State` (optional) |
594611
| `state` | The `State` (optional) |
612+
595613
:::
596614

597615
::: details core.ThingStatusUpdateTrigger
616+
598617
| Parameter | Description |
599-
| ---------- | ---------------------------- |
618+
|------------|------------------------------|
600619
| `thingUID` | The `thingUID` |
601620
| `status` | The `ThingStatus` (optional) |
621+
602622
:::
603623

604624
::: details core.ThingStatusChangeTrigger
625+
605626
| Parameter | Description |
606-
| ---------------- | ------------------------------------- |
627+
|------------------|---------------------------------------|
607628
| `thingUID` | The `thingUID` |
608629
| `previousStatus` | The previous `ThingStatus` (optional) |
609630
| `status` | The `ThingStatus` (optional) |
631+
610632
:::
611633

612634
::: details core.ChannelEventTrigger
635+
613636
| Parameter | Description |
614-
| ------------ | ---------------------------------------- |
637+
|--------------|------------------------------------------|
615638
| `channelUID` | The `ChannelUID` of the `Channel` |
616639
| `event` | The `Channel` trigger `Event` (optional) |
640+
617641
:::
618642

619643
::: details core.GenericEventTrigger
644+
620645
| Parameter | Description |
621-
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
646+
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
622647
| `topic` | The topic to match, as a file-system style glob (*, **, ?, and {} operators).<br><br>Example filters:<br>Item events: "openhab/items/\*/"<br>Channel events: "openhab/channels/\*/triggered"<br>Thing events: "openhab/things/\*\*" |
623648
| `source` | The object that triggered the event, such as `org.openhab.core.expire` |
624649
| `types` | `ItemCommandEvent`, `ItemStateEvent`, `ItemStateChangedEvent`, `GroupItemStateChangedEvent`, `ItemAddedEvent`, `ItemRemovedEvent`, `ThingAddedEvent`, `ThingRemovedEvent`, `ThingStatusInfoChangedEvent`, `ThingStatusInfoEvent`, `ThingUpdatedEvent`, etc. A non-exhaustive list can be found [in the Javadocs](https://www.openhab.org/javadoc/latest/org/openhab/core/events/event). |
625650
| `payload` | Regex to match against the actual event data. |
651+
626652
:::
627653

628654
::: details core.SystemStartlevelTrigger
655+
629656
| Parameter | Description |
630-
| ------------ | ----------------------- |
657+
|--------------|-------------------------|
631658
| `startlevel` | The system `StartLevel` |
659+
632660
:::

developers/osgi/equinox.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ It consists of bundles that implement all add-on services from the OSGi specific
9393
Some of the core bundles are listed in the table below.
9494
Some or all of these bundles must be included in your runtime configuration, if you want to use the services that they provide.
9595

96-
Name | Bundle Symbolic Name | Description
97-
-------- | -------- | --------
98-
Declarative Services | org.eclipse.equinox.ds | An implementation of the OSGi [Declarative Services](osgids.html) specification
99-
Event Admin Service | org.eclipse.equinox.event | OSGi Compendium Release 8 [Event Admin](https://osgi.org/javadoc/osgi.cmpn/8.0.0/org/osgi/service/event/EventAdmin.html) Service provides an inter-bundle communication mechanism based on an event publish and subscribe model
100-
Equinox Utilities | org.eclipse.equinox.util | A library of utility classes that are frequently used from the Equinox OSGi Service implementation bundles
101-
OSGi Services API | org.eclipse.osgi.service | This bundle contains the set of OSGi specified service APIs
96+
| Name | Bundle Symbolic Name | Description |
97+
|----------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
98+
| Declarative Services | org.eclipse.equinox.ds | An implementation of the OSGi [Declarative Services](osgids.html) specification |
99+
| Event Admin Service | org.eclipse.equinox.event | OSGi Compendium Release 8 [Event Admin](https://osgi.org/javadoc/osgi.cmpn/8.0.0/org/osgi/service/event/EventAdmin.html) Service provides an inter-bundle communication mechanism based on an event publish and subscribe model |
100+
| Equinox Utilities | org.eclipse.equinox.util | A library of utility classes that are frequently used from the Equinox OSGi Service implementation bundles |
101+
| OSGi Services API | org.eclipse.osgi.service | This bundle contains the set of OSGi specified service APIs |
102102

103103
Table 2. OSGi Bundles (Full list can be found at: <https://www.eclipse.org/equinox/bundles/>)
104104

0 commit comments

Comments
 (0)