NijiDigital / gyro

Tool to generate Realm.io models for Swift, Java & ObjC from xcdatamodel and its visual Xcode editor
Apache License 2.0
93 stars 15 forks source link

change alias system and fix #52 #55

Closed StevenWatremez closed 6 years ago

StevenWatremez commented 6 years ago

In this PR I managed :

This PR change the system management for alias. Instead using .alias file with target template wrote inside, now we use config.yml file to list each alias and target.

This config file is also use to list deprecated template.

StevenWatremez commented 6 years ago

At this point I have a difficulty with a rubocop error.

lib/gyro/template.rb:23:5: C: Assignment Branch Condition size for print_list is too high. [22.49/20]
    def self.print_list
    ^^^

I have no idea how can I reduce this ABC error. I tried to reduce Assignements but the ABC increased, I don't know why. Do you have some tips for me ?

AliSoftware commented 6 years ago

I have no idea how can I reduce this ABC error. I tried to reduce Assignements but the ABC increased, I don't know why. Do you have some tips for me ?

The only best solution for that is to split the function, extracting some parts in private methods