Inconsistent Behavior of `inspect` Command on Linux and Windows
Hi IntelliJ Community,
I'm encountering an issue with the `inspect` command that behaves inconsistently between Linux and Windows environments. Here’s a detailed description of the problem:
Issue Description:
I am using the `inspect` command as part of my automated workflow to analyze code changes. My workflow involves applying a large Git patch, running the `inspect` command, and then reviewing the changes. However, the outcome differs significantly between Linux and Windows.
Steps to Reproduce:
-
Apply a large Git patch:
git apply --reject --whitespace=fix patchFile.patch -
Run `inspect` command:
./inspect.sh /path/to/project /path/to/inspectionProfile /path/to/reportsFolder -changes -format json -
Check Git status:
git diff --staged --shortstat
Observed Behavior:
Windows:
- The `inspect` command runs and the staged changes remain consistent.
- Git status shows all expected changes as staged.
- Around 50 JSON files are generated.
Linux:
- The `inspect` command runs but the staged changes become inconsistent.
- Git status shows fewer files staged and some files left untracked or modified but not staged.
- Around 6 JSON files are generated.
Environment Details:
Windows:
OS: Windows 10
IntelliJ IDEA Version: ideaIC-2024.1.1
Git Version: 2.44.0
Linux:
OS: Linux
IntelliJ IDEA Version: idea-IC-241.15989.150
Git Version: 2.43.0
What I Have Tried:
- Ensuring consistent Git configurations: Set `core.filemode` to `false` on Linux to match Windows.
- Checking file permissions: Ensured that file permissions are consistent and appropriate.
- Manual verification: Manually verified that the patch applies correctly and all changes are staged before running `inspect`.
Despite these efforts, the inconsistency persists. I'm seeking advice on what might be causing this behavior and how to achieve consistent results across both environments.
Questions:
- Is there any known issue with the `inspect` command on Linux that could cause such behavior?
- Are there any specific configurations or environment setups that need to be considered for consistent behavior?
- Has anyone else encountered a similar issue and found a workaround or solution?
Any insights or suggestions would be greatly appreciated. Thank you in advance for your help!
Please sign in to leave a comment.
I had submitted a request for this issue but suddenly it got deleted so posting it here again.
Dino Letic May I know why the request is deleted?
Pasting our last conversation below:
>>>
Dino Letic (IntelliJ)
May 22, 2024, 12:55 GMT+2
Can you show git status output before and after running the inspection?
What happens with the changes after inspection?
Best Regards
Dino Letic
JetBrains Support
>>> Reply from me:
Before Inspection - Linux:
After Inspection - Linux:
Before Inspection - Windows:
After Inspection - Windows:
Hi,
The ticket was not deleted but has been re-directed to Intelij support department.
It should be visible for you still, how are you trying to access it?
I am trying to access by visiting my profile section then go to my requests. Earlier I could see the request but now it shows no requests.
I see you have continued the communication in the mentioned ticket:
https://intellij-support.jetbrains.com/hc/en-us/requests/6439436