Re: README.md files per directory

Alexander Leidinger <[email protected]>
Newsgroups gmane.os.freebsd.devel.hackers
Organization No organization, this is a private message.
Message-ID <[email protected]>
Am 2026-04-17 19:03, schrieb Adrian Chadd:
> On Fri, 17 Apr 2026 at 01:44, David Chisnall <[email protected]> 
> wrote:
>> 
>> On 16 Apr 2026, at 19:48, Adrian Chadd <[email protected]> wrote:
>> >
>> > On Thu, 16 Apr 2026 at 11:34, Farhan Khan <[email protected]> wrote:
>> >>
>> >> Any thoughts on having README.md files in each directory? It would describe what the code was for, the maintainer, things that might help a would-be developer, status, TODOs, etc.
>> >>
>> >> There's some code I recently found that I had no idea what it was until I asked AI. It might also be useful in public code displayers, such as Github, Gitea, etc.
>> >
>> > Honestly I've wondered about potentially putting README.md files in
>> > places to basically be a "Design Doc" summary of the subsystem
>> > (notably net80211, but also describing ifnet and desired locking
>> > examples, how the USB stack functions, etc.)
>> >
>> > I don't think we have any guidelines about it yet.
>> 
>> It’s a good first step, but a lot of directories (particularly in the 
>> kernel) have a lot of files and a *very* scarce on comments.  I would 
>> love to have a policy that each file should start with a top-level 
>> comment explaining what the file is for and what the key abstractions 
>> are.  If you don’t already see the need for this: Pick a random file 
>> in the FreeBSD repository that you’ve never looked at before and see 
>> how long it takes you to figure out what it is for and why.
> 
> Yup, exactly.
> 
> I'll go noodle on this a bit and then go propose something to core /
> src and see what they think.

We have /usr/src/tools/kerneldoc/subsys which generates HTML or latex 
based docs for the kernel. Some parts of the kernel have already src 
comments in doxygen style which are used for this (e.g. 
https://www.leidinger.net/FreeBSD/dox/kern/html/d7/d56/group__DEVICE.html). 
Large parts of the kernel would benefit from adding more.

For "uncommented" src this gives an overview of what is available in the 
files. You can see that at https://www.leidinger.net/FreeBSD/dox/

Bye,
Alexander.

-- 
http://www.Leidinger.net [email protected]: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    [email protected]  : PGP 0x8F31830F9F2772BF
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmnieAUACgkQEg2wmwP4
2IZ9dxAAg7DXMMiF9B/HdKKGQ+mHknfL/64EyE5jM6wEaUKW+XBzlWG26UzLecPG
qlnvBDWKKjpc+AzrUpApa51w4CUA7xglIvix4IopUAazwILQ5g9nE2tvKweq4fwT
EMncoZZ3lbVXE5ZeqR68GX0INv+T2NORC6SY5t2cPy/9SSp+ECnCdSLXhUzdOFw/
sSCdNlGWZwnHOVsN9iizTpaDRZ+LqKsK7GSbpp2r9YWoIssZg8bCC40yUAOlGZN2
G64ArGC9kC2GbDsV9+jf1BYAD5bnrWQp+ZQWbBXlqLold7hZ3MrRWi1xQo81hSxf
ywk1w1E7I3vEbBuJTrZq8I7YVVau5Owqm1G9/AF547aGVSRq1kI5jtXNNQaknpWz
MZs1SpzmY6jU2pJCI4pgP5YDra+b4NNOiOcA8TnTDBFNJOXzuBcayXzI8W8Joeef
0fu10Z6ng0hj/dE5jm8wwpoH41eFvLHV8ieCxiksxlsUlZshf+2n9X4URP0bh+Mv
XiW3+6UCkYNskk0+mr4jYo6Pq2fzyr4HLuz0W3LrZVpogKlZaiZnEv8yZKtRz3/R
L3zNeEQETEk65kFzqLJD4dPuLGrz5FLW9EFp/3qr7cjlphQQT5NddDZigI+bFSBd
cDgRnEIOJ426uPMlKFd3jDUwQ/tc0zFtYj7Kpofjl+V5BDm+864=
=axQv
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.