We have a problem with our TeamCity build for run daily IDEA inspections.
Problem is with inspection "Unused Declaration" - https://youtrack.jetbrains.com/issue/IDEA-153898
This inspection shows that class unused (not instantiated) even it is marked by annotation org.springframework.stereotype.Component
As one of suggestion for this problem was - share misc.xml in VCS repo
We can't share misc.xml because of https://youtrack.jetbrains.com/issue/IDEA-153947
To fix this problem I tried to add custom build step to TC configuration - recreate misc.xml
echo "<?xml version="1.0" encoding="UTF-8"?>
<entry_points version="2.0" />
<item index="1" class="java.lang.String" itemvalue="org.springframework.stereotype.Component" />
</project>" > .idea/misc.xml
But looks like it doesn't help
1. Can be there any problems with such custom build step with modifying file in .idea folder? I asked because of this - https://youtrack.jetbrains.com/issue/TW-42095
2. Is there any way to make sure that TeamCity IDEA inspection loaded mics.xml?
It's not clear from logs:
[23:19:46]Starting up IntelliJ IDEA (Minerva) IU-143.1945 ...done.
[23:19:47][ 14347] WARN - ution.rmi.RemoteProcessSupport - Picked up _JAVA_OPTIONS: -Djava.security.egd=file:/dev/./urandom -Xmx1G
[23:20:10]Opening project...[WARNING] The POM for org.apache.tomcat.maven:tomcat7-maven-plugin:jar: is missing, no dependency information available
[23:23:23]Initializing project...Loaded profile 'tcCore' from file '/opt/tcAgent5-1/work/6e9a2b0aebf1b853/tcCore.xml'
[23:23:23]Inspecting with profile 'tcCore'
[23:23:30]Analyzing code ... 0%
[23:23:42]Analyzing code ... 1%