KT-39869 Add inspection for FQN usages of kotlin.browser package

- `kotlin.dom` does not need this because it contains only extensions
- Add test for launching whole project fix; mute it because currently it
does not pass
  - The test fails because in tests `RefJavaManager` tries to create
  `RefJavaFileImpl` for .kt files. It will try to use UAST, but it
  does not work for JS files. In production this is disabled, so no
  problems occur
This commit is contained in:
Roman Golyshev
2020-07-04 21:07:30 +03:00
committed by Roman Golyshev
parent 91fa5d38b3
commit 5cf6b860a6
7 changed files with 110 additions and 1 deletions
@@ -0,0 +1,10 @@
// "Fix 'kotlin.browser' package usage" "true"
// JS
package test
fun use(a: Any) {}
fun usage() {
use(kotlin.<caret>browser.localStorage.toString())
}
@@ -0,0 +1,10 @@
// "Fix 'kotlin.browser' package usage" "true"
// JS
package test
fun use(a: Any) {}
fun usage() {
use(kotlinx.browser.localStorage.toString())
}
@@ -0,0 +1,11 @@
// "Fix 'kotlin.dom' and 'kotlin.browser' packages usages in the project" "true"
// JS
package test
import kotlin.<caret>browser.localStorage
import kotlin.dom.addClass
fun usage() {
kotlin.browser.document.toString()
}
@@ -0,0 +1,11 @@
// "Fix 'kotlin.dom' and 'kotlin.browser' packages usages in the project" "true"
// JS
package test
import kotlinx.browser.localStorage
import kotlinx.dom.addClass
fun usage() {
kotlinx.browser.document.toString()
}