Command Line Inspection Does't Returm Xml Reports or all highlighted inspections

0
4 comments
Avatar
Permanently deleted user

Details:

I want to launch inspections xml reports from command line without using the GUI interface.

I run this command:

exec ~/pycharm-community-2019.3.1/bin/pycharm.sh inspect $PATH_TO_PROJECT $PATH_TO_PROJECT/.idea/inspectionProfiles/My_Default.xml $PATH_TO_PROJECT/.idea/inspection-results-dir -v0

As result I received a list of  xml files but some of  "enabled=true" inspections in the inspection profile are missing, and those inspection are really important for me.

For example: PyPep8Inspection, PyUnresolvedReference

I hope someone could help me to understand the reason for this behavior and  find a solution.

 

0

Hi,

Do you get the missing inspections when you run the inspection (with the same profile) from IDE ? 

> As result I received a list of  xml files but some of  "enabled=true" inspections in the inspection profile are missing

Not all inspections needs to be enabled. For example PyUnresolvedReference is enabled by default and you don't need to enable it explicitly in the XML config. Did you modify any XML by hand?

I just tried this feature and it works correctly for me. If you think there is an issue, I'd suggest reporting to https://youtrack.jetbrains.com/issues and providing a minimal project example which can be used to reproduce the issue.

0
Avatar
Permanently deleted user

Thanks for your reply.

As you wrote, the PyUnresolvedReference is not in the XML file, I meant that it is enabled in the inspection profile .

You can see all the relevant information in : https://stackoverflow.com/questions/59702061/command-line-inspection-doest-returm-xml-reports-for-all-highlighted-inspection 

And yes, If I run the same inspection profile from IDE & export the files manually I get all the files that I expected to get.

This is the reason that I am so confused... Because in manual running I see the profile is ok so why in command line running the output is not as expected?

0

Thank you,

As a matter of fact, we've successfully reproduced the issue https://youtrack.jetbrains.com/issue/PY-40114 , so please follow the ticket for updates.

0

Please sign in to leave a comment.