Kaynağa Gözat

tools/dev/internal: add script to check braces

Nathalie Furmento 8 yıl önce
ebeveyn
işleme
4de97381d5
1 değiştirilmiş dosya ile 18 ekleme ve 0 silme
  1. 18 0
      tools/dev/internal/starpu_check_braces.sh

+ 18 - 0
tools/dev/internal/starpu_check_braces.sh

@@ -0,0 +1,18 @@
+#!/bin/sh
+
+for d in tools src tests examples
+do
+    for ext in c h cl cu
+    do
+	grep -rsn "{" $d |grep ".${ext}:" | grep -v "}" | grep -v ".${ext}:[0-9]*:[[:space:]]*{$" > /tmp/braces
+	if test -s /tmp/braces
+	then
+	    less /tmp/braces
+	fi
+	grep -rsn "}" $d |grep ".${ext}:" | grep -v "{" | grep -v "};" | grep -v ".${ext}:[0-9]*:[[:space:]]*};*$" > /tmp/braces
+	if test -s /tmp/braces
+	then
+	    less /tmp/braces
+	fi
+    done
+done