Skip to content
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

Support for nested and inlined maps (inside other maps) #252

Merged
merged 5 commits into from
Jan 7, 2024

Conversation

orchestr7
Copy link
Owner

What's done:

  • Added a support for nested anonymous Maps

### What's done:
- Added a support for nested anonymous Maps
@@ -21,6 +22,7 @@
@ExperimentalSerializationApi
public class TomlMapDecoder(
private val rootNode: TomlTable,
private val config: TomlInputConfig,

Check failure

Code scanning / ktlint

[KDOC_NO_CONSTRUCTOR_PROPERTY] all properties from the primary constructor should be documented in a @Property tag in KDoc: add param to KDoc Error

[KDOC_NO_CONSTRUCTOR_PROPERTY] all properties from the primary constructor should be documented in a @property tag in KDoc: add param to KDoc
@@ -21,6 +22,7 @@
@ExperimentalSerializationApi
public class TomlMapDecoder(
private val rootNode: TomlTable,
private val config: TomlInputConfig,

Check failure

Code scanning / ktlint

[KDOC_NO_CONSTRUCTOR_PROPERTY] all properties from the primary constructor should be documented in a @Property tag in KDoc: add param to KDoc Error

[KDOC_NO_CONSTRUCTOR_PROPERTY] all properties from the primary constructor should be documented in a @property tag in KDoc: add param to KDoc
"""
)
is TomlKeyValue -> ((if (index % 2 == 0) processedNode.key.toString() else processedNode.value.content)) as T
is TomlTable -> {

Check failure

Code scanning / ktlint

[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN Error

[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN
TomlMapDecoder(processedNode, config).decodeSerializableValue(deserializer)
}
}
else -> {

Check failure

Code scanning / ktlint

[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN Error

[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN

should be decoded to Map<String, Map<String, Long>>, but not to Map<String, Long>
"""
, rootNode.lineNo)

Check failure

Code scanning / ktlint

[WRONG_NEWLINES] incorrect line breaking: newline should be placed only after comma Error

[WRONG_NEWLINES] incorrect line breaking: newline should be placed only after comma
"""
)
is TomlKeyValue -> ((if (index % 2 == 0) processedNode.key.toString() else processedNode.value.content)) as T
is TomlTable -> {

Check failure

Code scanning / ktlint

[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN Error

[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN
TomlMapDecoder(processedNode, config).decodeSerializableValue(deserializer)
}
}
else -> {

Check failure

Code scanning / ktlint

[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN Error

[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN

should be decoded to Map<String, Map<String, Long>>, but not to Map<String, Long>
"""
, rootNode.lineNo)

Check failure

Code scanning / ktlint

[WRONG_NEWLINES] incorrect line breaking: newline should be placed only after comma Error

[WRONG_NEWLINES] incorrect line breaking: newline should be placed only after comma
### What's done:
- Added a support for nested anonymous Maps
### What's done:
- Added a support for nested anonymous Maps
@orchestr7 orchestr7 merged commit 1edd2a6 into main Jan 7, 2024
6 checks passed
@orchestr7 orchestr7 deleted the feature/inlined_maps branch January 7, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant