Fastlane + OCLint + CocoaPods集成。排除Pods文件夹时出错

时间:2015-08-19 18:17:03

标签: ios regex xcode cocoapods fastlane

我使用fastlane-1.17.1,但会尽快更新。我创建了下一个测试代码的通道:

lane :test do
    xctool [
      "--reporter", "json-compilation-database:compile_commands.json",
      "clean",
      "build"
    ].join(" ")
    xctool :test
    oclint(
      compile_commands: 'compile_commands.json',
      select_reqex: /^((?!Pods)[\s\S])*$/,               # Select all files matching this reqex
      report_type: 'pmd',
      max_priority_1: 10,                # The max allowed number of priority 1 violations
      max_priority_2: 100,               # The max allowed number of priority 2 violations
      max_priority_3: 1000,              # The max allowed number of priority 3 violations
      rc: 'LONG_LINE=200'                # Override the default behavior of rules
    ) 
  end

正则表达式我从这个答案中得到了:https://stackoverflow.com/a/406408/2122979 我也试过/^((?!Pods).)*$/同样的结果。如果我评论select_regex行,它可以正常工作。

失败

/Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/actions/actions_helper.rb:113:in `sh_no_action': 
Exit status of command 'cd /Users/ossir/Desktop/{Project}/{Project} && oclint -report-type=pmd -o=oclint_report.pmd -rc=LONG_LINE=200 -max-priority-1=10 -max-priority-2=100 -max-priority-3=1000 "{long list of files without Pods which is good}"' 
was 256 instead of 0.  (RuntimeError) 
LLVM ERROR: Could not auto-detect compilation database for file "/Users/ossir/Library/Developer/Xcode/DerivedData/{Project}-bjkziuvyrwbvkzbzmqqwaevctmfa/Build/Intermediates/{Project}.build/Debug-iphonesimulator/{Project}.build/DerivedSources/{Project}_vers.c" No compilation database found in /Users/ossir/Library/Developer/Xcode/DerivedData/{Project}-bjkziuvyrwbvkzbzmqqwaevctmfa/Build/Intermediates/{Project}.build/Debug-iphonesimulator/{Project}.build/DerivedSources or any parent directory json-compilation-database: Error while opening JSON database: No such file or directory from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/actions/actions_helper.rb:87:in `sh'  from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/action.rb:63:in `sh'    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/actions/oclint.rb:44:in `run'   from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/runner.rb:142:in `block (2 levels) in execute_action'   from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/actions/actions_helper.rb:62:in `execute_action'    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/runner.rb:128:in `block in execute_action'  from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/runner.rb:127:in `chdir'    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/runner.rb:127:in `execute_action'   from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/fast_file.rb:120:in `method_missing'    from (eval):41:in `block (3 levels) in parse'   from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/lane.rb:36:in `call'    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/lane.rb:36:in `call'    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/runner.rb:50:in `block in execute'  from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/runner.rb:44:in `chdir'     from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/runner.rb:44:in `execute'   from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/lane_manager.rb:36:in `cruise_lane'     from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/lib/fastlane/command_line_handler.rb:31:in `handle'  from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/bin/fastlane:35:in `block (2 levels) in run'     from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'   from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'   from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'  from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:68:in `run!'     from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'  from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/bin/fastlane:124:in `run'    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.17.1/bin/fastlane:130:in `<top (required)>'   from /usr/bin/fastlane:23:in `load'     from /usr/bin/fastlane:23:in `<main>'

P.S。我试过fastlane-1.18.0。仍然无法正常工作

0 个答案:

没有答案