Why does IntelliJ keep reformatting files I don't even have open?

Answered

OK, this is driving me batty.  I've used IntelliJ for almost 2 decades and I've never seen this issue before, but, using 2022.2 Ultimate Edition (Build #IU-222.3345.118), IntelliJ keeps reformatting whitespace seemingly randomly in files I don't even have open in the editor.  All of a sudden, files just pop up in the default changelist with whitespace changes.  I roll them back and they may or may not pop up again a few minutes later.  It is infuriating, and no amount of googling seems to suggest that it is happening to anyone else.  What on earth could be causing this?

0
9 comments

Disable Settings (Preferences on macOS) | Editor | Code Style | Enable EditorConfig support.

Disable any Save Actions that reformat files at Settings (Preferences on macOS) | Tools | Actions on Save.

If the issue persists, report a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA with the logs attached via Help | Collect Logs and Diagnostic Data.

0

Hey, this started happening to me too, did you ever get to the bottom of this? For me it's specifically .ipynb files, I disabled EditorConfig and don't have any Actions on Save enabled, and restarted the IDE and it's still happening!

0

Mina Asham Please report with the logs as described in my previous comment. A sample project to reproduce would be great too.

0

Happy to start a full report, but I don't think I can share full logs without requesting that from company first, but this is a small sample of what I see in the logs:

2023-02-14 16:57:14,526 [  72341]   INFO - #git4idea.commands.GitHandler - [PROJECT_NAME] git -c core.quotepath=false -c log.showSignature=false checkout HEAD -- MY_FILE.ipynb
2023-02-14 16:57:14,565 [ 72380] WARN - #o.j.p.n.j.n.JupyterNotebookSchema - No explicit schema definition for notebook version 4.5
2023-02-14 16:57:15,724 [ 73539] INFO - #c.i.u.i.FileBasedIndexProjectHandler - Reindexing refreshed files of PROJECT_NAME : 0 to update, calculated in 3ms

It seems like something is checking and formatting all Jupyter notebooks?

0

This doesn't show anything useful. But you may have Git pre-commit hooks used in your organization that will force certain formatting style that is different from your IDE. If the issue occurs after VCS operations, it's likely not IDE-related problem. If the issue occurs on just saving the file in the IDE, we'll need the logs / reproducible test case to investigate it.

0

I just started to see this issue as well. It's changing `\u001b` to `\u001B` in files I don't even have open

1

Thanks for the information. Looks like indeed a bug specific to ipynb support.

1

Please sign in to leave a comment.