0

I use fastlane-1.17.1, but will try to update it soon. I created next lane for testing my code:

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

Regex I took from this answer: https://stackoverflow.com/a/406408/2122979 I've tried also /^((?!Pods).)*$/ with same result. It works fine if I comment select_regex line.

It fails

/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. I've tried on fastlane-1.18.0. Still does not work

Cœur
  • 32,421
  • 21
  • 173
  • 232
Ossir
  • 3,035
  • 31
  • 50

0 Answers0