Skip to content

Multiple file formatters corrupts files #25538

Closed as not planned
Closed as not planned

Description

@samskiter

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version:
  • OS Version:

Steps to Reproduce:

  1. use Isort and Black in a python project
  2. save a file that isort will add lines to
  3. file will have duplicated final lines
    See: Multiple Import Organizers results in corrupted code vscode#174295 (comment)

Activity

  1. eleanorjboyd commented on Oct 28, 2025

    @eleanorjboyd
    Member

    Karthik Nadig (@karthiknadig) the tagged issue was filed by you originally - any ideas that could help here?

  2. karthiknadig commented on Oct 28, 2025

    @karthiknadig
    Member

    This really need to be solved upstream. Essentially, one of the tools applies first, VS Code should synchronize the changes to all servers. This does not happen when using an import sorter. So the second tool sees the wrong version of the document.

  3. karthiknadig commented on Oct 28, 2025

    @karthiknadig
    Member

    Sam Duke (@samskiter) a workaround and a faster tool here is Ruff (ruff extension is available in the market place). It supports isort style import sorting and black style of formatting, and several linters in a single tool.

  4. neilferreira commented on Oct 30, 2025

    @neilferreira

    I'm seeing this with black and isort. Any workarounds available?

  5. karthiknadig commented on Oct 30, 2025

    @karthiknadig
    Member
  6. github-actions commented on Nov 29, 2025

    @github-actions

    Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

    Happy Coding!

  7. samskiter commented on Nov 29, 2025

    @samskiter
    Author

    What there was no info requested, pls reopen!

  8. samskiter commented on Nov 29, 2025

    @samskiter
    Author

    Reopen

  9. samskiter commented on Nov 29, 2025

    @samskiter
    Author

    Reopen

  10. karthiknadig commented on Nov 30, 2025

    @karthiknadig
    Member

    Sam Duke (@samskiter) as I mentioned in my comment. This can’t be fixed in extension the issue is microsoft/vscode#174295 . I created that issue when I noticed the problem when I created this extension. I don’t see any change we can do locally to address this. It should be addressed in VS Code.

  11. added
    bugIssue identified by VS Code Team member as probable bug
    and removed
    info-neededIssue requires more information from poster
    on Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions