On Thu, Dec 12, 2024 at 03:35:33PM +0100, Christian Schulte wrote:
> On 12/12/24 12:13, Kirill A. Korinsky wrote:
> > On Thu, 12 Dec 2024 11:54:29 +0100,
> > Christian Schulte <c...@schulte.it> wrote:
> >>
> >> is there something specific for OpenBSD like style(9) but for semantics?
> >> I understand that style(9) is all about syntax. As a long term Java
> >> developer having lost all interest in Java, I am searching for something
> >> like PMD, Checkstyle etc. for C and rules OpenBSD developers tend to
> >> adhere to. Recently read some C comments like
> >>
> > 
> > Probably you're looking for clang-format which can be installed as part of
> > devel/clang-tools-extra.
> > 
> 
> I am not asking about syntax. I am asking about semantics. Documentation
> about best practices used in the OpenBSD source tree I am certain exist
> but I am failing to find any documentation about.

The documentation is in /usr/src. Read code and try to follow in its
footsteps. After spending some time reading you will soon realize what is
good code and what is horrible.

Some parts of the tree are fairly well structured and follow good
practices other parts not so much.

-- 
:wq Claudio

Reply via email to