Fix check for spacing around operator for binary operators inside unary expression (#2653)

For example an expression wrapped in `!(<some-binary-expression>)` should check/fix spacing around the operator in the inner binary expression.

Fixes #2652
2 files changed
tree: 85f8aa82f345e823f09a68ead36bcdc849b3d272
  1. .github/
  2. build-logic/
  3. documentation/
  4. gradle/
  5. ktlint-api-consumer/
  6. ktlint-bom/
  7. ktlint-cli/
  8. ktlint-cli-reporter-baseline/
  9. ktlint-cli-reporter-checkstyle/
  10. ktlint-cli-reporter-core/
  11. ktlint-cli-reporter-format/
  12. ktlint-cli-reporter-html/
  13. ktlint-cli-reporter-json/
  14. ktlint-cli-reporter-plain/
  15. ktlint-cli-reporter-plain-summary/
  16. ktlint-cli-reporter-sarif/
  17. ktlint-cli-ruleset-core/
  18. ktlint-logger/
  19. ktlint-rule-engine/
  20. ktlint-rule-engine-core/
  21. ktlint-ruleset-standard/
  22. ktlint-ruleset-template/
  23. ktlint-test/
  24. ktlint-test-ruleset-provider-v2-deprecated/
  25. .announce
  26. .editorconfig
  27. .gitattributes
  28. .gitignore
  29. .homebrew
  30. ADOPTERS.md
  31. build.gradle.kts
  32. CHANGELOG.md
  33. CODE_OF_CONDUCT.md
  34. CONTRIBUTING.md
  35. gradle.properties
  36. gradlew
  37. gradlew.bat
  38. jitpack.yml
  39. LICENSE
  40. README.md
  41. RELEASE_TESTING.MD
  42. RELEASING.md
  43. renovate.json
  44. settings.gradle.kts
  45. SIGNING.md
README.md

Key features

  • No configuration required
  • Built-in Rule sets
  • Built-in formatter
  • .editorconfig support
  • Several built-in reporters: plain, json, html and checkstyle
  • Executable jar
  • Allows extension with custom rule sets and reporters

Quick start

Follow steps below for a quick start with latest ktlint release.

Documentation

User guide

Legal

This project is not affiliated with nor endorsed by JetBrains.
All code, unless specified otherwise, is licensed under the MIT license.
Copyright (c) 2019 Pinterest, Inc.
Copyright (c) 2016-2019 Stanley Shyiko.