我一直在 OSX 上的 Objective-C 项目中使用 sloccount,直到最近我升级到 OSX 10.9 Mavericks 才遇到问题。当我尝试运行这个简单的脚本时:
#!/bin/sh
sloccount --duplicates --wide --details WeatherApp > Build/sloccount.sc
我得到这个:
/Applications/sloccount/compute_sloc_lang: line 52: c_count: command not found
Warning! No 'Total' line in Models/ansic_outfile.dat.
输出文件有这个:
Creating filelist for Application
Creating filelist for Controllers
Creating filelist for Helpers
Creating filelist for Managers
Creating filelist for Models
Creating filelist for Support
Creating filelist for Views
Categorizing files.
Computing results.
44 objc Application /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Application/AppDelegate.m
11 objc Application /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Application/AppDelegate.h
24 objc Controllers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Controllers/CitiesViewController.m
10 objc Controllers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Controllers/CitiesViewController.h
74 objc Helpers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Helpers/TranslatorHelper.m
47 objc Helpers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Helpers/ValidatorHelper.m
18 objc Helpers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Helpers/ErrorNotificationHelper.h
21 objc Helpers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Helpers/TranslatorHelper.h
14 objc Helpers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Helpers/ValidatorHelper.h
85 objc Managers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Managers/WeatherAPIManager.m
20 objc Managers /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Managers/WeatherAPIManager.h
15 objc Support /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Support/main.m
13 objc Support /Users/ruenzuo/Documents/GitHub/north-american-ironman/WeatherApp/Support/Includes.h
Jenkins 的 Sloccount 插件无法解析它。
对此有什么想法吗?