CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
27 namespace catapult {
namespace validators {
64 return static_cast<ValidationResult>(
65 (static_cast<uint32_t>(severity) & 0x03) << 30 |
66 (static_cast<uint32_t>(flags) & 0x3F) << 24 |
67 static_cast<uint32_t>(facility) << 16 |
72 #define DEFINE_VALIDATION_RESULT(SEVERITY, FACILITY, DESCRIPTION, CODE, FLAGS) \
73 constexpr auto SEVERITY##_##FACILITY##_##DESCRIPTION = validators::MakeValidationResult( \
74 (validators::ResultSeverity::SEVERITY), \
75 (validators::FacilityCode::FACILITY), \
77 (validators::ResultFlags::FLAGS))
errors
Definition: validation.py:310
def __init__(self, errorReporter)
Definition: validation.py:168
patternSingleLineFunction
Definition: validation.py:595
patternTabInside
Definition: validation.py:32
def checkEnumClass(self, line)
Definition: validation.py:678
def stripCommentsAndStrings(line)
Definition: validation.py:10
def formatError(err)
Definition: validation.py:971
def checkCoerce(self, line)
Definition: validation.py:681
Definition: validation.py:20
Definition: validation.py:848
patternTest
Definition: validation.py:570
def checkTestAsserts(self, line)
Definition: validation.py:708
def check(self, lineNumber, line)
Definition: validation.py:429
previousStrippedLine
Definition: validation.py:1118
Definition: SimpleValidator.py:1
patternSpaceOperator
Definition: validation.py:30
patternSpacesMiddle
Definition: validation.py:29
def check(self, lineNumber, line)
Definition: validation.py:172
def check(self, lineNumber, line)
Definition: validation.py:403
patternOperatorBoolWithExplicit
Definition: validation.py:569
string NAME
Definition: validation.py:22
patternTabsStart
Definition: validation.py:28
patternDefineTests
Definition: validation.py:578
def reset(self, path)
Definition: validation.py:188
patternDefineTestTraits
Definition: validation.py:579
Definition: validation.py:304
string NAME
Definition: validation.py:244
def check(self, lineNumber, line)
Definition: validation.py:488
patternTemplate
Definition: validation.py:152
patternReturn
Definition: validation.py:524
patternMissingExplicitCtor
Definition: validation.py:574
constexpr void HexFormat(const ByteArray< N, TTag > &)
def check(self, lineNumber, line)
Definition: validation.py:1030
constexpr bool IsValidationResultSuccess(ValidationResult result)
Returns a value indicating whether the validation result is a success.
Definition: ValidationResult.h:90
string NAME
Definition: validation.py:447
Definition: validation.py:745
previousLine
Definition: validation.py:960
Definition: validation.py:910
errors
Definition: validation.py:601
Definition: validation.py:164
def formatError(err)
Definition: validation.py:1058
def __init__(self, errorReporter)
Definition: validation.py:449
def reportError(self, lineNumber, line, message)
Definition: validation.py:1184
def __init__(self, errorReporter)
Definition: validation.py:854
string NAME
Definition: validation.py:166
patternEnumValue
Definition: validation.py:958
hasMismatchedTestClass
Definition: validation.py:92
def checkTestNameIf(self, line)
Definition: validation.py:730
Definition: validation.py:443
Definition: validation.py:146
emptyLineNumber
Definition: validation.py:252
def check(self, lineNumber, line)
Definition: validation.py:932
counter
Definition: validation.py:861
valuePattern
Definition: validation.py:755
def check(self, lineNumber, line)
Definition: validation.py:802
ValidationResult
Enumeration of all possible validation results.
Definition: ValidationResult.h:51
patternOperatorBool
Definition: validation.py:568
def reset(self, path)
Definition: validation.py:88
#define CASE_WELL_KNOWN_RESULT(CODE)
Definition: ValidationResult.cpp:29
def formatError(err)
Definition: validation.py:1012
Result is verbose and should be suppressed from most logs.
Definition: SimpleValidator.py:9
def formatError(err)
Definition: validation.py:945
def reset(self, path)
Definition: validation.py:792
patternOperator
Definition: validation.py:581
def formatError(err)
Definition: validation.py:810
def check(self, lineNumber, line)
Definition: validation.py:109
Validation result is success.
string NAME
Definition: validation.py:520
patternCarriageReturn
Definition: validation.py:33
string NAME
Definition: validation.py:954
patternTestNameIfExclusions
Definition: validation.py:599
def check(self, lineNumber, line)
Definition: validation.py:733
constexpr bool IsSet(ValidationResult result, ResultFlags flags)
Checks if result has all flags set.
Definition: ValidationResult.h:85
isTestValidator
Definition: validation.py:573
def checkTestExpectedSize(self, line)
Definition: validation.py:705
def __init__(self, errorReporter)
Definition: validation.py:916
lineTestClass
Definition: validation.py:90
recentLines
Definition: validation.py:987
ResultSeverity
Possible result severities (only two bits are used).
Definition: ValidationResult.h:30
def finalize(self)
Definition: validation.py:805
hasUtils
Definition: validation.py:794
patternFileSizeCast
Definition: validation.py:583
def formatError(err)
Definition: validation.py:178
def __init__(self, errorReporter)
Definition: validation.py:1169
Definition: validation.py:553
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
numOpen
Definition: validation.py:190
def __init__(self, errorReporter)
Definition: validation.py:24
std::ostream & operator<<(std::ostream &out, ValidationResult result)
Insertion operator for outputting result to out.
Definition: ValidationResult.cpp:69
def check(self, lineNumber, line)
Definition: validation.py:256
patternNamespaceOpening
Definition: validation.py:1025
patternTryParseValue
Definition: validation.py:582
patternSpacesStart
Definition: validation.py:27
Definition: validation.py:242
def checkExplicitCtor(self, line)
Definition: validation.py:649
def formatError(err)
Definition: validation.py:237
Definition: validation.py:1098
def formatError(err)
Definition: validation.py:548
Definition: validation.py:516
def finalize(self)
Definition: validation.py:293
previousRegionLineNumber
Definition: validation.py:863
patternTestBoolAssert
Definition: validation.py:590
patternForwardDeclaration
Definition: validation.py:1027
def formatError(err)
Definition: validation.py:409
string NAME
Definition: validation.py:81
def check(self, lineNumber, line)
Definition: validation.py:757
def check(self, lineNumber, line)
Definition: validation.py:154
errorReporter
Definition: SimpleValidator.py:11
def match(self, line, lineNumber)
Definition: validation.py:97
def formatError(err)
Definition: validation.py:1188
filename
Definition: validation.py:95
Validation result is neither success nor failure.
string NAME
Definition: validation.py:306
patternComma
Definition: validation.py:34
skip
Definition: validation.py:525
Level for logging trace events.
patternTestClass
Definition: validation.py:571
def formatError(err)
Definition: validation.py:843
def formatError(err)
Definition: validation.py:1159
def checkSingleLineFunction(self, line)
Definition: validation.py:727
patternNameSpaceBrace
Definition: validation.py:451
string NAME
Definition: validation.py:1021
def formatError(err)
Definition: validation.py:121
patternTestNameIf
Definition: validation.py:598
carriageReturnCount
Definition: validation.py:39
firstBeforeNestedLine
Definition: validation.py:864
string NAME
Definition: validation.py:1167
def finalize(self)
Definition: validation.py:116
def finalize(self)
Definition: validation.py:894
patternCommentSingle
Definition: validation.py:31
def __init__(self, errorReporter)
Definition: validation.py:522
previousStrippedLine
Definition: validation.py:1171
def reset(self, path)
Definition: validation.py:37
def __init__(self, errorReporter)
Definition: validation.py:752
def check(self, lineNumber, line)
Definition: validation.py:135
def checkValidationResult(self, line)
Definition: validation.py:668
Definition: validation.py:950
def formatError(err)
Definition: validation.py:438
patternEnum
Definition: validation.py:575
patternWhitespaces
Definition: validation.py:26
def reset(self, path)
Definition: validation.py:822
LogLevel
Catapult log levels.
Definition: Logging.h:36
string NAME
Definition: validation.py:148
def formatError(err)
Definition: validation.py:69
string NAME
Definition: validation.py:1113
def __init__(self, errorReporter)
Definition: validation.py:83
patternTestExpectedSize
Definition: validation.py:584
def checkDefineTests(self, line)
Definition: validation.py:688
def reportError(self, lineNumber, message)
Definition: validation.py:1054
def checkFileSize(self, line)
Definition: validation.py:691
def check(self, lineNumber, line)
Definition: validation.py:536
def formatError(err)
Definition: validation.py:511
ResultFlags
Possible result flags (only six bits are used).
Definition: ValidationResult.h:42
hasImproperName
Definition: validation.py:824
def formatError(err)
Definition: validation.py:159
def __init__(self, errorReporter)
Definition: validation.py:1115
Definition: validation.py:785
patternRegion
Definition: validation.py:856
def check(self, lineNumber, line)
Definition: validation.py:41
FacilityCode
Possible validation facility codes.
Definition: validators/FacilityCode.h:30
string NAME
Definition: validation.py:749
def __init__(self, errorReporter)
Definition: validation.py:1023
gotPragmaOnce
Definition: validation.py:250
errors
Definition: validation.py:422
def formatError(err)
Definition: validation.py:141
patternDeclareMacroNoParams
Definition: validation.py:593
string NAME
Definition: validation.py:185
isOpeningBraceUnclosed
Definition: validation.py:1117
patternTestBoolAssertAllowed
Definition: validation.py:591
def rindex(lst, searched)
Definition: validation.py:781
def __init__(self, errorReporter)
Definition: validation.py:150
def reset(self, path)
Definition: validation.py:859
def formatError(err)
Definition: validation.py:740
Definition: validation.py:414
reportEmptyLineError
Definition: validation.py:253
patternEnumClass
Definition: validation.py:576
patternTemplate
Definition: validation.py:170
patternClosingBrace
Definition: validation.py:984
typePattern
Definition: validation.py:754
path
Definition: SimpleValidator.py:22
long
Definition: validation.py:192
errors
Definition: validation.py:866
string NAME
Definition: validation.py:564
recentLines
Definition: validation.py:1028
Definition: validation.py:1164
def checkExplicitOperatorBool(self, line)
Definition: validation.py:622
def reset(self, path)
Definition: validation.py:617
patternAnonNamespaceOpening
Definition: validation.py:1026
insideComment
Definition: validation.py:254
def formatError(err)
Definition: validation.py:905
def finalize(self)
Definition: validation.py:838
def check(self, lineNumber, line)
Definition: validation.py:868
def finalize(self)
Definition: validation.py:73
Validation result is failure.
def check(self, lineNumber, line)
Definition: validation.py:989
def checkTestLine(self, line)
Definition: validation.py:625
def __init__(self, errorReporter)
Definition: validation.py:956
def check(self, lineNumber, line)
Definition: validation.py:962
skip
Definition: validation.py:921
string NAME
Definition: validation.py:129
Definition: validation.py:976
def __init__(self, errorReporter)
Definition: validation.py:982
constexpr ValidationResult MakeValidationResult(ResultSeverity severity, FacilityCode facility, uint16_t code, ResultFlags flags)
Makes a validation result given severity, facility, code and flags.
Definition: ValidationResult.h:63
def __init__(self, errorReporter, lineLengthLimit=140)
Definition: validation.py:131
def checkDeclareMacroNoParams(self, line)
Definition: validation.py:720
firstLine
Definition: validation.py:191
string NAME
Definition: validation.py:914
constexpr ResultSeverity GetSeverity(ValidationResult result)
Extracts the encoded result severity from result.
Definition: ValidationResult.h:80
Definition: validation.py:79
Definition: AddressExtractionExtension.cpp:28
constexpr bool IsValidationResultFailure(ValidationResult result)
Returns a value indicating whether the validation result is a failure.
Definition: ValidationResult.h:95
patternFileSize
Definition: validation.py:580
def check(self, lineNumber, line)
Definition: validation.py:835
def __init__(self, errorReporter)
Definition: validation.py:420
string NAME
Definition: validation.py:852
def formatError(err)
Definition: validation.py:776
No special result flags are set.
lineLengthLimit
Definition: validation.py:133
patternInbetweenClosingBrace
Definition: validation.py:985
gotLicense
Definition: validation.py:251
def __init__(self, errorReporter)
Definition: validation.py:308
string NAME
Definition: validation.py:980
previousRegionLine
Definition: validation.py:862
macroCall
Definition: validation.py:918
constexpr utils::LogLevel MapToLogLevel(ValidationResult result)
Maps validation result to an appropriate logging level.
Definition: ValidationResult.h:100
def check(self, lineNumber, line)
Definition: validation.py:1120
def reportError(self, lineNumber, line, message)
Definition: validation.py:1155
Definition: validation.py:127
patternLineAfterClosingBrace
Definition: validation.py:986
def check(self, lineNumber, line)
Definition: validation.py:1173
string NAME
Definition: validation.py:418
def createValidators(errorReporter)
Definition: validation.py:1223
def reset(self, path)
Definition: validation.py:247
def __init__(self, errorReporter)
Definition: validation.py:566
patternValidationResult
Definition: validation.py:572
firstBeforeNestedLineNumber
Definition: validation.py:865
def check(self, lineNumber, line)
Definition: validation.py:194
patternTestClass
Definition: validation.py:85
patternTestSingleLineFunction
Definition: validation.py:596
patternCoerce
Definition: validation.py:577
Definition: validation.py:815
matchLineNumber
Definition: validation.py:91
Level for logging warning events.
patternBlankLine
Definition: validation.py:959
Definition: validation.py:183
patternTestMemcmpAssert
Definition: validation.py:587
skip
Definition: validation.py:452
def formatError(err)
Definition: validation.py:289
Definition: validation.py:1017