dist/tools: add sort-variables script#6818
Conversation
|
Would be great if this tool could also check if the variables are sorted. |
|
(for CI) |
|
@vincent-d ping? |
|
Sorry, this was not in my priority list ;) I don't know if I'll have time to work on this soon, but feel free to improve if you want. |
|
Okay, but I guess it is a start :-) |
miri64
left a comment
There was a problem hiding this comment.
Wait...
dist/tools/sort-variables/sort-variables.sh . BOARD_BLACKLISTyields (among other things):
diff --git a/examples/dtls-echo/Makefile b/examples/dtls-echo/Makefile
index 25b97f6..d53d3f8 100644
--- a/examples/dtls-echo/Makefile
+++ b/examples/dtls-echo/Makefile
@@ -8,10 +8,9 @@ BOARD ?= native
RIOTBASE ?= $(CURDIR)/../..
# TinyDTLS only has support for 32-bit architectures ATM
-BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-uno chronos \
- msb-430 msb-430h telosb waspmote-pro wsn430-v1_3b wsn430-v1_4 \
- z1 \
- nrf52dk # see #6022
+BOARD_BLACKLIST := # #6022 arduino-duemilanove arduino-mega2560 arduino-uno chronos \
+ msb-430 msb-430h nrf52dk see telosb waspmote-pro wsn430-v1_3b \
+ wsn430-v1_4 z1
BOARD_INSUFFICIENT_MEMORY := airfy-beacon calliope-mini cc2650stk maple-mini \
microbit nrf51dongle nrf6310 nucleo32-f031 \So this is broken for comments :-/
|
It can be easy to remove comments before sorting, but I don't see an easy way to sort and keep comments... |
| if [ $# -lt 2 ]; then | ||
| echo "Usage: sort-variables.sh <path> <variable>" | ||
| echo "Sort the <variable> alphabetically, and cut lines to 80 characters" | ||
| echo "It will search is <path> and its subdirectories" |
|
Any plans to work on this further? Maybe we can come up with a solution to keep the comments or agree on a scheme how to comment on a list otherwise. |
|
Ping @vincent-d? |
|
@vincent-d how would you like to proceed here? This seems to require some strategic effort ;) |
|
Ping @vincent-d. Can this be closed in favor of #10111? |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
|
ping @vincent-d again |
|
Sorry for being unresponsive here. I still don't have time to invest in this. As I said, I guess we could remove comments when sorting. If everyone can live with this, then we could merge. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
This is the script I used for #6740.
It's not really tested and comes without any warranty as it might have some side effects.
I thought it might still be interesting to keep it, though.