Skip to content

Exclude file from autoformatting on save #2776

@ivavid

Description

@ivavid

Environment data

Feature request: Mechanism to exclude file from autoformatting on save.

  • VS Code version: 1.28.0-insider (user setup)
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: Windows 10 x64
  • Python version (& distribution if applicable, e.g. Anaconda): PSF 3.6.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): none
  • Relevant/affected Python packages and their versions: n/a

Actual behavior

Formatting always occurs on save.

Expected behavior

Some mechanism to exclude a file from autoformatting on save.

e.g. # "editor.formatOnSave": false at the top of the file to exclude.

Steps to reproduce:

  1. Set "editor.formatOnSave": true
  2. Save file with non-compliant formatting

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

n/a

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

n/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions