diff --git a/Makefile b/Makefile index 40e2851..fc2f86e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ -.PHONY: test +.PHONY: test fmt devshell test: docker compose run --rm lorawan-device-profiles --run 'cd test-runner && cargo run' +fmt: + docker compose run --rm lorawan-device-profiles --run 'taplo fmt' + +devshell: + docker-compose run --rm lorawan-device-profiles diff --git a/shell.nix b/shell.nix index bc8042b..8a047f7 100644 --- a/shell.nix +++ b/shell.nix @@ -3,5 +3,6 @@ pkgs.mkShell { buildInputs = [ pkgs.rustup + pkgs.taplo ]; } diff --git a/taplo.toml b/taplo.toml new file mode 100644 index 0000000..7501ac5 --- /dev/null +++ b/taplo.toml @@ -0,0 +1,5 @@ +include = ["vendors/**/*.toml"] + +[formatting] + indent_tables = true + indent_entries = true diff --git a/vendors/rakwireless/devices/rak10702.toml b/vendors/rakwireless/devices/rak10702.toml index 5d9be9a..dfac958 100644 --- a/vendors/rakwireless/devices/rak10702.toml +++ b/vendors/rakwireless/devices/rak10702.toml @@ -27,7 +27,18 @@ # List of supported profiles. # # This list refers to one or multiple profiles in the profiles/ directory. - profiles = ["EU868_1_0_2.toml", "RU864_1_0_2.toml", "IN865_1_0_2.toml", "US915_1_0_2.toml", "AU915_1_0_2.toml", "KR920_1_0_2.toml", "AS923_1_1_0_2.toml", "AS923_2_1_0_2.toml", "AS923_3_1_0_2.toml", "AS923_4_1_0_2.toml"] + profiles = [ + "EU868_1_0_2.toml", + "RU864_1_0_2.toml", + "IN865_1_0_2.toml", + "US915_1_0_2.toml", + "AU915_1_0_2.toml", + "KR920_1_0_2.toml", + "AS923_1_1_0_2.toml", + "AS923_2_1_0_2.toml", + "AS923_3_1_0_2.toml", + "AS923_4_1_0_2.toml", + ] # Payload codec. # diff --git a/vendors/rakwireless/devices/wisblock-api-v2.toml b/vendors/rakwireless/devices/wisblock-api-v2.toml index 63cbfe8..264d93d 100644 --- a/vendors/rakwireless/devices/wisblock-api-v2.toml +++ b/vendors/rakwireless/devices/wisblock-api-v2.toml @@ -27,7 +27,18 @@ # List of supported profiles. # # This list refers to one or multiple profiles in the profiles/ directory. - profiles = ["EU868_1_0_2.toml", "RU864_1_0_2.toml", "IN865_1_0_2.toml", "US915_1_0_2.toml", "AU915_1_0_2.toml", "KR920_1_0_2.toml", "AS923_1_1_0_2.toml", "AS923_2_1_0_2.toml", "AS923_3_1_0_2.toml", "AS923_4_1_0_2.toml"] + profiles = [ + "EU868_1_0_2.toml", + "RU864_1_0_2.toml", + "IN865_1_0_2.toml", + "US915_1_0_2.toml", + "AU915_1_0_2.toml", + "KR920_1_0_2.toml", + "AS923_1_1_0_2.toml", + "AS923_2_1_0_2.toml", + "AS923_3_1_0_2.toml", + "AS923_4_1_0_2.toml", + ] # Payload codec. # diff --git a/vendors/rakwireless/devices/wisblock-kit-1.toml b/vendors/rakwireless/devices/wisblock-kit-1.toml index d9efcee..a655927 100644 --- a/vendors/rakwireless/devices/wisblock-kit-1.toml +++ b/vendors/rakwireless/devices/wisblock-kit-1.toml @@ -27,7 +27,18 @@ # List of supported profiles. # # This list refers to one or multiple profiles in the profiles/ directory. - profiles = ["EU868_1_0_2.toml", "RU864_1_0_2.toml", "IN865_1_0_2.toml", "US915_1_0_2.toml", "AU915_1_0_2.toml", "KR920_1_0_2.toml", "AS923_1_1_0_2.toml", "AS923_2_1_0_2.toml", "AS923_3_1_0_2.toml", "AS923_4_1_0_2.toml"] + profiles = [ + "EU868_1_0_2.toml", + "RU864_1_0_2.toml", + "IN865_1_0_2.toml", + "US915_1_0_2.toml", + "AU915_1_0_2.toml", + "KR920_1_0_2.toml", + "AS923_1_1_0_2.toml", + "AS923_2_1_0_2.toml", + "AS923_3_1_0_2.toml", + "AS923_4_1_0_2.toml", + ] # Payload codec. # diff --git a/vendors/rakwireless/devices/wisblock-kit-2.toml b/vendors/rakwireless/devices/wisblock-kit-2.toml index fb7478d..1cb9beb 100644 --- a/vendors/rakwireless/devices/wisblock-kit-2.toml +++ b/vendors/rakwireless/devices/wisblock-kit-2.toml @@ -27,7 +27,18 @@ # List of supported profiles. # # This list refers to one or multiple profiles in the profiles/ directory. - profiles = ["EU868_1_0_2.toml", "RU864_1_0_2.toml", "IN865_1_0_2.toml", "US915_1_0_2.toml", "AU915_1_0_2.toml", "KR920_1_0_2.toml", "AS923_1_1_0_2.toml", "AS923_2_1_0_2.toml", "AS923_3_1_0_2.toml", "AS923_4_1_0_2.toml"] + profiles = [ + "EU868_1_0_2.toml", + "RU864_1_0_2.toml", + "IN865_1_0_2.toml", + "US915_1_0_2.toml", + "AU915_1_0_2.toml", + "KR920_1_0_2.toml", + "AS923_1_1_0_2.toml", + "AS923_2_1_0_2.toml", + "AS923_3_1_0_2.toml", + "AS923_4_1_0_2.toml", + ] # Payload codec. # diff --git a/vendors/rakwireless/devices/wisblock-kit-4.toml b/vendors/rakwireless/devices/wisblock-kit-4.toml index b4faeb1..9194a34 100644 --- a/vendors/rakwireless/devices/wisblock-kit-4.toml +++ b/vendors/rakwireless/devices/wisblock-kit-4.toml @@ -27,7 +27,18 @@ # List of supported profiles. # # This list refers to one or multiple profiles in the profiles/ directory. - profiles = ["EU868_1_0_2.toml", "RU864_1_0_2.toml", "IN865_1_0_2.toml", "US915_1_0_2.toml", "AU915_1_0_2.toml", "KR920_1_0_2.toml", "AS923_1_1_0_2.toml", "AS923_2_1_0_2.toml", "AS923_3_1_0_2.toml", "AS923_4_1_0_2.toml"] + profiles = [ + "EU868_1_0_2.toml", + "RU864_1_0_2.toml", + "IN865_1_0_2.toml", + "US915_1_0_2.toml", + "AU915_1_0_2.toml", + "KR920_1_0_2.toml", + "AS923_1_1_0_2.toml", + "AS923_2_1_0_2.toml", + "AS923_3_1_0_2.toml", + "AS923_4_1_0_2.toml", + ] # Payload codec. # diff --git a/vendors/rakwireless/vendor.toml b/vendors/rakwireless/vendor.toml index d2f33d8..38e6ab4 100644 --- a/vendors/rakwireless/vendor.toml +++ b/vendors/rakwireless/vendor.toml @@ -16,7 +16,13 @@ # List of devices. # # This list refers to one or multiple devices in the devices/ directory. - devices = ["rak10702.toml", "wisblock-api-v2.toml", "wisblock-kit-1.toml", "wisblock-kit-2.toml", "wisblock-kit-4.toml"] + devices = [ + "rak10702.toml", + "wisblock-api-v2.toml", + "wisblock-kit-1.toml", + "wisblock-kit-2.toml", + "wisblock-kit-4.toml", + ] # Vendor metadata (optional). [vendor.metadata]