Skip to content

Commit a326030

Browse files
authoredJan 10, 2021
Fix linter errors. 🔧(openhab#1437)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
1 parent c1903fe commit a326030

25 files changed

+156
-148
lines changed
 

‎CONTRIBUTING.md

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Contribution Guidelines
22

3-
### Pull requests are always welcome
3+
## Pull requests are always welcome
44

55
We are always thrilled to receive pull requests, and do our best to
66
process them as fast as possible. Not sure if that typo is worth a pull
77
request? Do it! We will appreciate it.
88

9-
### Conventions
9+
## Conventions
1010

1111
Fork the repo and make changes on your fork in a feature branch.
1212

@@ -28,15 +28,15 @@ comment.
2828
Commits that fix or close an issue should include a reference like `Closes #XXX`
2929
or `Fixes #XXX`, which will automatically close the issue when merged.
3030

31-
### Sign your work
31+
## Sign your work
3232

3333
The sign-off is a simple line at the end of the explanation for the
3434
patch, which certifies that you wrote it or otherwise have the right to
3535
pass it on as an open-source patch. The rules are pretty simple: if you
3636
can certify the below (from
3737
[developercertificate.org](https://developercertificate.org/)):
3838

39-
```
39+
```text
4040
Developer Certificate of Origin
4141
Version 1.1
4242
@@ -77,42 +77,41 @@ By making a contribution to this project, I certify that:
7777

7878
then you just add a line to every git commit message:
7979

80-
Signed-off-by: Joe Smith <joe.smith@email.com>
80+
`Signed-off-by: Joe Smith <joe.smith@email.com>`
8181

8282
using your real name (sorry, no pseudonyms or anonymous contributions.) and an
8383
e-mail address under which you can be reached (sorry, no github noreply e-mail
8484
addresses (such as username@users.noreply.github.com) or other non-reachable
8585
addresses are allowed).
8686

87-
#### Small patch exception
87+
### Small patch exception
8888

8989
There are several exceptions to the signing requirement. Currently these are:
9090

91-
* Your patch fixes spelling or grammar errors.
92-
* Your patch is a single line change to documentation.
91+
- Your patch fixes spelling or grammar errors.
92+
- Your patch is a single line change to documentation.
9393

9494
## Community Guidelines
9595

9696
We want to keep the openHAB community awesome, growing and collaborative. We
9797
need your help to keep it that way. To help with this we've come up with some
9898
general guidelines for the community as a whole:
9999

100-
* Be nice: Be courteous, respectful and polite to fellow community members: no
100+
- Be nice: Be courteous, respectful and polite to fellow community members: no
101101
regional, racial, gender, or other abuse will be tolerated. We like nice people
102102
way better than mean ones!
103103

104-
* Encourage diversity and participation: Make everyone in our community
104+
- Encourage diversity and participation: Make everyone in our community
105105
feel welcome, regardless of their background and the extent of their
106106
contributions, and do everything possible to encourage participation in
107107
our community.
108108

109-
* Keep it legal: Basically, don't get us in trouble. Share only content that
109+
- Keep it legal: Basically, don't get us in trouble. Share only content that
110110
you own, do not share private or sensitive information, and don't break the
111111
law.
112112

113-
* Stay on topic: Make sure that you are posting to the correct channel
113+
- Stay on topic: Make sure that you are posting to the correct channel
114114
and avoid off-topic discussions. Remember when you update an issue or
115115
respond to an email you are potentially sending to a large number of
116116
people. Please consider this before you update. Also remember that
117117
nobody likes spam.
118-

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ We will read about them later.
1818
Correct, this is done in the original repository of the add-on.
1919
You may want to know how to find the right file in all of those repos?
2020
This is fairly easy:
21-
on most of the documentation pages on https://openhab.org/,
21+
on most of the documentation pages on <https://openhab.org/>,
2222
you will find the following link at the bottom, which will point you directly to the file you want to improve.
2323

2424
![Contribution link to a specific page](./images/contribution_link.png)
@@ -96,4 +96,4 @@ In short, the following has to be considered:
9696
- Versions like "2.1.0" are marked by git tags.
9797
- Based on tags branches like "2.1-patch" are created, to include later discovered changes (like fixed links).
9898

99-
When a version is tagged (or updated), a static version of the website has to be generated and copied into the correct sub-folder, this is currently a manual operation described succinctly here: https://github.com/openhab/website/issues/72
99+
When a version is tagged (or updated), a static version of the website has to be generated and copied into the correct sub-folder, this is currently a manual operation described succinctly here: <https://github.com/openhab/website/issues/72>

‎addons/actions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ One can configure whether specific log entries are logged out and where they get
5959

6060
You have different options to execute a command through an action.
6161

62-
- `executeCommandLine(String commandLine)`: Executes a command on the command line without waiting for the command to complete
63-
For example you could run `executeCommandLine("path/to/my/script.sh")` which then would be executed and the rule would continue processing.
62+
- `executeCommandLine(String commandLine)`: Executes a command on the command line without waiting for the command to complete.
63+
For example you could run `executeCommandLine("path/to/my/script.sh")` which then would be executed and the rule would continue processing.
6464

6565
- `executeCommandLine(Duration.ofSeconds(timeout), String commandLine)`: Executes a command on the command and waits `timeout` seconds for the command to complete, returning the output from the command as a String
6666
For example you could run `var ScriptResponse = executeCommandLine(Duration.ofSeconds(60), "path/to/my/script.sh");` would get executed and wait 1 minute for the output to be responded back and write it into the `ScriptResponse` variable.

‎administration/console.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The method used to access the console depends on how openHAB was started.
1919

2020
- When started in interactive mode using the provided command line scripts (e.g. `start.sh` or `start.bat`), openHAB naturally transitions directly to the console prompt.
2121
- When started as a service (i.e. when openHAB is running as a background process), access to the console is given by running the `$OPENHAB_RUNTIME/bin/client` (`client.bat` for Windows) script or by [connecting via SSH](#connecting-via-ssh).
22-
Linux package based installations can also use the command `openhab-cli console`.
22+
Linux package based installations can also use the command `openhab-cli console`.
2323

2424
The default username/password is **openhab:habopen**, so enter `habopen` at the password prompt.
2525

‎configuration/habpanel.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,10 @@ Upon clicking on a custom widget definition, the widget designer opens. It conta
276276
- **Code:** This tab is an editor for the template's code. You can use the Ctrl-S (or Cmd-S) keyboard shortcut to save the widget while editing the code;
277277

278278
- **Settings:** This tab hosts the widget's general settings and configuration settings structure to be defined.
279-
Click on the **Add setting** to add a new configuration setting. Each configuration setting must have a type, a technical ID, and other optional attributes. Each type of setting determines the UI element presented in the dashboard designer when configuring instances of the custom widget.
280-
Use the arrow buttons to move configuration settings up or down, and the trash bin icon to remove them.
281-
When instantiated, the value of configuration settings are set in the template's scope as `config.<setting_id>` (except those of type Icon which define an additional value, the iconset name, as `config.<setting_id>_iconset`);
279+
Click on the **Add setting** to add a new configuration setting. Each configuration setting must have a type, a technical ID, and other optional attributes.
280+
Each type of setting determines the UI element presented in the dashboard designer when configuring instances of the custom widget.
281+
Use the arrow buttons to move configuration settings up or down, and the trash bin icon to remove them.
282+
When instantiated, the value of configuration settings are set in the template's scope as `config.<setting_id>` (except those of type Icon which define an additional value, the iconset name, as `config.<setting_id>_iconset`);
282283

283284
- **Preview:** Upon switching to this tab, a test instance of the widget is rendered in an otherwise blank testbed dashboard. Use the sliders to resize the widget in order to preview it at different sizes. If it defines configuration settings, they must likely be set for this preview using the gears icon: this will bring up the widget instance's configuration dialog as it would appear in the dashboard designer.
284285

‎configuration/migration/index.md

+23-22
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ description: Description of Beaking Changes and needed steps for a proper Migrat
99
There are different approaches to get your openHAB 2 Environment upgraded to openHAB 3.
1010
You could start with a fresh install and migrate your environment step-by-step or you can upgrade your running environment and change your configuration where needed.
1111

12-
Since this is a major version release you have to pay attention to some `Breaking Changes` that may affect your environment too.
13-
You can find a general note on the `Breaking Changes` here:
14-
https://github.com/openhab/openhab-distro/wiki/Breaking-Changes-in-openHAB-3
12+
Since this is a major version release you have to pay attention to some **Breaking Changes** that may affect your environment too.
13+
You can find a general note on the **Breaking Changes** here:
14+
<https://github.com/openhab/openhab-distro/wiki/Breaking-Changes-in-openHAB-3>
1515

1616
Please read them carefully and check if you are affected by some of the changes, like the changes to some rules namespaces and the handling of time functions.
1717

@@ -25,8 +25,8 @@ Please be aware of possible changes needed for your specific environment in case
2525
If you are working with an [openHABian](https://www.openhab.org/docs/installation/openhabian.html) setup, the upgrade is quite easy. Regardless of if you are currently using the openHAB 2.5 stable release or one of the latest 3.0.0 SNAPSHOT or milestone builds, switching to openHAB 3.0.0 stable is done in just a few steps:
2626

2727
1. Connect to the SSH command line and execute: `sudo openhabian-config`
28-
2. When being asked, answer that you want to update.
29-
3. Select the menu entry"03 - Install openHAB" option.
28+
1. When being asked, answer that you want to update.
29+
1. Select the menu entry"03 - Install openHAB" option.
3030

3131
### Package-based Installations
3232

@@ -46,13 +46,13 @@ You must also be on the relevant repository for openHAB, this hasn't changed for
4646

4747
For DEB based installers (apt), your `.list` file should contain the line:
4848

49-
```
49+
```shell
5050
deb https://dl.bintray.com/openhab/apt-repo2 stable main
5151
```
5252

5353
For RPM based installers (yum), your `.repo` file should contain:
5454

55-
```
55+
```shell
5656
[openHAB-Stable]
5757
name=openHAB Stable
5858
baseurl=https://dl.bintray.com/openhab/rpm-repo2/stable
@@ -71,7 +71,7 @@ With `openhab2` still installed:
7171

7272
##### APT (Debian / Ubuntu and derivatives)
7373

74-
```
74+
```shell
7575
sudo apt update
7676
sudo apt install openhab
7777
```
@@ -80,14 +80,14 @@ The system will ask you if you want to remove `openhab2` as part of this, and yo
8080

8181
You can get rid of openHAB2 leftover configuration files by using the `sudo apt purge openhab2` command, but this also gets rid of the `openhab` user, to fix this issue you should follow this with:
8282

83-
```
83+
```shell
8484
sudo apt install --reinstall openhab
8585
sudo openhab-cli reset-ownership
8686
```
8787

8888
##### DNF (RedHat, CentOS, Fedora, etc.)
8989

90-
```
90+
```shell
9191
sudo dnf --allowerasing install openhab
9292
```
9393

@@ -96,7 +96,8 @@ DNF does not replace configuration files for you by default, have a look at the
9696
##### YUM (Older RedHat, CentOS, Fedora, etc.)
9797

9898
The equivalent command should be:
99-
```
99+
100+
```shell
100101
sudo yum swap openhab2 openhab
101102
```
102103

@@ -114,20 +115,20 @@ After a successful install, you can use commands like `sudo systemctl start open
114115

115116
##### APT (Debian / Ubuntu and derivatives)
116117

117-
```sh
118+
```shell
118119
sudo apt purge openhab2
119120
sudo apt update
120121
sudo apt install openhab
121122
```
122123

123124
##### YUM or DNF (RedHat, CentOS, Fedora, etc)
124125

125-
```sh
126+
```shell
126127
sudo dnf remove openhab2
127128
sudo dnf install openhab
128129
```
130+
129131
Replace "dnf" with "yum" for older Red Hat based OSes.
130-
<a name="manual-installations">
131132

132133
### Manual Installations
133134

@@ -138,20 +139,20 @@ Official update scripts are available that let you update your 2.x installation
138139
#### Linux/MacOS
139140

140141
1. Change to your openHAB root directory (e.g. `cd /opt/openhab`)
141-
2. Create a backup by calling `sudo ./runtime/bin/backup`.
142-
2. Run the update command:
142+
1. Create a backup by calling `sudo ./runtime/bin/backup`.
143+
1. Run the update command:
143144

144-
```
145+
```shell
145146
sudo ./runtime/bin/update 3.0.0
146147
```
147148

148149
#### Windows
149150

150151
1. Make a backup of your openHAB installation folder.
151-
2. Run PowerShell as an administrator and change to your openHAB root directory (e.g. `cd C:\openHAB`)
152-
3. Run the update command:
152+
1. Run PowerShell as an administrator and change to your openHAB root directory (e.g. `cd C:\openHAB`)
153+
1. Run the update command:
153154

154-
```
155-
. .\runtime\bin\update.ps1
156-
Update-openHAB -OHVersion 3.0.0
155+
```shell
156+
. .\runtime\bin\update.ps1
157+
Update-openHAB -OHVersion 3.0.0
157158
```

‎configuration/persistence.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ where `<itemlist>` is a comma-separated list consisting of one or more of the fo
8989

9090
- `*` - this line should apply to all items in the system
9191
- `<itemName>` a single Item identified by its name. This Item can be a group Item. But note that only the group value will be persisted. The value of the individual group members will not be persisted using this option.
92-
- `<groupName>*` - all members of this group will be persisted, but not the group itself. If no strategies are provided, the default strategies that are declared in the first section are applied. Optionally, an alias may be provided if the persistence service requires special names (e.g. a table to be used in a database, a feed id for an IoT service, etc.)
93-
Note that * is NOT a wildcard match character in this context.
92+
- `<groupName>*` - all members of this group will be persisted, but not the group itself. If no strategies are provided, the default strategies that are declared in the first section are applied.
93+
Optionally, an alias may be provided if the persistence service requires special names (e.g. a table to be used in a database, a feed id for an IoT service, etc.)
94+
Note that `*` is NOT a wildcard match character in this context.
9495

9596
The example `Items` section below takes advantage of a `default` entry in the `Strategies` section.
9697
Assume the `Strategies` section contains the line:

‎configuration/sitemaps.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ This provides the flexibility to present Items in the way desired in your home a
143143
- `icon` chooses the name of the icon file to show next to the element, [more details](items.html#icons).
144144

145145
- When an [Item]({{base}}/configuration/items.html) is defined, you have the opportunity to assign a label and/or an icon at that point.
146-
If no label or icon are specified in the Sitemap, then the label and/or icon you assigned to the Item will be displayed.
147-
Setting a value for `label` or `icon` of a Sitemap element will override the values defined for the linked Item.
146+
If no label or icon are specified in the Sitemap, then the label and/or icon you assigned to the Item will be displayed.
147+
Setting a value for `label` or `icon` of a Sitemap element will override the values defined for the linked Item.
148148

149149
It has to be considered that if the label defined in a Channel or an Item contains text and state, these representations have to be overwritten separately in the Sitemap.
150150
In the following example a Item which has a label and state defined is overwritten.
@@ -446,13 +446,13 @@ Adds a time-series chart object for the display of logged data.
446446
- `refresh` defines the refresh period of the Image (in milliseconds).
447447

448448
- `service` sets the persistence service to use.
449-
If no service is specified, openHAB will use the first queryable persistence service it finds.
450-
Therefore, for an installation with only a single persistence service, this is not required.
449+
If no service is specified, openHAB will use the first queryable persistence service it finds.
450+
Therefore, for an installation with only a single persistence service, this is not required.
451451

452452
- `period` is the scale of the time axis. Valid values are `h, 4h, 8h, 12h, D, 2D, 3D, W, 2W, M, 2M, 4M or Y`.
453453

454454
- `begin` / `end` sets the beginning and end of the time axis.
455-
Valid values are in the format: "yyyyMMddHHmm" (yyyy = year, MM = month, dd = day, HH = hour (0-23), mm = minutes).
455+
Valid values are in the format: `yyyyMMddHHmm` (`yyyy` = year, `MM` = month, `dd` = day, `HH` = hour (0-23), `mm` = minutes).
456456

457457
- `legend` is used to show or to hide the chart legend.
458458
Valid values are `true` (always show the legend) and `false` (never show the legend).

‎developers/bindings/binding-xml.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: developersguide
33
title: Binding Descriptions
44
---
55

6-
## Binding Definitions
6+
# Binding Definitions
77

88
Every binding has to provide meta information such as binding id or name.
99

@@ -16,7 +16,7 @@ The full Java API for binding definitions can be found in the Java package `org.
1616

1717
For the declarative way, you add your binding information in form of a `binding.xml` file to the bundle's folder `/src/main/resources/OH-INF/binding/binding.xml`.
1818

19-
### XML Structure for Binding Definitions
19+
## XML Structure for Binding Definitions
2020

2121
```xml
2222
<?xml version="1.0" encoding="UTF-8"?>
@@ -57,9 +57,9 @@ The full XML schema for binding definitions is specified in the [Binding XSD](ht
5757
- The attribute `uri` in the section `config-description` is optional, it *should not* be specified in binding definition files because it's an embedded configuration. If the `uri` is *not* specified, the configuration description is registered as `binding:bindingID`, otherwise the given `uri` is used.
5858
- If a configuration description is already specified somewhere else and the binding wants to (re-)use it, a `config-description-ref` should be used instead.
5959
- Normally the service id must not be defined, because it is implicitly set to "binding.&lt;binding.id&gt;".
60-
A binding can register an OSGi service which implements the ManagedService interface and define the service.pid as e.g."binding.hue" to receive the configuration.
60+
A binding can register an OSGi service which implements the ManagedService interface and define the service.pid as e.g."binding.hue" to receive the configuration.
6161

62-
### Example
62+
## Example
6363

6464
The following code gives an example for a binding definition.
6565

‎developers/bindings/config-xml.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The description can include limited HTML to enhance the display of this informat
3131

3232
The following HTML tags are allowed -: ```<b>, <br>, <em>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <i>, <p>, <small>, <strong>, <sub>, <sup>, <ul>, <ol>, <li>```.
3333
These must be inside the XML escape sequence - eg.
34-
```<description><![CDATA[ HTML marked up text here ]]></description>```.
34+
`<description><![CDATA[ HTML marked up text here ]]></description>`.
3535

3636
## XML Structure for Configuration Descriptions
3737

@@ -150,7 +150,6 @@ The above filter is evaluated as follows:
150150

151151
```text
152152
(type=Switch OR type=Dimmer) AND (tag=Light OR tag=Heating)
153-
154153
```
155154

156155
Similarly, the <strong>Channel</strong> context can contain criteria to filter channels based on <strong>kind</strong> field.

0 commit comments

Comments
 (0)
Please sign in to comment.