Skip to content

Commit

Permalink
Fix linter errors (#1439)
Browse files Browse the repository at this point in the history
* Some leftover linting error fixes.
* Adapt rules and enble markdownlint for pull requests.

Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
  • Loading branch information
Confectrician authored Jan 10, 2021
1 parent 92dcbd9 commit d2d2c44
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
- '2.5.x'
tags-ignore:
- '**'
# pull_request:
# branches:
# - main
# types: [open,synchronize,reopen]
pull_request:
branches:
- main
types: [open,synchronize,reopen]

jobs:
markdownlint:
Expand Down
1 change: 1 addition & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"MD013": false,
"MD024": {"allow_different_nesting": true},
"MD025": false,
"MD026": false,
"MD029": { "style": "one" },
"MD033": false,
"MD041": false,
Expand Down
2 changes: 1 addition & 1 deletion addons/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Ephemeris is a way to determine what type of day today or a number of days befor
For example, a way to determine if today is a weekend, a bank holiday, someone’s birthday, trash day, etc.
The default bank holidays and configuration syntax is defined by the [Jollyday library](/~https://github.com/svendiedrichsen/jollyday).

### Actions
### Actions Examples

#### Rules DSL

Expand Down
2 changes: 1 addition & 1 deletion administration/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,6 @@ Depending on your system, you may have to substitute [the directory](#console-se
sudo sed -i -e "s/sshPort = .*/sshPort = 1234/g" /var/lib/openhab/etc/org.apache.karaf.shell.cfg
```

---
## More Information

Please check the [Apache Karaf reference](https://karaf.apache.org/manual/latest/) for more details.
4 changes: 2 additions & 2 deletions developers/bindings/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ Currently the framework provides two base thing handler implementations for the

Sub-classes of these handlers must only override the operation `getConfigStatus` to provide the configuration status in form of a collection of `org.openhab.core.config.core.status.ConfigStatusMessage`s.

#### Internationalization
#### Internationalization of Config Status Messages

The framework will take care of internationalizing messages.

Expand Down Expand Up @@ -835,7 +835,7 @@ If this behavior is not appropriate for the implemented discovery service, one c
}
```

### Internationalization
### Internationalization of Discovery result labels

The framework will take care of internationalizing labels of discovery results if you extend the `AbstractDiscoveryService`.
See [i18n](../utils/i18n.html#discovery) for more information.
Expand Down
2 changes: 1 addition & 1 deletion developers/buildsystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The need to be added to the feature to make them available at runtime.
Two cases need to be treated differently:

1. Bundles that have a core feature are referenced by the feature (e.g. `<feature>openhab-runtime-jna</feature>` or `<feature>openhab-transport-upnp</feature>`).
2. Bundles that do not have a core feature are added directly (e.g. `<bundle dependency="true">mvn:commons-codec/commons-codec/1.10</bundle>`).
1. Bundles that do not have a core feature are added directly (e.g. `<bundle dependency="true">mvn:commons-codec/commons-codec/1.10</bundle>`).

### Multi-Bundle Features / Sub-Bundles

Expand Down
8 changes: 7 additions & 1 deletion developers/ide/intellij.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,31 @@ This article refers to the directory where you installed the distribution as `<D
## Build the addons repostory

1. fork and clone the [openhab addons repository](https://www.github.com/openhab/openhab-addons) into a new directory (Reference `<ADDON_DIR>` from now on for this arcticle)
- `git clone /~https://github.com/<yourgitusername>/openhab-addons` (replace git user name accordingly)

- Clone with `git clone /~https://github.com/<yourgitusername>/openhab-addons` (replace git user name accordingly)

1. open IntelliJ and create a new Project from existing sources (File | New | Project from existing sources) and pick `<ADDON_DIR>`/pom.xml

- IntelliJ will start importing, indexing and building, it will take while, wait until finished (see status bar)

1. Use Maven to clean & install the addons project

- mvn clean install in the root of `<ADDON_DIR>` using commandline Maven (or IntelliJ Maven view)
- some of the addons might fail to build - if it's not the one, you're interested in that should not bother you
- when the Maven project finished, you should find the freshly built addon JAR in the target directory

## Debug your addon

1. copy the addon JAR to Openhab distribution created before

- `cp target/<ADDON_NAME>.jar <DISTRO_DIR>/addons`

1. The running instance of the openhab distribution should pick up your new addon & start it

- you can type `log:tail` in the openhab console to stream the openhab logs

1. create a Remote Debug runtime configuration in IntelliJ:

- Open menu Run | Edit configurations
- click the + sign to add a "Remote" configuration
- adapt the module setting to the root (org.openhab.addons.reactor)
Expand Down
4 changes: 4 additions & 0 deletions developers/ide/vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The following steps will only need to be done once to setup both VSCode and your
The following steps will show you how to setup a specific bundle for development with VSCode. These steps will show how to setup the Russound bundle but are generic to any bundle in the system.

1. Ensure the bundle builds correctly (natively with maven)

1. Open console to the bundle location (example: `%BASE%\openhab-addons\bundles\org.openhab.binding.russound`)
1. `mvn clean install -DskipChecks` in the console to build the bundle
1. Should produce a jar file in the 'target' directory of the bundle(example: `%BASE%\openhab-addons\bundles\org.openhab.binding.russound\target\org.openhab.binding.russound-2.5.0-SNAPSHOT.jar`)
Expand Down Expand Up @@ -69,14 +70,17 @@ The following steps will show you how to setup a specific bundle for development

1. Edit launch.json and ...<br>
![launch.json changes](./images/ide_setup_vscode_launch.png)

1. Set the `port` to xxxx (from step 7). This can be skipped if xxxx was 5005 from step 7.
1. Set the `hostName` to the hostname running openHAB. This can be skipped if running locally (localhost)
1. Save and close launch.json

1. Verify that VSCode can build the system and connect to a debug instance of openHAB:

1. Shutdown any instances of openHAB
1. Press `CTRL-SHIFT-P -> Tasks: Run Task -> Start openHAB (Debug)` to start an openHAB instance in debug mode. You should see openHAB startup in a new VSCode terminal.
1. Press F5 (or bring up debug in VSCode and choose the "Debug (Attach) - openHAB" configuration) and the following should occur in the VSCode terminal

1. The maven compile occuring (successfully)
1. The resulting JAR is copied to the openHAB addons directory (`openhab_addons`)
1. Connecting to the openHAB instance (the debug call stack should show a bunch of openHAB type threads running)
Expand Down
14 changes: 8 additions & 6 deletions installation/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,14 @@ By installing the openHAB process as a service in Windows, you can:
![Wrapper_Start_Windows](images/Wrapper_Start_Windows.jpg)

1. Your openHAB Windows service is now installed and running.

Validate proper operations by:

- Browsing to [http://localhost:8080](http://localhost:8080)

- Verifying that the Windows Service is running and set to Automatic Startup type.
Use `services.msc` and find the `openHAB` service.

![Windows Service](images/Windows_Service.jpg)

- Logging in with an SSH client to the console (see info below)

### File Locations
Expand Down Expand Up @@ -238,10 +237,13 @@ Alternatively, you can use a standard SSH client:
1. Install an SSH client application, e.g., [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html), [KiTTY](http://kitty.9bis.net/) or [Xshell 5](https://www.netsarang.com/products/xsh_overview.html)
1. Setup a session with the following parameters:
- Host: 127.0.0.1
- Port: 8101
- Username: `openhab`
- Password: `habopen`
```text
Host: 127.0.0.1
Port: 8101
Username: openhab
Password: habopen
```
![SSH Connection 1](images/SSH_Connection_1.jpg)
Expand Down
6 changes: 5 additions & 1 deletion introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ h1.welcome {

<img src="/openhab-logo-square.png" width="150" height="150" class="intro-logo" />

<h1 class="welcome">Welcome!</h1>
<h1 class="welcome">

# Welcome!

</h1>

The **open H**ome **A**utomation **B**us (openHAB, *pronounced ˈəʊpənˈhæb*) is an open source, technology agnostic home automation platform which runs as the center of your smart home!

Expand Down

0 comments on commit d2d2c44

Please sign in to comment.