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

puzzle parsing consume tailing lines for no reason #211

Closed yegor256 closed 2 years ago

yegor256 commented 2 years ago

For example, this puzzle:

/**
 * @todo #1:30min How are you?
 */

Is parsed with this body:

"How are you? /"

I think it's a mistake.

Moreover, this puzzle:

#    @todo #1 Hello
# Good
# Bye

Parses as:

"Hello Good Bye"

I created test_many.rb test to reproduce this.

yegor256 commented 2 years ago

@mbao01 please, take a look. Jun run this and you will see the problem:

$ bundle exec ruby test/test_many.rb
yegor256 commented 2 years ago

@rultor release, tag is 0.21.3

rultor commented 2 years ago

@rultor release, tag is 0.21.3

@yegor256 OK, I will release it now. Please check the progress here

rultor commented 2 years ago

@rultor release, tag is 0.21.3

@yegor256 Oops, I failed. You can see the full log here (spent 1min)


# Running:

Finished in 0.006967s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
Run options: --seed 29449

# Running:

Finished in 0.001883s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
Run options: --seed 54472

# Running:

Finished in 0.002350s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
Run options: --seed 33384

# Running:

Finished in 0.001952s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
Run options: --seed 56194

# Running:

Finished in 0.001460s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
Run options: --seed 6556

# Running:

Finished in 0.001488s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
Inspecting 29 files
\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[33mC\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m

Offenses:

\u001b[36mtest/test_many.rb\u001b[0m:38:7: \u001b[33mC\u001b[0m: \u001b[33m[Correctable] \u001b[0mLayout/EmptyLineAfterGuardClause: Add empty line after guard clause.
      next if name.start_with?('_')
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

29 files inspected, \u001b[31m1 offense\u001b[0m detected, \u001b[33m1 offense\u001b[0m autocorrectable
RuboCop failed!
container a472769e5a4c45a3be37b5d5ea7287f33e5c5adfb7c4053f319c97ecb23e9af8 is dead
Mon 01 Aug 2022 04:29:13 PM CEST
yegor256 commented 2 years ago

@rultor release, tag is 0.21.3

rultor commented 2 years ago

@rultor release, tag is 0.21.3

@yegor256 OK, I will release it now. Please check the progress here

rultor commented 2 years ago

@rultor release, tag is 0.21.3

@yegor256 Done! FYI, the full log is here (took me 1min)