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

Do not use !isEmpty methods from the collections – need to use isNotEmpty instead #692

Closed
orchestr7 opened this issue Jan 11, 2021 · 1 comment · Fixed by #704
Closed
Assignees
Labels
bug Something isn't working

Comments

@orchestr7
Copy link
Member

This is the philosophy of Kotlin - we should not be using !isEmpty - we should explicitly use isNotEmpty
This should be a warning.

Also same for !isNotEmpty - we should suggest isEmpty for such cases

@orchestr7 orchestr7 added the bug Something isn't working label Jan 11, 2021
@petertrr
Copy link
Member

Same can apply to strings: isEmpty/isBlank

aktsay6 added a commit that referenced this issue Jan 13, 2021
### What's done:
  * Added new rule
  * Added warn tests
  * Added fix tests
aktsay6 added a commit that referenced this issue Jan 13, 2021
### What's done:
  * Fixed bugs
aktsay6 added a commit that referenced this issue Jan 14, 2021
### What's done:
  * Fixed bug
  * Added guide to chapter 5
aktsay6 added a commit that referenced this issue Jan 14, 2021
### What's done:
  * Fixed bug
aktsay6 added a commit that referenced this issue Jan 14, 2021
### What's done:
  * Fixed bug
aktsay6 added a commit that referenced this issue Jan 14, 2021
…mpty instead (#704)

* feature/check-isEmpty-method(#692)

### What's done:
  * Added new rule
  * Added warn tests
  * Added fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants