Michael Marshall
06/10/2021, 2:29 AM./gradlew detektMain
but I don't see any live errors while coding.chao
06/10/2021, 4:30 AMplugin jars
Michael Marshall
06/10/2021, 5:25 AMPlugin jars
path set up, I can now see highlighting from my custom rule that doesn't require type resolution, but not the one which does require it 🤔Michael Marshall
06/10/2021, 5:57 AMdetekt.yml
# By default detekt does not know about your new properties. Therefore we need to mention them in the configuration
# under config>excludes. (<https://detekt.github.io/detekt/extensions.html>)
config:
validation: true
excludes: "custom-proj-rules.*,custom-proj-rules>.*>.*"
custom-proj-rules:
active: true
InvalidExpressionFunction:
active: true
includes: [ '**/main/**' ]
KotlinObjectJavaSerialization:
active: true
includes: ['**/main/**']
In my detekt.xml
config file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DetektProjectConfiguration">
<enableDetekt>true</enableDetekt>
<enableFormatting>true</enableFormatting>
<treatAsError>true</treatAsError>
<configPaths>$PROJECT_DIR$/config/detekt/detekt.yml</configPaths>
<pluginPaths>$PROJECT_DIR$/detekt-rules/build/libs/detekt-rules.jar</pluginPaths>
</component>
</project>
gammax
06/10/2021, 9:43 AMOn a separate note,That could be a bug. Are you able to reproduce it also with Detekt gradle plugin or is it just happening inside IntelliJ?on a specific custom rule doesn’t seem to be respected. e.g. when I set my config toactive: false
gammax
06/10/2021, 9:44 AMmkrussel
06/10/2021, 1:02 PMgammax
06/10/2021, 1:18 PMmkrussel
06/10/2021, 1:20 PMactive:false
might not have worked.Michael Marshall
06/10/2021, 2:57 PM./gradlew detek
I can reproduce it that way. The IDE plugin seems to be very erratic as to whether it shows the detekt errors. I'm not sure if I need to rebuild or clear cache after each change to detekt.yml
?gammax
06/10/2021, 2:58 PMMichael Marshall
06/10/2021, 2:59 PMincludes: [ '**/main/**' ]
is required, but it doesn't appear to be from my testing. I'm assuming that was changed?gammax
06/11/2021, 1:26 PMAlso I read in an issue thatWhich issue?is required,includes: [ '**/main/**' ]
Michael Marshall
06/14/2021, 11:25 PM