Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Includes directives incorrectly parsed #30

@blackmichael

Description

@blackmichael

Config files that try to include multiple other resources seem to be incorrectly parsing subsequent statements.
This works:

include required("a.conf")
-
include required("b.conf")

and this works

include required("a.conf")
x: 7
include required("b.conf")

but this fails (regardless of how much whitespace is used)

include required("a.conf")
include required("b.conf")

with the error

--- FAIL: TestParseIncludedResource (0.00s)
    --- FAIL: TestParseIncludedResource/parse_the_included_resource_and_return_the_parsed_object_if_there_is_no_error (0.00s)
        parser_test.go:1003: not expected an error, got err: "invalid key! at: 2:17, \"(\" is a forbidden character in keys"

and this parses, but doesn't actually include the second resource

include "a.conf"
include "b.conf"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions