Skip to content

Commit f10fc49

Browse files
committed
docs(CONTRIBUTING.md): add general guidelines for contributions
1 parent 28a55a1 commit f10fc49

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

CONTRIBUTING.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Contributing
2+
3+
Contributing to InputPlumber is done via Pull Requests on the main github repository: [InputPlumber](https://github.com/shadowblip/InputPlumber).
4+
5+
## Commit Titles
6+
7+
This project uses [semantic-release](https://github.com/semantic-release/semantic-release) which uses Angular-style commit messages in order to automatically trigger releases.
8+
9+
You can read more about it [here](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format).
10+
11+
In short every commit must be in the form of:
12+
13+
- chore(*thing*): Title words
14+
- fix(*thing*): Title words
15+
- feat(*thing*): Title words
16+
- docs(*thing*): Title words
17+
18+
This is a non-exhaustive list, please read the above link to learn more.
19+
20+
## General Rules
21+
22+
Files related to IDEs are not allowed in the repository.
23+
24+
Every commit must go through
25+
26+
```sh
27+
cargo fmt
28+
```
29+
30+
so make sure to run it before any new commit.
31+
32+
## Testing and debugging
33+
34+
In order to run the application you have to stop every other running instances and launch as the in-development version as root:
35+
this can be achieved launching lldb-server as root and connecting to that service to debug InputPlumber.
36+
37+
The command is the following:
38+
39+
```sh
40+
lldb-server platform --listen "*:1234" --server
41+
```
42+
43+
if you want to use a systemd service:
44+
45+
```ini
46+
[Unit]
47+
Description=lldb debug server
48+
Wants=network-online.target
49+
After=network.target network-online.target
50+
51+
[Service]
52+
ExecStart=lldb-server platform --listen "*:1234" --server
53+
Restart=always
54+
WorkingDirectory=/var/lldb-debug-server
55+
56+
[Install]
57+
WantedBy=multi-user.target
58+
```
59+
60+
however remember to disable it when you are done and to be on a secure network as no password will be asked and every executable sent
61+
will be run as root.
62+
63+
A minimal configuration for VSCode with CodeLLDB extension to match the previous command is as follows:
64+
65+
```json
66+
{
67+
68+
"version": "0.2.0",
69+
"configurations": [
70+
{
71+
"name": "Remote launch",
72+
"type": "lldb",
73+
"request": "launch",
74+
"program": "${workspaceFolder}/target/debug/inputplumber",
75+
"initCommands": [
76+
"platform select remote-linux",
77+
"platform connect connect://192.168.1.19:1234",
78+
"settings set target.inherit-env false"
79+
],
80+
"env": {
81+
"PATH": "/usr/bin:/usr/local/sbin:/usr/local/bin:/var/lib/flatpak/exports/bin:/usr/lib/rustup/bin"
82+
}
83+
}
84+
]
85+
}
86+
```

0 commit comments

Comments
 (0)