Skip to content

Format with clang-format 10 #3385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
AccessModifierOffset: -4
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
BasedOnStyle: LLVM
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterExternBlock: false
AfterFunction: true
AfterNamespace: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyNamespace: false
SplitEmptyRecord: false
BreakBeforeBraces: Custom
BreakStringLiterals: false
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
IndentCaseLabels: false
IndentWidth: 4
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 5000
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 500
PointerAlignment: Left
SortIncludes: false
SpaceBeforeParens: ControlStatements
UseTab: Never
722 changes: 359 additions & 363 deletions cli/cmdlineparser.cpp

Large diffs are not rendered by default.

31 changes: 9 additions & 22 deletions cli/cmdlineparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class CmdLineParser {
* @param settings Settings instance that will be modified according to
* options user has given.
*/
explicit CmdLineParser(Settings *settings);
explicit CmdLineParser(Settings* settings);

/**
* Parse given command line.
Expand All @@ -54,47 +54,34 @@ class CmdLineParser {
/**
* Return if user wanted to see program version.
*/
bool getShowVersion() const {
return mShowVersion;
}
bool getShowVersion() const { return mShowVersion; }

/**
* Return if user wanted to see list of error messages.
*/
bool getShowErrorMessages() const {
return mShowErrorMessages;
}
bool getShowErrorMessages() const { return mShowErrorMessages; }

/**
* Return the path names user gave to command line.
*/
const std::vector<std::string>& getPathNames() const {
return mPathNames;
}
const std::vector<std::string>& getPathNames() const { return mPathNames; }

/**
* Return if help is shown to user.
*/
bool getShowHelp() const {
return mShowHelp;
}
bool getShowHelp() const { return mShowHelp; }

/**
* Return if we should exit after printing version, help etc.
*/
bool exitAfterPrinting() const {
return mExitAfterPrint;
}
bool exitAfterPrinting() const { return mExitAfterPrint; }

/**
* Return a list of paths user wants to ignore.
*/
const std::vector<std::string>& getIgnoredPaths() const {
return mIgnoredPaths;
}
const std::vector<std::string>& getIgnoredPaths() const { return mIgnoredPaths; }

protected:

/**
* Print help text to the console.
*/
Expand All @@ -103,13 +90,13 @@ class CmdLineParser {
/**
* Print message (to console?).
*/
static void printMessage(const std::string &message);
static void printMessage(const std::string& message);
static void printMessage(const char* message);

private:
std::vector<std::string> mPathNames;
std::vector<std::string> mIgnoredPaths;
Settings *mSettings;
Settings* mSettings;
bool mShowHelp;
bool mShowVersion;
bool mShowErrorMessages;
Expand Down
Loading