You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace Uncrustify with ClangFormat for C code formatting #562
Feature Request: Replace Uncrustify with ClangFormat for C code formatting
Is your feature request related to a problem? Please describe.
Currently, our repository uses Uncrustify for C code formatting. This creates friction for developers using Language Server Protocol (LSP) tools since ClangFormat has better native integration with modern IDEs and code editors. LSP users cannot easily make formatting changes or see formatting issues in real-time, reducing productivity and code quality.
Describe the solution you'd like
Replace Uncrustify with ClangFormat as our C code formatter. This would involve:
Creating a .clang-format file that matches our current style guidelines
Updating documentation to reflect the change
Additional information
ClangFormat offers several advantages over Uncrustify:
Better LSP Integration: ClangFormat is natively supported by most C/C++ language servers
Wider Adoption: More developers are familiar with ClangFormat configuration
Active Development: ClangFormat is actively maintained as part of the LLVM project
Consistency: Many other C/C++ projects use ClangFormat, making it easier for contributors
We could start with a .clang-format file that closely matches our current style to minimize disruption, while providing better tooling support for all developers. This change would particularly benefit those using VS Code, Vim/Neovim, Emacs, and other editors with LSP support.
Right, I should have reworded that; let's say exactly. Additionally, we can extend this to our yml files and other repos, e.g. pgexporter, if we can successfully attempt in this one.
Activity
jesperpedersen commentedon Apr 2, 2025
Ok, but not "closely"
botirkhaltaev commentedon Apr 2, 2025
Right, I should have reworded that; let's say exactly. Additionally, we can extend this to our yml files and other repos, e.g. pgexporter, if we can successfully attempt in this one.
jesperpedersen commentedon Apr 2, 2025
Yes
[#562] Fix tablespace info
[#562] Fix tablespace info