c++ - How to automate detection of copied code in large code base? -


i looking automated way detect when code being copied , pasted part of development on large code base. working in c++. intention detect high probability , few false positives in automated fashion such changes doing can rejected.

it easy developers fear unknown of code , instead copy usage , make small tweak instead of working on master copy in way works all. want detect , stop such short cuts make code harder maintain.

can suggest automated way try , detect such cases? can applied after fact find areas have slipped through before introduction of automated solution.

just use pmd package. supports c++ , configurable cpd (copy-paste-detection)...

it enables detection of lot more:

  • unused code
  • coding style violations
  • method/function/routine size
  • tight coupling

and more (although lot of docs java specific, i'm not sure else applicable c++)...


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -