3 ms·
I use warnings instead of TODO/FIXME, and found it useful. We tend to gloss over TODO/FIXME, even though editors highlight them. Warnings, however, find their
by Jugurtha 6y ago
I use warnings instead of TODO/FIXME, and found it useful. We tend to gloss over TODO/FIXME, even though editors highlight them.
Warnings, however, find their way to someone every time the code is executed. They're nagging enough that you eventually fix them. You can run the code with strict rules to raise an exception on warnings.
On comments: we've acquired a habit to cross-reference everything. In the code, commit message, issue, Slack. You'll often find a line, and comments around that start with "Rationale" or "Why:" with references to issues, commits, conversations, etc.
- wadkar 6y agoWhat’s the warning equivalent for yaml/config?
- Jugurtha 6y agoFor config files, we add comment lines with references to issues, commits, comments, conversations, etc. Here's how a colleague put their comment in a .json file: "The_whys": [ "https://repomanagement.com/GoodCorpHere/XXXXXXX/issues/XXX#note_XXXX", "https://repomanagement.com/GoodCorpHere/XXXXXXX/issues/XXX#likely-parts-and-draft-fix", "https://repomanagement.com/GoodCorpHere/XXXXXXX/issues/XX#likely-parts-and-draft-fix" ] But you make a good point. It could be done by adding an agreed upon field in TOML/JSON/YAML config files that would contain warnings, but not for now.