question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disabling formatting for selected folders

See original GitHub issue

Hi! Following this issue I’m still wondering if there is a way to disable formatting for a given folder. The only way that comes to my mind right now is doing a pre-pass where I’d scan for those folders and pass them as --exclude parameter. This seems unnecessary as I’d simply like to configure that in .editorconfig.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
JoeRobichcommented, Aug 25, 2020

@tomekpaszek A workaround that you can use today is to flag the folders as containing only generated code.

[Unformatted.cs]
generated_code = true
0reactions
JoeRobichcommented, Aug 26, 2020

@tomekpaszek Sorry I thought we got the generated_code support from Roslyn for free. Opened a PR to add support for this setting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to disable prettier formatting for individual files or folders
To disable prettier formatting on a single file, open the .prettierignore file and add the name of your file to the document. To...
Read more >
VSCode: turn off format on save only in specific directory
I'd like to configure VSCode to not auto-format files in a specific directory. Background: I'm writing a library that renders json into html ......
Read more >
Ability to disable code formatting for an entire folder - YouTrack
IDEA-182521 Preventing code reformat for a certain folder when reformatting ... I need to be able to disable reformatting for an entire directory...
Read more >
Ignoring Code
Use .prettierignore to ignore (i.e. not reformat) certain files and folders completely. Use “prettier-ignore” comments to ignore parts of files.
Read more >
How To Disable VS Code 'formatOnSave' For Specific File ...
Step #1 — Open Settings. By pressing Cmd + , on Mac, you will land on Settings GUI page. · Step #2 —...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found