Skip to content

Commit e45c861

Browse files
committed
trun off clang format for selected sections
1 parent bcac5f3 commit e45c861

File tree

6 files changed

+98
-222
lines changed

6 files changed

+98
-222
lines changed

FWCore/Framework/bin/cmsRun.cpp

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -151,25 +151,23 @@ int main(int argc, char* argv[]) {
151151
descString += "] config_file \nAllowed options";
152152
boost::program_options::options_description desc(descString);
153153

154+
// clang-format off
154155
desc.add_options()(kHelpCommandOpt, "produce help message")(
155-
kParameterSetCommandOpt,
156+
kParameterSetCommandOpt, boost::program_options::value<std::string>(), "configuration file")(
157+
kJobreportCommandOpt,
156158
boost::program_options::value<std::string>(),
157-
"configuration file")(kJobreportCommandOpt,
158-
boost::program_options::value<std::string>(),
159-
"file name to use for a job report file: default extension is "
160-
".xml")(kEnableJobreportCommandOpt,
161-
"enable job report files (if any) specified in configuration "
162-
"file")(kJobModeCommandOpt,
163-
boost::program_options::value<std::string>(),
164-
"Job Mode for MessageLogger defaults - default mode is "
165-
"grid")(kNumberOfThreadsCommandOpt,
166-
boost::program_options::value<unsigned int>(),
167-
"Number of threads to use in job (0 is use all "
168-
"CPUs)")(kSizeOfStackForThreadCommandOpt,
169-
boost::program_options::value<unsigned int>(),
170-
"Size of stack in KB to use for extra threads (0 is "
171-
"use system default size)")(kStrictOpt,
172-
"strict parsing");
159+
"file name to use for a job report file: default extension is .xml")(
160+
kEnableJobreportCommandOpt, "enable job report files (if any) specified in configuration file")(
161+
kJobModeCommandOpt,
162+
boost::program_options::value<std::string>(),
163+
"Job Mode for MessageLogger defaults - default mode is grid")(
164+
kNumberOfThreadsCommandOpt,
165+
boost::program_options::value<unsigned int>(),
166+
"Number of threads to use in job (0 is use all CPUs)")(
167+
kSizeOfStackForThreadCommandOpt,
168+
boost::program_options::value<unsigned int>(),
169+
"Size of stack in KB to use for extra threads (0 is use system default size)")(kStrictOpt, "strict parsing");
170+
// clang-format on
173171

174172
// anything at the end will be ignored, and sent to python
175173
boost::program_options::positional_options_description p;

FWCore/ParameterSet/bin/edmPluginHelp.cpp

