Make error if there's no such type, properties and interface in scope
Hey Eliot you prolong creating nice stuff. Personally I am pleased to see this repository. Thanks for that.
So what about problem.
I believe that if we cannot find type, interface and property in time when we parse AST is a problem and we should notify about that user
At present it is going to be adjourned to compile's message.
What I mean
if we have such file as this
services:
DoSomething:
type: '*Worker'
interface: Do
properties:
Name: '"Bil"'
If there's no type, interface or property like this, some useful information could be displayed
Hello to all!!! I give an error in my incorrect input, but withouts warnings, really is very difficult know the problem. Im my file: datasourceService: type: '*DatasourceService' interface: IDatasourceService.go properties: configurationService: '@{configurationService}'
The .go of the interface field generate an invalid value in dingo.go, then the error is given: panic: dingo.go:8:39: expected 'IDENT', found 'go' (and 1 more errors)
goroutine 1 [running]: main.(*File).getPackageName(0xc00005e7b0, 0x58e88d, 0x9, 0x0, 0x0) /home/pc/go/pkg/mod/github.com/elliotchance/[email protected]/file.go:108 +0x405 main.main() /home/pc/go/pkg/mod/github.com/elliotchance/[email protected]/main.go:38 +0x333
Other observation: if i have an invalid value, and an incorrect file dingo.go is generated, later i cant use again dingo command. Is needed remove the file by hand. The command would delete the dingo.go file before.