Skip to content

Commit

Permalink
improve markdownlint and add to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
miaucl committed Aug 27, 2024
1 parent 1ac0fa4 commit 67e4e1c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ jobs:
with:
config: '.markdownlint.yaml'
globs: |
README.md
CHANGELOG.md
docs/*.md
**/*.md
!docs/changelog.md
!docs/index.md
!docs/license.md
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docs/changelog.md
docs/index.md
docs/license.md
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ repos:
types: [python]
require_serial: true
files: ^(docker2mqtt)/.+\.py$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
args: ["--disable=MD013"]
- id: markdownlint-fix
args: ["--disable=MD013", "--fix"]
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"gethostname",
"HOMEASSISTANT",
"levelname",
"markdownlint",
"memorylimit",
"memoryused",
"miaucl",
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "2.0.0",
"tasks": [
{
"label": "Python: Build docker2mqtt docker image",
"label": "Docker: Build docker2mqtt image",
"type": "shell",
"command": "docker build --tag docker2mqtt:latest .",
"problemMatcher": [],
Expand Down Expand Up @@ -49,7 +49,7 @@
}
},
{
"label": "Python: Run docker2mqtt commit hooks",
"label": "pre-commit: run all files",
"type": "shell",
"command": "pre-commit run --all-files",
"problemMatcher": [],
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ You can use environment variables to control the behavior.
| `mqtt_client_id`| `MQTT_CLIENT_ID` | `mqtt2discord` | The client id to send to the MQTT broker. |
| `mqtt_host`| `MQTT_HOST` | `localhost` | The MQTT broker to connect to. |
| `mqtt_port`| `MQTT_PORT` | `1883` | The port on the broker to connect to. |
| `mqtt_user`| `MQTT_USER` | `` | The user to send to the MQTT broker. Leave unset to disable authentication. |
| `mqtt_password`| `MQTT_PASSWD` | `` | The password to send to the MQTT broker. Leave unset to disable authentication. |
| `mqtt_user`| `MQTT_USER` | | The user to send to the MQTT broker. Leave unset to disable authentication. |
| `mqtt_password`| `MQTT_PASSWD` | | The password to send to the MQTT broker. Leave unset to disable authentication. |
| `mqtt_timeout`| `MQTT_TIMEOUT` | `30` | The timeout for the MQTT connection. |
| `mqtt_topic_prefix`| `MQTT_TOPIC_PREFIX` | `ping` | The MQTT topic prefix. With the default data will be published to `ping/<hostname>`. |
| `mqtt_qos`| `MQTT_QOS` | `1` | The MQTT QOS level |
Expand Down Expand Up @@ -144,7 +144,3 @@ Following VSCode integrations may be helpful:
## Credits

This is a detached fork from the repo <https://github.com/skullydazed/docker2mqtt>, which does not seem to get evolved anymore.


TODO:
- cli interface

0 comments on commit 67e4e1c

Please sign in to comment.