Skip to content

Commit

Permalink
Merge branch 'master' into pksunkara/fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara authored Nov 15, 2018
2 parents ef54083 + 1facd70 commit dcaa825
Show file tree
Hide file tree
Showing 74 changed files with 2,564 additions and 153 deletions.
79 changes: 61 additions & 18 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: false
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignEscapedNewlinesLeft: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
Expand All @@ -13,53 +14,95 @@ AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: true
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: false
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
Expand All @@ -70,5 +113,5 @@ SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 4
UseTab: Never
SortIncludes: false
...

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* Parameters which are of `enum` type will now have their `default` values
correctly serialized in the output using `enum` type

### Enhancements

* Add column/line info to anotations source maps

## 4.0.0-pre.1

### Breaking
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ add_subdirectory(ext/snowcrash EXCLUDE_FROM_ALL)
# drafter
add_subdirectory(src)
if(${BUILD_TESTING})
option(INTEGRATION_TESTS "Run integration tests" OFF)
add_subdirectory(test)
if(${INTEGRATION_TESTS})
include(integration.cmake)
endif()
add_custom_target(drafter-test-suite ALL)
add_dependencies(drafter-test-suite drafter-test markdown-parser-test snowcrash-test)
endif()
Expand Down
9 changes: 7 additions & 2 deletions drafter.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,12 @@
"src/RefractElementFactory.cc",
"src/ConversionContext.cc",
"src/ConversionContext.h",
"src/ElementInfoUtils.h"
"src/ElementComparator.h"
"src/ElementInfoUtils.h",
"src/ElementComparator.h",


"src/SourceMapUtils.h",
"src/SourceMapUtils.cc",

"src/utils/Variant.h",
"src/utils/Utf8.h",
Expand Down Expand Up @@ -412,6 +416,7 @@
"test/test-ElementInfoUtils.cc",
"test/test-ElementComparator.cc",
"test/test-VisitorUtils.cc",
"test/test-sourceMapToLineColumn.cc",

],
'dependencies': [
Expand Down
60 changes: 60 additions & 0 deletions features/fixtures/refract.json
Original file line number Diff line number Diff line change
Expand Up @@ -1046,10 +1046,30 @@
"content": [
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 39
},
"column": {
"element": "number",
"content": 1
}
},
"content": 685
},
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 42
},
"column": {
"element": "number",
"content": 1
}
},
"content": 45
}
]
Expand Down Expand Up @@ -1090,10 +1110,30 @@
"content": [
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 55
},
"column": {
"element": "number",
"content": 1
}
},
"content": 992
},
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 58
},
"column": {
"element": "number",
"content": 1
}
},
"content": 45
}
]
Expand Down Expand Up @@ -1134,10 +1174,30 @@
"content": [
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 14
},
"column": {
"element": "number",
"content": 7
}
},
"content": 200
},
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 14
},
"column": {
"element": "number",
"content": 108
}
},
"content": 102
}
]
Expand Down
60 changes: 60 additions & 0 deletions features/fixtures/refract.sourcemap.json
Original file line number Diff line number Diff line change
Expand Up @@ -3218,10 +3218,30 @@
"content": [
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 39
},
"column": {
"element": "number",
"content": 1
}
},
"content": 685
},
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 42
},
"column": {
"element": "number",
"content": 1
}
},
"content": 45
}
]
Expand Down Expand Up @@ -3262,10 +3282,30 @@
"content": [
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 55
},
"column": {
"element": "number",
"content": 1
}
},
"content": 992
},
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 58
},
"column": {
"element": "number",
"content": 1
}
},
"content": 45
}
]
Expand Down Expand Up @@ -3306,10 +3346,30 @@
"content": [
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 14
},
"column": {
"element": "number",
"content": 7
}
},
"content": 200
},
{
"element": "number",
"attributes": {
"line": {
"element": "number",
"content": 14
},
"column": {
"element": "number",
"content": 108
}
},
"content": 102
}
]
Expand Down
Loading

0 comments on commit dcaa825

Please sign in to comment.