]> gitweb.factorcode.org Git - factor.git/commitdiff
lint: Add a word to find redundant word props like 'inline [flushable|foldable]'
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 7 Nov 2011 03:33:07 +0000 (19:33 -0800)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 7 Nov 2011 03:33:07 +0000 (19:33 -0800)
extra/lint/lint.factor

index e6710302cce80e804d65b7a774d5853a9d27e501..6d609efd75d0dd9ee958985f5a13bbe933aea89b 100644 (file)
@@ -300,6 +300,14 @@ PRIVATE>
         } 1&&
     ] any? ;
 
+: find-redundant-word-props ( -- seq )
+    all-words [
+        {
+            [ { [ foldable? ] [ flushable? ] } 1|| ]
+            [ inline? ]
+        } 1&&
+    ] filter ;
+
 : lint-all ( -- seq )
     all-words run-lint dup lint. ;