Maxim Gorbunov fd0b1ac7c0 Generate CMakeLists (#2184) 8 months ago
..
charset fd0b1ac7c0 Generate CMakeLists (#2184) 8 months ago
datetime ddbdb82c63 Fix typos in util/datetime/base.h. 1 year ago
digest e98bcbc744 Import libs 1 (#590) 11 months ago
draft 96458ea3c7 External build system generator release 65 11 months ago
folder 2db9050e1f Intermediate changes 11 months ago
generic 9b7a061aba Add missed #include <type_traits> 9 months ago
memory e98bcbc744 Import libs 1 (#590) 11 months ago
network 9d0a3761b3 Library import 8 (#1074) 10 months ago
random 335c640261 Y_VERIFY->Y_ABORT_UNLESS at ^u 1 year ago
stream 08ab418821 Support wide strings (and string_views) in Out<> / IOutputStream 9 months ago
string e95f266d2a Library import 6 (#888) 10 months ago
system 5722bbf18a Library update 9 (#1163) 10 months ago
tests bf0f13dd39 add ymake export to ydb 1 year ago
thread e95f266d2a Library import 6 (#888) 10 months ago
ut bf0f13dd39 add ymake export to ydb 1 year ago
CMakeLists.darwin-arm64.txt ffff7a34e4 add darwin-arm64 CMakeLists 1 year ago
CMakeLists.darwin-x86_64.txt 04a19cc6b6 Intermediate changes 1 year ago
CMakeLists.linux-aarch64.txt 04a19cc6b6 Intermediate changes 1 year ago
CMakeLists.linux-x86_64.txt 04a19cc6b6 Intermediate changes 1 year ago
CMakeLists.txt 96458ea3c7 External build system generator release 65 11 months ago
CMakeLists.windows-x86_64.txt fd0b1ac7c0 Generate CMakeLists (#2184) 8 months ago
README.md e13b11cc55 Restoring authorship annotation for <miroslav2@yandex-team.ru>. Commit 2 of 2. 2 years ago
str_stl.cpp d3a398281c Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2. 2 years ago
str_stl.h a67b2a41b1 Fix computation of hashes for string constants 2 years ago
ya.make f573bf9c67 remove NO_SANITIZE_HEADERS macros 1 year ago
ysafeptr.cpp addb3626ed Restoring authorship annotation for <denplusplus@yandex-team.ru>. Commit 2 of 2. 2 years ago
ysafeptr.h df6af3ee47 Require semicolon after saveload macroses 1 year ago
ysaveload.cpp addb3626ed Restoring authorship annotation for <denplusplus@yandex-team.ru>. Commit 2 of 2. 2 years ago
ysaveload.h 74b9f490cb Allow to handle Y_SAVELOAD_DEFINE() without args 1 year ago
ysaveload_ut.cpp 74b9f490cb Allow to handle Y_SAVELOAD_DEFINE() without args 1 year ago

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.