cqfn / pdd

Command line toolkit for collecting TODO markers from your code, known as Puzzle Driven Development (PDD)
https://www.0pdd.com
MIT License
76 stars 25 forks source link

pdd treats a variable that contains TODO word as a marker #226

Closed php-coder closed 7 months ago

php-coder commented 1 year ago

Could we adjust parsing rules to not produce a false positive for the variables that contains TODO? At least, if there is no a space or a colon after TODO, it's not a marker, it's just a word.

$ cat test.sh
#!/bin/sh

TODOS_DIR="$PWD"
$ pdd -v -f pdd.xml
My version is 0.23.1
Ruby version is 2.7.8 at x86_64-linux
Reading from root dir /data
/data/pdd.xml is a binary file (0 bytes)
Reading test.sh ...
ERROR: ERROR: test.sh; PDD::Error at test.sh:3: TODO found, but puzzle can't be parsed, most probably because TODO is not followed by a puzzle marker, as this page explains: https://github.com/cqfn/pdd#how-to-format
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/cqfn/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/cqfn/pdd/blob/master/README.md.
Exit code is 1
yegor256 commented 7 months ago

@pnatashap this is a reasonable bug report, maybe you can help us fix it?

php-coder commented 7 months ago

Fixed by #232