mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-15 19:50:40 +01:00
- add .editorconfig for indent, whitespace, and file-type rules - add project-local .vimrc to enforce Vim settings via exrc - add .clang-format for C/C++ style presets and list formatting - add devtools/format-code.sh to run clang-format and fixups - adjust clang-format config for stable, idempotent output - update AGENTS.md with new formatting strategy - add .git-blame-ignore-revs entry for format change commit This commit sets up an automated formatting pipeline to let contributors use their editor of choice while ensuring consistent, stable code style across the project.
29 lines
936 B
VimL
29 lines
936 B
VimL
" ====================================================================
|
||
" Project‑local Vim settings for rsyslog
|
||
" (drop this file as .vimrc or .exrc in the project root)
|
||
" ====================================================================
|
||
|
||
" Use spaces, no tabs
|
||
setlocal expandtab
|
||
setlocal shiftwidth=4
|
||
setlocal softtabstop=4
|
||
setlocal tabstop=4
|
||
|
||
" Trim trailing whitespace on save
|
||
autocmd BufWritePre * :%s/\s\+$//e
|
||
|
||
" File‑type specific overrides:
|
||
|
||
" Makefiles always use actual tabs
|
||
autocmd FileType make setlocal noexpandtab
|
||
|
||
" Shell and autoconf scripts: 2‑space indent
|
||
autocmd FileType sh,autoconf setlocal expandtab shiftwidth=2 softtabstop=2 tabstop=2
|
||
|
||
" YAML/CI files: 2‑space indent
|
||
autocmd FileType yaml setlocal expandtab shiftwidth=2 softtabstop=2 tabstop=2
|
||
|
||
" Python: 4‑space indent (already default above, but explicit here)
|
||
autocmd FileType python setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=4
|
||
|