IBDecodable / IBLinter

A linter tool for Interface Builder
MIT License
948 stars 42 forks source link

.iblinter.yml is not working properly #6

Closed rbniranjanharman closed 6 years ago

rbniranjanharman commented 6 years ago

Thanks for creating wonderful tools. it is very help for managing tre the storyboard and xib.

I am trying to use this tools into my project and successfully added this tools. But I want to disable some rules as you have described in description. But When I tried to use .yml file it is not working. I am attaching .yml file in attachement. for testing I have added all rule under disable category but still i am getting xib and storyboard error.

This is my .iblinter.yml file :

disabled_rules:

Please help me to import this tools in my project.

kateinoigakukun commented 6 years ago

This problem is caused by YAML mapping error for null value. https://github.com/kateinoigakukun/IBLinter/blob/a0a71b6127ce6edb48c3bc2a65c1c0d032dd9497/Sources/IBLinterKit/Config.swift#L33-L35

Your .iblinter.yml file set null to enabled_rules. So IBLinter failed to map configuration file and use default configuration.

https://github.com/kateinoigakukun/IBLinter/blob/a0a71b6127ce6edb48c3bc2a65c1c0d032dd9497/Sources/IBLinterKit/Commands/ValidateCommand.swift#L23

I'll fix this issue. Until then, remove enabled_rules: and you can use this tool for your project!

disabled_rules:
  - custom_class_name
  - relative_to_margin
  - misplaced
  - enable_autolayout
  - duplicate_constraint
excluded:
  - Carthage
kateinoigakukun commented 6 years ago

Fixed 🎉