File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,38 @@ class MyClass
395
395
-------------------------------
396
396
)
397
397
398
+ $(LISTSECTION phobos_documentation, Documentation,
399
+ $(LI Every public symbol be exposed on the documentation:)
400
+ ---
401
+ /// A public symbol
402
+ enum myFancyConstant;
403
+ ---
404
+ $(LI Every public function should have a Ddoc description and documented
405
+ `Params:` and `Returns:` sections (if applicable):)
406
+ ---
407
+ /**
408
+ Checks whether a number is positive.
409
+ `0` isn't considered as positive number.
410
+
411
+ Params:
412
+ number = number to be checked
413
+
414
+ Returns: `true` if the number is positive, `0` otherwise.
415
+
416
+ See_Also: $(LREF isNegative)
417
+ */
418
+ bool isPositive(int number)
419
+ {
420
+ return number > 0;
421
+ }
422
+ ---
423
+ $(LI Text in sections (e.g. `Params:`, `Returns:`, `See_Also`) should be indented by one level if spans more than the line of the section.)
424
+ $(LI Documentation comments should not use more than two stars `/**` in the header line.)
425
+ $(LI Block comments (`/**`) should be used - not nesting block comments (`/++`))
426
+ $(LI Global functions shouldn't indent their documentation block nor use stars as indentation.)
427
+ $(LI Text example blocks should use three dashes (`---`) only.)
428
+ )
429
+
398
430
$(BR)
399
431
$(P
400
432
We are not necessarily recommending that all code follow these rules.
You can’t perform that action at this time.
0 commit comments