Commit 2962ce8
authored
Support dump diff in --check mode (#32)
Originally, when a difference existed between the original and formatted
file under --check mode, the resulting diff was not shown to the user.
This patch enables dumping the diff to the console, providing clear
visibility into what changes were made by the formatting process.
Before:
$ dtsfmt --check minimal.dts
minimal.dts
Errors found while formatting!
After:
$ dtsfmt --check minimal.dts
minimal.dts
-
-
+
+
-
-
-
- clock-frequency = <5000000>; /* the baudrate divisor is ignored */
- };
-
-reboot { value = <0x7777>; offset = <0x00>; regmap = <0x04>; compatible = "syscon-reboot"; };
+ clock-frequency = <5000000>;
+ /* the baudrate divisor is ignored */
+ };
+ reboot {
+ value = <0x7777>;
+ offset = <0x00>;
+ regmap = <0x04>;
+ compatible = "syscon-reboot";
+ };
-
Errors found while formatting!1 parent 69891ed commit 2962ce8
1 file changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
21 | 46 | | |
22 | 47 | | |
23 | 48 | | |
| |||
0 commit comments