tobo fe7dabb9c4 remove unused includes in util/generic/string.h 1 месяц назад
..
charset 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
datetime 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
digest 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
draft 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
folder fe7dabb9c4 remove unused includes in util/generic/string.h 1 месяц назад
generic fe7dabb9c4 remove unused includes in util/generic/string.h 1 месяц назад
memory 51f989c35f [util] Add move assignment operator in TBlob 1 месяц назад
network 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
random 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
stream 69ce19dae9 check lifetime bound of output streams 1 месяц назад
string 35c54372ef StringSplitter: recreate State after copy 1 месяц назад
system 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
tests bf0f13dd39 add ymake export to ydb 1 год назад
thread 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
ut ba80a9fbc7 Intermediate changes 7 месяцев назад
README.md e13b11cc55 Restoring authorship annotation for <miroslav2@yandex-team.ru>. Commit 2 of 2. 2 лет назад
str_stl.cpp d3a398281c Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2. 2 лет назад
str_stl.h 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
ya.make 57386fad95 Revert "rXXXXXX: Enum range to util" 3 месяцев назад
ysafeptr.cpp addb3626ed Restoring authorship annotation for <denplusplus@yandex-team.ru>. Commit 2 of 2. 2 лет назад
ysafeptr.h 9b567afd33 Library import 240819-0942 (#7994) 2 месяцев назад
ysaveload.cpp addb3626ed Restoring authorship annotation for <denplusplus@yandex-team.ru>. Commit 2 of 2. 2 лет назад
ysaveload.h 74184a40c1 FixNamespaceComments in /util 2 месяцев назад
ysaveload_ut.cpp 9b567afd33 Library import 240819-0942 (#7994) 2 месяцев назад

README.md

Coding style

Style guide for the util folder is a stricter version of general style guide (mostly in terms of ambiguity resolution).

  • all {} must be in K&R style
  • &, * tied closer to a type, not to variable
  • always use using not typedef
  • even a single line block must be in braces {}:

    if (A) {
       B();
    }
    
  • _ at the end of private data member of a class - First_, Second_

  • every .h file must be accompanied with corresponding .cpp to avoid a leakage and check that it is self contained

  • prohibited to use printf-like functions

Things declared in the general style guide, which sometimes are missed:

  • template <, not template<
  • noexcept, not throw () nor throw(), not required for destructors
  • indents inside namespace same as inside class

Requirements for a new code (and for corrections in an old code which involves change of behaviour) in util:

  • presence of UNIT-tests
  • presence of comments in Doxygen style
  • accessors without Get prefix (Length(), but not GetLength())

This guide is not a mandatory as there is the general style guide. Nevertheless if it is not followed, then a next ya style . run in the util folder will undeservedly update authors of some lines of code.

Thus before a commit it is recommended to run ya style . in the util folder.

Don't forget to run tests from folder tests: ya make -t tests

Note: tests are designed to run using autocheck/ solution.

Submitting a patch

In order to make a commit, you have to get approval from one of util members.

If no comments have been received withing 1–2 days, it is OK to send a graceful ping into Igni et ferro chat.

Certain exceptions apply. The following trivial changes do not need to be reviewed:

  • docs, comments, typo fixes,
  • renaming of an internal variable to match the styleguide.

Whenever a breaking change happens to accidentally land into trunk, reverting it does not need to be reviewed.

Stale/abandoned review request policy

Sometimes review requests are neither merged nor discarded, and stay in review request queue forever. To limit the incoming review request queue size, util reviewers follow these rules:

  • A review request is considered stale if it is not updated by its author for at least 3 months, or if its author has left Yandex.
  • A stale review request may be marked as discarded by util reviewers.

Review requests discarded as stale may be reopened or resubmitted by any committer willing to push them to completion.

Note: It's an author's duty to push the review request to completion. If util reviewers stop responding to updates, they should be politely pinged via appropriate means of communication.