atf icon indicating copy to clipboard operation
atf copied to clipboard

Adopt style(9) using clang-format

Open fel1x-developer opened this issue 1 year ago • 3 comments

I find atk's coding style doesn't follow some conventions, such as having space in <> or putting pointer * or reference symbol & with variable types, not variable names.

FreeBSD's coding style style(9) can be applied here. One main exception in style(9) opposed to the "convention" is that style(9) use 8-space indentation while most projects use 4-space indentation. (2-space indentation is predominant in web dev). We can discuss whether or not to use 8-space indentation if needed.

fel1x-developer avatar Jan 23 '24 19:01 fel1x-developer

Was this pulled from FreeBSD? If so, it might be better to figure out a way to keep this file in sync, somehow, instead of it drifting too far from upstream (freebsd-src).

ngie-eign avatar May 09 '24 01:05 ngie-eign

Was this pulled from FreeBSD? If so, it might be better to figure out a way to keep this file in sync, somehow, instead of it drifting too far from upstream (freebsd-src).

For now, automatically tracking updates in the freebse-src upstream is impossible. We can use post-commit hook as an alternative.

By the way, the .clang-format file is not updated quite often. It had only 2 major changes in the last 3 years, so I think updating manually from the upstream would be fine.

fel1x-developer avatar May 09 '24 02:05 fel1x-developer

Could you please add a comment to the file to note where it came from (FreeBSD; git revision <...>)? Thanks :).

ngie-eign avatar Jun 29 '24 16:06 ngie-eign