I need a tool to find duplicates or similar blocks of text in a singular text file or set of text files

后端 未结 6 1428
甜味超标
甜味超标 2021-02-06 13:49

I want to automate moving duplicate or similar C code into functions.

This must work under Linux.

6条回答
  •  天命终不由人
    2021-02-06 14:16

    You'll want to take a look at Simian. It's free for noncommercial projects. Try something like:

    # Find all C source files and identify similarities/duplicate code.
    simian -includes=**/*.c -excludes=**/*_test.c
    

提交回复
热议问题