xonixx/makesure

Implement stricter parsing

xonixx opened this issue · 0 comments

xonixx commented

Instead of silently parsing goal name like "zzz" let's produce error.

$ cat tmp/m3.sh 

@goal 'yyy'
@goal "zzz"

$ ./makesure -f tmp/m3.sh -l
Available goals:
  yyy
  '"zzz"'

Upd. Now with #140 in place it parses as zzz but we still want to disallow, since now it allows this:

@define A "aaa"
@goal "$A"
  echo "x"
$ ./makesure  -l
Available goals:
  aaa

$ ./makesure -D A=b -l
Available goals:
  b

Which is definitelly something we don't want to allow.

Basically we need to allow double-quoted "strings" only in two positions:

  • @define VAR "here"
  • @depends_on pg @args "here" "and here"