Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DRYing code in iOS / Objective-C

Are there any tools to detect repetitive code in iOS / Objective-C apps?

like image 873
Mantas Avatar asked Jan 07 '12 01:01

Mantas


2 Answers

You can use Jenkins and PMD's Copy Paste Detector (CPD) to find duplicate code in your objective C source code. See instructions here: http://deadmeta4.com/2011/05/17/objective-c-copy-paste-detection-using-jenkins/

like image 67
Vineet Bhatia Avatar answered Oct 11 '22 15:10

Vineet Bhatia


Here's a ZIP of a project that uses same approach (PMD's CPD) and shows the results in Xcode's build log.

enter image description here

like image 41
tt.Kilew Avatar answered Oct 11 '22 17:10

tt.Kilew