Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix erroneous unused import flagging on custom destructure operators #142

Commits on Jan 26, 2018

  1. Configuration menu
    Copy the full SHA
    443ba01 View commit details
    Browse the repository at this point in the history
  2. Fix KtLint erroneously marking custom componentN operators as unused

    - Devs can write custom componentN operators in order to allow
      destructuring blocks of > 5 values, i.e.
    
        inline operator fun <T> component6 = get(5)
    
    which allows the following (which is NOT possible without the above
    extension method):
    
       val (one, two, three, four, five, six) = someList
                                         ^--- component6() is imported to
    make this possible
    
    - In order to avoid marking these imports as unused we can ignore all
      imports that match componentX (where X is any number)
    JelloRanger committed Jan 26, 2018
    Configuration menu
    Copy the full SHA
    4d13e87 View commit details
    Browse the repository at this point in the history