Unable to run inspection profile task

Hello.

I'm trying to configurre IDEA inspection for our project on TeamCity.

But on run I get fail in the logs

[02:00:23] :     [Step 1/1] in directory: /opt/tcagent22/work/1991c203550d2d8a
[02:00:23]W:     [Step 1/1] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=150m; support was removed in 8.0
[02:00:29] :     [Step 1/1] Starting up IntelliJ IDEA 14.1.4 ...done.
[02:01:10] :     [Step 1/1] Opening project...done.
[02:01:10]W:     [Step 1/1] Failed to load profile from '/opt/tcagent22/work/1991c203550d2d8a/.idea/inspectionProfiles/tcCore.xml'
[02:01:11] :     [Step 1/1] Initializing project...
[02:01:11]W:     [Step 1/1] Process exited with code 1
[02:01:11]W:     [Step 1/1] Inspection output
[02:01:11]W:         [Inspection output] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=150m; support was removed in 8.0
[02:01:11]W:         [Inspection output] Starting up IntelliJ IDEA 14.1.4 ...done.
[02:01:11]W:         [Inspection output] Opening project...done.
[02:01:11]W:         [Inspection output] Failed to load profile from '/opt/tcagent22/work/1991c203550d2d8a/.idea/inspectionProfiles/tcCore.xml'
[02:01:11]W:         [Inspection output] Initializing project...


What's mean "Failed to load"? Agent was unable to find this file?

5 comments
Comment actions Permalink

Hi Andrey,

What TeamCity version do you use? What type of project do you run inspections for?

0
Comment actions Permalink

TeamCity Enterprise 9.1.1 (build 37059)
It's maven multimodule project



Step 1:           Inspection

Runner type: Inspections (IntelliJ IDEA) (Runner for gathering IntelliJ IDEA inspection results)
Execute: If all previous steps finished successfully
Working directory:   same as checkout directory
Path to the project: pom.xml
Path variables:
MAVEN_REPOSITORY:

Project SDKs:
1.7 Home: %env.JDK_17%
SDK Files Patterns: jre/lib/*.jar

Global libraries: none defined
Inspections profile path: .idea/inspectionProfiles/tcCore.xml
Inspections profile name: tcCore
Include / exclude patterns: not specified
JVM command line parameters: -Xmx512m -XX:MaxPermSize=150m
0
Comment actions Permalink

The error message "Failed to load profile" means that the file could not be found. Please check that file /opt/tcagent22/work/1991c203550d2d8a/.idea/inspectionProfiles/tcCore.xml exists. 
Please attach this .xml file. What is the result is you do not specify "Inspections profile path", and only use "Inspections profile name"?

0
Comment actions Permalink

I have added additional build step with checking directory content

#!/bin/bash
echo "Checking inspectionProfiles"
ls -lo .idea/inspectionProfiles/

[12:25:19][Step 1/2] Checking inspectionProfiles

[12:25:19][Step 1/2] total 20

[12:25:19][Step 1/2] -rw-rw-r-- 1 dxcity 14714 Sep 25 12:25 tcCore.xml

[12:25:19][Step 1/2] -rw-rw-r-- 1 dxcity   203 Sep 25 12:25 Project_Default.xml



Looks like inspection profile file exists.



Attachment(s):
tcCore.xml
0
Comment actions Permalink

Hi Andrey,

Sorry for delay. I was able to reproduce the issue. It seems that .idea directory is cleaned up when the Inspections step starts.
Please watch/vote for the issue: https://youtrack.jetbrains.com/issue/TW-42095.
As current warkaround you can create additional pre-build step and copy inspections profile to another location. For more details see the comment.
Sorry for the inconvenience.

0

Please sign in to leave a comment.