[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Following up on file-position locking

Following up on file-position locking

Posted Aug 27, 2023 12:07 UTC (Sun) by NAR (subscriber, #1313)
In reply to: Following up on file-position locking by tialaramex
Parent article: Following up on file-position locking

Even documentation right next to the code can go stale. At work I've seen it on more occasions than I can count that e.g. new flags or even new function parameters were not added to the documentation. The best effort I've seen to fix these kind of errors is the Elixir DocTest, where the examples in the documentation are actually executed by the unit test framework, so for example if a new function parameter is added (without a default value), the unit test(!) will catch if the documentation was not upgraded. It's far from 100% and there are code where unit testing is complicated, but it's still useful.


to post comments

Following up on file-position locking

Posted Aug 29, 2023 13:15 UTC (Tue) by timon (subscriber, #152974) [Link]

The Rust toolchain does run code examples in documentation comments.

Following up on file-position locking

Posted Aug 31, 2023 5:49 UTC (Thu) by jezuch (subscriber, #52988) [Link]

Even Java is getting code snippets in javadoc: https://openjdk.org/jeps/413


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds