Tips to show similarities in files

后端 未结 3 1831
误落风尘
误落风尘 2021-02-15 17:38

In a project, I found some css files that \"smell\" like there are copy-pasted rules in them.

I wonder what are your strategies for detecting copy-paste stuff in files.

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-15 18:13

    There is a Copy-Paste Detection (CPD) project on sourceforge; http://pmd.sourceforge.net/cpd.html

    But even in large projects I find my own knowledge of the code to be a reliable (although not foolproof) detection mechanism.

    Also see this question for other suggestions.

提交回复
热议问题