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

Infix function ** mistaken for a wildcard import #799

Closed
binkley opened this issue Jun 26, 2020 · 0 comments · Fixed by #800
Closed

Infix function ** mistaken for a wildcard import #799

binkley opened this issue Jun 26, 2020 · 0 comments · Fixed by #800

Comments

@binkley
Copy link

binkley commented Jun 26, 2020

Expected Behavior

Ktlint does not complain about importing an infix function named ** as being a wildcard import. This infix function acts as a "pseudo-operator" for exponentiation

Observed Behavior

For the import:

import hm.binkley.math.`**`

Ktlint mistakenly complains this is a wildcard import

Steps to Reproduce

See this commit: binkley/kotlin-rational@2c610d6

I am grateful for the comment syntax that Ktlint recognizes, so I could ask it to ignore the import in question

Your Environment

  • Version of ktlint used: 1.5.2 (latest as per Maven Central) Please note: the commit link above was using Ktlint 1.4.2 in the pom.xml. A following commit is using version 1.5.2, and has the same issue. I linked to the earlier commit as it was more clear in the code that Ktlint complained about
  • Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): Maven plugin
  • Version of Gradle used (if applicable): n/a
  • Operating System and version:
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant