cqfn / pdd

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

Add pdd configuration option to handle badly formatted markers (either Warning or Error) #156

Closed mbao01 closed 3 years ago

mbao01 commented 3 years ago

Description

Current behaviour

When a badly formatted todo marker is present in the project, pdd throws an error and stops processing subsequent files. This means that the generation of any rightly formatted puzzles fails. My proposal is to make this behaviour configurable.

Suggested solution

Add pdd configuration option to handle encounters with badly formatted markers either show a Warning or throw an Error

Introduce the flag to control behaviour errors when a todo marker:

Flag --skip-errors ✅ OR --error-as-warning - Suppress error as warning for badly formatted todo markers

Usage

# should only show warnings. should generate puzzles successfully
$ pdd --skip-errors -f test.xml
# default behaviour
# should show errors. should not generate puzzles
$ pdd -f test.xml

For ~/.pdd file

--source=.
--skip-errors
--verbose

Types of issue