Maybe someone knows why in the `visit*` functions,...
# detekt
e
Maybe someone knows why in the
visit*
functions, my bindingContext is always
BindingContext.Empty
?
1
s
Maybe you are running without type resolution enabled?
By default, the
bindingContext
is initialized as
BindingContext.EMPTY
. This is the default value that the rule receives if type resolution is not enabled.
e
thanks! I found the reason. I called
detekt
instead of
detektMain
https://detekt.dev/docs/gettingstarted/type-resolution/#enabling-on-a-jvm-project
Copy code
detekt - Runs detekt WITHOUT type resolution
detektMain - Runs detekt with type resolution on the main source set
👍 1