Skip to content

Commit

Permalink
Disable formatter in src/lib/* (#138)
Browse files Browse the repository at this point in the history
Otherwise VS Code reformats the whole file while working on submodules
(if "Format on save" is activated). The submodules aren't prepared for
this yet (no "format all files" commit) and should include their own
definitions anyway, especially since they could be third-party with
different ideas of code style.

The solution was taken from
https://stackoverflow.com/a/57272592/25601664

I also tried creating a `.clang-format-ignore` file with content
`src/lib/*`, but couldn't get it working.
  • Loading branch information
rovo89 authored Jul 31, 2024
1 parent dfe10b2 commit f4be784
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DisableFormat: true
SortIncludes: Never

0 comments on commit f4be784

Please sign in to comment.