aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiroslav2 <miroslav2@yandex-team.ru>2022-02-10 16:50:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:53 +0300
commit896ea04259c43c3c46da4b065d4cda47938393b9 (patch)
tree7d002af0b095494c155fc6a0319c619cb80753aa
parentd6e236f5b91635a49d8cf1211f5d9631f24acd1b (diff)
downloadydb-896ea04259c43c3c46da4b065d4cda47938393b9.tar.gz
Restoring authorship annotation for <miroslav2@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--build/platform/test_tool/a.yaml2
-rw-r--r--build/rules/jstyle/migrations.yaml2
-rw-r--r--build/scripts/c_templates/svn_interface.c16
-rw-r--r--build/scripts/c_templates/svnversion.h2
-rw-r--r--build/scripts/gen_tasklet_reg.py6
-rw-r--r--build/ymake.core.conf22
-rw-r--r--library/cpp/getopt/print.cpp14
-rw-r--r--library/cpp/getopt/small/last_getopt_handlers.h2
-rw-r--r--library/cpp/getopt/small/last_getopt_opts.cpp16
-rw-r--r--library/cpp/getopt/small/modchooser.cpp90
-rw-r--r--library/cpp/getopt/small/modchooser.h26
-rw-r--r--util/README.md8
-rw-r--r--util/datetime/parser.h2
-rw-r--r--util/datetime/parser_ut.cpp2
14 files changed, 105 insertions, 105 deletions
diff --git a/build/platform/test_tool/a.yaml b/build/platform/test_tool/a.yaml
index 298148e450..376ec0a6d5 100644
--- a/build/platform/test_tool/a.yaml
+++ b/build/platform/test_tool/a.yaml
@@ -1,4 +1,4 @@
-service: devtools
+service: devtools
title: test_tool acceptance
ci:
release-title-source: flow
diff --git a/build/rules/jstyle/migrations.yaml b/build/rules/jstyle/migrations.yaml
index 5a159eaa75..d131bae8b6 100644
--- a/build/rules/jstyle/migrations.yaml
+++ b/build/rules/jstyle/migrations.yaml
@@ -8,4 +8,4 @@ jstyle:
- 'ParameterNumber'
prefixes:
- 'tracker'
- - 'ci'
+ - 'ci'
diff --git a/build/scripts/c_templates/svn_interface.c b/build/scripts/c_templates/svn_interface.c
index d8bdd1a70d..52d2a4ad82 100644
--- a/build/scripts/c_templates/svn_interface.c
+++ b/build/scripts/c_templates/svn_interface.c
@@ -110,14 +110,14 @@ const char* GetProgramScmData() {
#endif
}
-const char* GetProgramShortVersionData() {
-#if defined(SVN_REVISION) && defined(SVN_TIME)
- return STR2(SVN_REVISION) " (" SVN_TIME ")";
-#else
- return GetProgramHash();
-#endif
-}
-
+const char* GetProgramShortVersionData() {
+#if defined(SVN_REVISION) && defined(SVN_TIME)
+ return STR2(SVN_REVISION) " (" SVN_TIME ")";
+#else
+ return GetProgramHash();
+#endif
+}
+
const char* GetProgramBuildUser() {
#if defined(BUILD_USER)
return BUILD_USER;
diff --git a/build/scripts/c_templates/svnversion.h b/build/scripts/c_templates/svnversion.h
index 7aece931aa..dc5a6eb3a2 100644
--- a/build/scripts/c_templates/svnversion.h
+++ b/build/scripts/c_templates/svnversion.h
@@ -28,7 +28,7 @@ void PrintSvnVersionAndExit(int argc, char* argv[]) Y_HIDDEN;
void PrintSvnVersionAndExitEx(int argc, char* argv[], const char* opts) Y_HIDDEN;
void PrintSvnVersionAndExit0() Y_HIDDEN;
const char* GetProgramScmData() Y_HIDDEN; // verbose multiline message
-const char* GetProgramShortVersionData() Y_HIDDEN;
+const char* GetProgramShortVersionData() Y_HIDDEN;
const char* GetProgramBuildUser() Y_HIDDEN;
const char* GetProgramBuildHost() Y_HIDDEN;
const char* GetProgramBuildDate() Y_HIDDEN;
diff --git a/build/scripts/gen_tasklet_reg.py b/build/scripts/gen_tasklet_reg.py
index 5b747c2eca..29c47db356 100644
--- a/build/scripts/gen_tasklet_reg.py
+++ b/build/scripts/gen_tasklet_reg.py
@@ -16,7 +16,7 @@ WRAPPER = {
'js': 'TJsWrapper("{impl}")',
'go': 'TGoWrapper("{impl}")',
'py': 'TPythonWrapper("{impl}")',
- 'java': 'TJavaWrapper("{impl}", "{py_wrapper}")',
+ 'java': 'TJavaWrapper("{impl}", "{py_wrapper}")',
}
@@ -26,7 +26,7 @@ def parse_args():
parser.add_argument('output')
parser.add_argument('-l', '--lang', choices=WRAPPER, required=True)
parser.add_argument('-i', '--impl', required=True)
- parser.add_argument('-w', '--wrapper', required=False)
+ parser.add_argument('-w', '--wrapper', required=False)
parser.add_argument('includes', nargs='*')
return parser.parse_args()
@@ -44,7 +44,7 @@ if __name__ == '__main__':
includes=includes,
language=args.lang,
name=args.name,
- wrapper=WRAPPER[args.lang].format(impl=args.impl, py_wrapper=args.wrapper),
+ wrapper=WRAPPER[args.lang].format(impl=args.impl, py_wrapper=args.wrapper),
)
with open(args.output, 'w') as f:
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 081833998b..bdb1aeac2d 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -7388,9 +7388,9 @@ macro TASKLET() {
# Python
PY_PROTO_PLUGIN2(tasklet_py _tasklet.py _sbtask.py tasklet/gen/python DEPS tasklet/domain/sandbox tasklet/runtime sandbox/sdk2)
-
- #Java
- JAVA_PROTO_PLUGIN(tasket_java tasklet/gen/java DEPS tasklet/runtime/java/lib $JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF)
+
+ #Java
+ JAVA_PROTO_PLUGIN(tasket_java tasklet/gen/java DEPS tasklet/runtime/java/lib $JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF)
}
TASKLET_REG_INCLUDES= \
@@ -7413,15 +7413,15 @@ macro TASKLET_REG(Name, Lang, Impl, Includes...) {
SRCS(GLOBAL $Name.task.cpp)
}
-# TEMPORARY METHOD FOR EXTENDED REGISTRY SETUP
-# NOT COMPLETE
-macro TASKLET_REG_EXT(Name, Lang, Impl, Wrapper, Includes...) {
- PEERDIR(tasklet/domain sandbox/bin sandbox/taskbox/worker)
-
+# TEMPORARY METHOD FOR EXTENDED REGISTRY SETUP
+# NOT COMPLETE
+macro TASKLET_REG_EXT(Name, Lang, Impl, Wrapper, Includes...) {
+ PEERDIR(tasklet/domain sandbox/bin sandbox/taskbox/worker)
+
.CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_tasklet_reg.py"} $Name -l $Lang -i $Impl -w $Wrapper ${output;noauto:Name.task.cpp} $Includes ${output_include;hide:Includes} $TASKLET_REG_INCLUDES ${kv;hide:"p TT"} ${kv;hide:"pc yellow"}
- SRCS(GLOBAL $Name.task.cpp)
-}
-
+ SRCS(GLOBAL $Name.task.cpp)
+}
+
# tag:cpp-specific
_CPP_PROTO_MODULE_PREFIX=
_CPP_PROTO_MODULE_SUFFIX=
diff --git a/library/cpp/getopt/print.cpp b/library/cpp/getopt/print.cpp
index 8cf1c62e4d..04b800863f 100644
--- a/library/cpp/getopt/print.cpp
+++ b/library/cpp/getopt/print.cpp
@@ -22,18 +22,18 @@ namespace NLastGetoptPrivate {
return ts;
}
- TString InitShortVersionString() {
- TString ts = GetProgramShortVersionData();
- return ts;
- }
-
+ TString InitShortVersionString() {
+ TString ts = GetProgramShortVersionData();
+ return ts;
+ }
+
TString& VersionString();
- TString& ShortVersionString();
+ TString& ShortVersionString();
struct TInit {
TInit() {
VersionString() = InitVersionString();
- ShortVersionString() = InitShortVersionString();
+ ShortVersionString() = InitShortVersionString();
}
} Init;
diff --git a/library/cpp/getopt/small/last_getopt_handlers.h b/library/cpp/getopt/small/last_getopt_handlers.h
index d35456ef34..e4216d45f1 100644
--- a/library/cpp/getopt/small/last_getopt_handlers.h
+++ b/library/cpp/getopt/small/last_getopt_handlers.h
@@ -20,5 +20,5 @@ namespace NLastGetopt {
[[noreturn]] void PrintUsageAndExit(const TOptsParser* parser);
[[noreturn]] void PrintVersionAndExit(const TOptsParser* parser);
- [[noreturn]] void PrintShortVersionAndExit(const TString& appName);
+ [[noreturn]] void PrintShortVersionAndExit(const TString& appName);
}
diff --git a/library/cpp/getopt/small/last_getopt_opts.cpp b/library/cpp/getopt/small/last_getopt_opts.cpp
index 03c432849f..2f4022ccff 100644
--- a/library/cpp/getopt/small/last_getopt_opts.cpp
+++ b/library/cpp/getopt/small/last_getopt_opts.cpp
@@ -15,10 +15,10 @@ namespace NLastGetoptPrivate {
static TString data;
return data;
}
- TString& ShortVersionString() {
- static TString data;
- return data;
- }
+ TString& ShortVersionString() {
+ static TString data;
+ return data;
+ }
}
namespace NLastGetopt {
@@ -29,11 +29,11 @@ namespace NLastGetopt {
exit(NLastGetoptPrivate::VersionString().empty());
}
- void PrintShortVersionAndExit(const TString& appName) {
+ void PrintShortVersionAndExit(const TString& appName) {
Cout << appName << " version " << (NLastGetoptPrivate::ShortVersionString() ? NLastGetoptPrivate::ShortVersionString() : "not linked with library/cpp/getopt") << Endl;
- exit(NLastGetoptPrivate::ShortVersionString().empty());
- }
-
+ exit(NLastGetoptPrivate::ShortVersionString().empty());
+ }
+
// Like TString::Quote(), but does not quote digits-only string
static TString QuoteForHelp(const TString& str) {
if (str.empty())
diff --git a/library/cpp/getopt/small/modchooser.cpp b/library/cpp/getopt/small/modchooser.cpp
index 2fa5cfd070..b67ff333da 100644
--- a/library/cpp/getopt/small/modchooser.cpp
+++ b/library/cpp/getopt/small/modchooser.cpp
@@ -64,7 +64,7 @@ TModChooser::TMode::TMode(const TString& name, TMainClass* main, const TString&
: Name(name)
, Main(main)
, Description(descr)
- , Hidden(hidden)
+ , Hidden(hidden)
, NoCompletion(noCompletion)
{
}
@@ -74,7 +74,7 @@ TModChooser::TModChooser()
, VersionHandler(nullptr)
, ShowSeparated(true)
, SvnRevisionOptionDisabled(false)
- , PrintShortCommandInUsage(false)
+ , PrintShortCommandInUsage(false)
{
}
@@ -115,10 +115,10 @@ void TModChooser::AddGroupModeDescription(const TString& description, bool hidde
UnsortedModes.push_back(MakeHolder<TMode>(TString(), nullptr, description.data(), hidden, noCompletion));
}
-void TModChooser::SetDefaultMode(const TString& mode) {
- DefaultMode = mode;
-}
-
+void TModChooser::SetDefaultMode(const TString& mode) {
+ DefaultMode = mode;
+}
+
void TModChooser::AddAlias(const TString& alias, const TString& mode) {
if (!Modes.FindPtr(mode)) {
ythrow yexception() << "TMode '" << mode << "' not found in TModChooser.";
@@ -148,10 +148,10 @@ void TModChooser::SetSeparationString(const TString& str) {
SeparationString = str;
}
-void TModChooser::SetPrintShortCommandInUsage(bool printShortCommandInUsage = false) {
- PrintShortCommandInUsage = printShortCommandInUsage;
-}
-
+void TModChooser::SetPrintShortCommandInUsage(bool printShortCommandInUsage = false) {
+ PrintShortCommandInUsage = printShortCommandInUsage;
+}
+
void TModChooser::DisableSvnRevisionOption() {
SvnRevisionOptionDisabled = true;
}
@@ -166,18 +166,18 @@ void TModChooser::AddCompletions(TString progName, const TString& name, bool hid
int TModChooser::Run(const int argc, const char** argv) const {
Y_ENSURE(argc, "Can't run TModChooser with empty list of arguments.");
- bool shiftArgs = true;
- TString modeName;
+ bool shiftArgs = true;
+ TString modeName;
if (argc == 1) {
- if (DefaultMode.empty()) {
- PrintHelp(argv[0]);
- return 0;
- } else {
- modeName = DefaultMode;
- shiftArgs = false;
- }
- } else {
- modeName = argv[1];
+ if (DefaultMode.empty()) {
+ PrintHelp(argv[0]);
+ return 0;
+ } else {
+ modeName = DefaultMode;
+ shiftArgs = false;
+ }
+ } else {
+ modeName = argv[1];
}
if (modeName == "-h" || modeName == "--help" || modeName == "-?") {
@@ -192,39 +192,39 @@ int TModChooser::Run(const int argc, const char** argv) const {
NLastGetopt::PrintVersionAndExit(nullptr);
}
- auto modeIter = Modes.find(modeName);
- if (modeIter == Modes.end() && !DefaultMode.empty()) {
- modeIter = Modes.find(DefaultMode);
- shiftArgs = false;
- }
-
+ auto modeIter = Modes.find(modeName);
+ if (modeIter == Modes.end() && !DefaultMode.empty()) {
+ modeIter = Modes.find(DefaultMode);
+ shiftArgs = false;
+ }
+
if (modeIter == Modes.end()) {
Cerr << "Unknown mode " << modeName.Quote() << "." << Endl;
PrintHelp(argv[0]);
return 1;
}
- if (shiftArgs) {
+ if (shiftArgs) {
TString firstArg;
TVector<const char*> nargv(Reserve(argc));
- if (PrintShortCommandInUsage) {
+ if (PrintShortCommandInUsage) {
firstArg = modeIter->second->Name;
- } else {
+ } else {
firstArg = argv[0] + TString(" ") + modeIter->second->Name;
- }
+ }
nargv.push_back(firstArg.data());
for (int i = 2; i < argc; ++i) {
- nargv.push_back(argv[i]);
- }
+ nargv.push_back(argv[i]);
+ }
// According to the standard, "argv[argc] shall be a null pointer" (5.1.2.2.1).
// http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1336
nargv.push_back(nullptr);
return (*modeIter->second->Main)(nargv.size() - 1, nargv.data());
- } else {
+ } else {
return (*modeIter->second->Main)(argc, argv);
}
}
@@ -291,22 +291,22 @@ void TModChooser::PrintHelp(const TString& progName) const {
if (ShowSeparated) {
for (const auto& unsortedMode : UnsortedModes)
- if (!unsortedMode->Hidden) {
- if (unsortedMode->Name.size()) {
- Cerr << " " << unsortedMode->FormatFullName(maxModeLen + 4) << unsortedMode->Description << Endl;
- } else {
- Cerr << SeparationString << Endl;
- Cerr << unsortedMode->Description << Endl;
- }
+ if (!unsortedMode->Hidden) {
+ if (unsortedMode->Name.size()) {
+ Cerr << " " << unsortedMode->FormatFullName(maxModeLen + 4) << unsortedMode->Description << Endl;
+ } else {
+ Cerr << SeparationString << Endl;
+ Cerr << unsortedMode->Description << Endl;
+ }
}
} else {
for (const auto& mode : Modes) {
if (mode.first != mode.second->Name)
continue; // this is an alias
-
- if (!mode.second->Hidden) {
- Cerr << " " << mode.second->FormatFullName(maxModeLen + 4) << mode.second->Description << Endl;
- }
+
+ if (!mode.second->Hidden) {
+ Cerr << " " << mode.second->FormatFullName(maxModeLen + 4) << mode.second->Description << Endl;
+ }
}
}
diff --git a/library/cpp/getopt/small/modchooser.h b/library/cpp/getopt/small/modchooser.h
index 0a8de6d50b..59c3e841c1 100644
--- a/library/cpp/getopt/small/modchooser.h
+++ b/library/cpp/getopt/small/modchooser.h
@@ -54,12 +54,12 @@ public:
void AddMode(const TString& mode, TMainClass* func, const TString& description, bool hidden = false, bool noCompletion = false);
void AddMode(const TString& mode, TMainClassV* func, const TString& description, bool hidden = false, bool noCompletion = false);
- //! Hidden groups won't be displayed in 'help' block
+ //! Hidden groups won't be displayed in 'help' block
void AddGroupModeDescription(const TString& description, bool hidden = false, bool noCompletion = false);
- //! Set default mode (if not specified explicitly)
- void SetDefaultMode(const TString& mode);
-
+ //! Set default mode (if not specified explicitly)
+ void SetDefaultMode(const TString& mode);
+
void AddAlias(const TString& alias, const TString& mode);
//! Set main program description.
@@ -77,9 +77,9 @@ public:
//! Set separation string
void SetSeparationString(const TString& str);
- //! Set short command representation in Usage block
- void SetPrintShortCommandInUsage(bool printShortCommandInUsage);
-
+ //! Set short command representation in Usage block
+ void SetPrintShortCommandInUsage(bool printShortCommandInUsage);
+
void DisableSvnRevisionOption();
void AddCompletions(TString progName, const TString& name = "completion", bool hidden = false, bool noCompletion = false);
@@ -106,7 +106,7 @@ public:
TString Name;
TMainClass* Main;
TString Description;
- bool Hidden;
+ bool Hidden;
bool NoCompletion;
TVector<TString> Aliases;
@@ -147,8 +147,8 @@ private:
//! Modes
TMap<TString, TMode*> Modes;
- TString DefaultMode;
-
+ TString DefaultMode;
+
//! Handler for '--version' parameter
TVersionHandlerPtr VersionHandler;
@@ -158,9 +158,9 @@ private:
//! When set to true, disables --svnrevision option, useful for opensource (git hosted) projects
bool SvnRevisionOptionDisabled;
- //! When true - will print only 'mode name' in 'Usage' block
- bool PrintShortCommandInUsage;
-
+ //! When true - will print only 'mode name' in 'Usage' block
+ bool PrintShortCommandInUsage;
+
//! Text string used when displaying each separator
TString SeparationString;
diff --git a/util/README.md b/util/README.md
index 496efa633c..28718feec8 100644
--- a/util/README.md
+++ b/util/README.md
@@ -35,10 +35,10 @@ 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`
-
+
+
+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
diff --git a/util/datetime/parser.h b/util/datetime/parser.h
index f0c1b4a0c7..3119aa5d74 100644
--- a/util/datetime/parser.h
+++ b/util/datetime/parser.h
@@ -8,7 +8,7 @@ struct TDateTimeFields {
TDateTimeFields() {
Zero(*this);
ZoneOffsetMinutes = 0;
- Hour = 0;
+ Hour = 0;
}
ui32 Year;
diff --git a/util/datetime/parser_ut.cpp b/util/datetime/parser_ut.cpp
index 61364af997..a48626adc4 100644
--- a/util/datetime/parser_ut.cpp
+++ b/util/datetime/parser_ut.cpp
@@ -288,7 +288,7 @@ Y_UNIT_TEST_SUITE(TDateTimeParseTest) {
// ISO 8601 actually does not allow time without time zone
ret = ParseISO8601DateTime("1990-03-15", t);
UNIT_ASSERT(ret);
- UNIT_ASSERT_VALUES_EQUAL(t, 637459200);
+ UNIT_ASSERT_VALUES_EQUAL(t, 637459200);
// some normal dates
ret = ParseISO8601DateTime("1990-03-15T15:16:17Z", t);