Lines changed: 26 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -229,66 +229,34 @@ int main(int argc, char** argv) try {
229229
descString += "At least one of the following options must be used: -p, -l, -a, -q, or -t\n\n";
230230
descString += "Allowed options:";
231231
boost::program_options::options_description desc(descString);
232+
233+
// clang-format off
232234
desc.add_options()(kHelpCommandOpt, "produce help message")(
233-
kPluginCommandOpt,
235+
kPluginCommandOpt, boost::program_options::value<std::string>(), "only print descriptions for this plugin")(
236+
kLibraryCommandOpt,
237+
boost::program_options::value<std::string>(),
238+
"only print descriptions for plugins in this library")(
239+
kAllLibrariesCommandOpt,
240+
"allows the program to run without selecting a plugin or library. "
241+
"This will take a significant amount of time.")(kModuleLabelCommandOpt,
242+
boost::program_options::value<std::string>(),
243+
"only print descriptions for this module label")(
244+
kBriefCommandOpt,
245+
"do not print comments, more compact format, suppress text"
246+
" added to help the user understand what the output means")(
247+
kPrintOnlyLabelsCommandOpt,
248+
"do not print parameter descriptions, just list module labels matching selection criteria")(
249+
kPrintOnlyPluginsCommandOpt,
250+
"do not print parameter descriptions or module labels, just list plugins matching selection criteria")(
251+
kLineWidthCommandOpt,
252+
boost::program_options::value<unsigned>(),
253+
"try to limit lines to this length by inserting newlines between words in comments. Long words or names can "
254+
"cause the line length to exceed this limit. Defaults to terminal screen width or 80")(
255+
kTopLevelCommandOpt,
234256
boost::program_options::value<std::string>(),
235-
"only print descriptions for this plugin")(kLibraryCommandOpt,
236-
boost::program_options::value<std::string>(),
237-
"only print descriptions for plugins in this "
238-
"library")(kAllLibrariesCommandOpt,
239-
"allows the program to run without selecting a plugin or "
240-
"library. "
241-
"This will take a significant amount of "
242-
"time.")(kModuleLabelCommandOpt,
243-
boost::program_options::value<std::string>(),
244-
"only print descriptions for this module "
245-
"label")(kBriefCommandOpt,
246-
"do not print comments, more compact "
247-
"format, suppress text"
248-
" added to help the user understand what "
249-
"the output "
250-
"means")(kPrintOnlyLabelsCommandOpt,
251-
"do not print parameter "
252-
"descriptions, just list module "
253-
"labels matching selection "
254-
"criteri"
255-
"a")(kPrintOnlyPluginsCommandOpt,
256-
"do not print parameter "
257-
"descriptions or module "
258-
"labels, just list plugins "
259-
"matching selection "
260-
"criteri"
261-
"a")(kLineWidthCommandOpt,
262-
boost::program_options::
263-
value<unsigned>(),
264-
"try to limit lines "
265-
"to this length by "
266-
"inserting newlines "
267-
"between words in "
268-
"comments. Long words "
269-
"or names can "
270-
"cause the line "
271-
"length to exceed "
272-
"this limit. Defaults "
273-
"to terminal screen "
274-
"width or "
275-
"8"
276-
"0")(kTopLevelCommandOpt,
277-
boost::program_options::
278-
value<
279-
std::string>(),
280-
"print only the "
281-
"description for "
282-
"the top level "
283-
"parameter set "
284-
"with this name. "
285-
"Allowed names "
286-
"are 'options', "
287-
"'maxEvents', "
288-
"'maxLuminosityBl"
289-
"ocks', and "
290-
"'maxSecondsUntil"
291-
"Rampdown'.");
257+
"print only the description for the top level parameter set with this name. Allowed names are 'options', "
258+
"'maxEvents', 'maxLuminosityBlocks', and 'maxSecondsUntilRampdown'.");
259+
// clang-format on
292260

293261
boost::program_options::variables_map vm;
294262
try {

FWCore/ParameterSet/bin/edmWriteConfigs.cpp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,23 +154,25 @@ int main(int argc, char** argv) try {
154154
descString += "Instead of specifying a library, there is also an option to specify a plugin.\n\n";
155155
descString += "Allowed options";
156156
boost::program_options::options_description desc(descString);
157+
158+
// clang-format off
157159
desc.add_options()(kHelpCommandOpt, "produce help message")(
158-
kLibraryCommandOpt,
160+
kLibraryCommandOpt, boost::program_options::value<std::string>(), "library filename")(
161+
kPathCommandOpt,
162+
"When this option is set, the library filename "
163+
"is interpreted as a relative or absolute path. If there are no directories in "
164+
"the library filename, then it looks for the library file in the current directory. "
165+
"Fails with an error message if the path does not lead to a library file that exists "
166+
"or can be loaded. "
167+
"If this option is not set, then the library filename should only be "
168+
"a filename without any directories. In that case, it is assumed "
169+
"the build system has already put the library file in the "
170+
"appropriate place, built the edmplugincache, and the PluginManager "
171+
"is used to find and load the library.")(
172+
kPluginCommandOpt,
159173
boost::program_options::value<std::string>(),
160-
"library filename")(kPathCommandOpt,
161-
"When this option is set, the library filename "
162-
"is interpreted as a relative or absolute path. If there are no directories in "
163-
"the library filename, then it looks for the library file in the current directory. "
164-
"Fails with an error message if the path does not lead to a library file that exists "
165-
"or can be loaded. "
166-
"If this option is not set, then the library filename should only be "
167-
"a filename without any directories. In that case, it is assumed "
168-
"the build system has already put the library file in the "
169-
"appropriate place, built the edmplugincache, and the PluginManager "
170-
"is used to find and load the library.")(kPluginCommandOpt,
171-
boost::program_options::value<std::string>(),
172-
"plugin name. You must specify either a library or "
173-
"plugin, but not both.");
174+
"plugin name. You must specify either a library or plugin, but not both.");
175+
// clang-format on
174176

175177
boost::program_options::positional_options_description p;
176178
p.add(kLibraryOpt, -1);

0 commit comments

Comments
 (0)