detect duplicate comment fields master
authorJacob Lifshay <programmerjake@gmail.com>
Wed, 17 Mar 2021 20:50:13 +0000 (13:50 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Wed, 17 Mar 2021 20:50:13 +0000 (13:50 -0700)
generate_headers.py

index 9e33e93f63d220abceb1a27e6df10bb74ef911c8..7ead2d42b4ff5b20671cdfcffa142b4eedb79c89 100755 (executable)
@@ -276,6 +276,9 @@ def make_opcodes_dict() -> Dict[str, Dict[str, Any]]:
             comment = opcode['comment']
             if comment not in retval:
                 retval[comment] = opcode
             comment = opcode['comment']
             if comment not in retval:
                 retval[comment] = opcode
+            else:
+                print(f"duplicate comment field: {comment!r}"
+                      f" subdecoder.pattern={subdecoder.pattern}")
     return retval
 
 
     return retval