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

#165: format error/warn message with file link #166

Closed mbao01 closed 3 years ago

mbao01 commented 3 years ago

Fixed as shown in image;

Screenshot 2021-07-13 at 15 13 25
yegor256 commented 3 years ago

@rultor merge

rultor commented 3 years ago

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

rultor commented 3 years ago

@rultor merge

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

Reading lib/pdd/rule/estimates.rb ...
Reading lib/pdd/puzzle.rb ...
Reading lib/pdd/version.rb ...
Reading lib/pdd.rb ...
Reading appveyor.yml ...
Reading assets/puzzles.xsd ...
Reading assets/puzzles.xsl ...
Reading .rubocop.yml ...
Puzzle 123-9786ef4c 30/DEV at .rubocop.yml
Reading .gitignore ...
Reading pdd.gemspec ...
Reading Gemfile.lock ...
Reading features/rake.feature ...
Reading features/support/env.rb ...
Reading features/gem_package.feature ...
Reading features/step_definitions/steps.rb ...
Reading bin/pdd ...
Reading .gitattributes ...
+ LC_ALL=US-ASCII
+ bundle exec rake
/home/r/.ruby/gems/minitest-5.5.0/lib/minitest/assertions.rb:413: warning: mismatched indentations at 'ensure' with 'begin' at 404
/home/r/.ruby/gems/minitest-5.5.0/lib/minitest/assertions.rb:452: warning: mismatched indentations at 'ensure' with 'begin' at 437
Run options: --seed 60753

# Running:

NOT IMPLEMENTED
\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[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[31mERROR\u001b[0m: Puzzle a.txt:1-1 has an estimate of 0 minutes, which is lower than 30 minutes
\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[32m.\u001b[0m\u001b[32m.\u001b[0m

Finished in 0.659642s, 68.2188 runs/s, 154.6293 assertions/s.

45 runs, 102 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for Unit Tests to /home/r/repo/coverage. 301 / 306 LOC (98.37%) covered.
/usr/local/rvm/rubies/ruby-2.6.0/bin/ruby -S bundle exec cucumber features --format progress
Using the default profile...
\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[31mERROR\u001b[0m: there are 2 duplicate(s) of the same puzzle: Sample.java:3-3, Sample.java:4-4, while maximum 1 duplicate is allowed
\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[31mF\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[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[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m/tmp/test20210714-10897-nyuyyq/pdd/lib/pdd/version.rb:26: warning: already initialized constant PDD::VERSION
/home/r/repo/lib/pdd/version.rb:26: warning: previous definition of VERSION was here
\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[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/tmp/test20210714-10897-1fd0x9w/pdd/lib/pdd/version.rb:26: warning: already initialized constant PDD::VERSION
/home/r/repo/lib/pdd/version.rb:26: warning: previous definition of VERSION was here
\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[31m(::) failed steps (::)\u001b[0m

\u001b[31mPDD failed but exception doesn't contain "puzzle at line #6": Sample.java; Sample.java:6 Space expected at 7:5; make sure all lines in the puzzle body have a single leading space. (RuntimeError)\u001b[0m
\u001b[31m/home/r/repo/features/step_definitions/steps.rb:69:in `rescue in block in <top (required)>'\u001b[0m
\u001b[31m/home/r/repo/features/step_definitions/steps.rb:64:in `/^I run pdd it fails with "([^"]*)"$/'\u001b[0m
\u001b[31mfeatures/catches_broken_puzzles.feature:24:in `When I run pdd it fails with "puzzle at line #6"'\u001b[0m

\u001b[31mFailing Scenarios:\u001b[0m
\u001b[31mcucumber features/catches_broken_puzzles.feature:6\u001b[0m\u001b[90m # Scenario: Throwing exception on broken puzzles\u001b[0m

24 scenarios (\u001b[31m1 failed\u001b[0m, \u001b[36m1 skipped\u001b[0m, \u001b[32m22 passed\u001b[0m)
109 steps (\u001b[31m1 failed\u001b[0m, \u001b[36m7 skipped\u001b[0m, \u001b[32m101 passed\u001b[0m)
0m7.741s
Coverage report generated for Cucumber Features, Unit Tests to /home/r/repo/coverage. 301 / 306 LOC (98.37%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
container 55a39e6ce6ccf86ac04dfc8fc1adfa18f08d3e44a90d1bd5b6892a68787ead78 is dead
Wed Jul 14 11:44:40 CEST 2021
yegor256 commented 3 years ago

@rultor merge

rultor commented 3 years ago

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

rultor commented 3 years ago

@rultor merge

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

Reading lib/pdd/rule/estimates.rb ...
Reading lib/pdd/puzzle.rb ...
Reading lib/pdd/version.rb ...
Reading lib/pdd.rb ...
Reading appveyor.yml ...
Reading assets/puzzles.xsd ...
Reading assets/puzzles.xsl ...
Reading .rubocop.yml ...
Puzzle 123-9786ef4c 30/DEV at .rubocop.yml
Reading .gitignore ...
Reading pdd.gemspec ...
Reading Gemfile.lock ...
Reading features/rake.feature ...
Reading features/support/env.rb ...
Reading features/gem_package.feature ...
Reading features/step_definitions/steps.rb ...
Reading bin/pdd ...
Reading .gitattributes ...
+ LC_ALL=US-ASCII
+ bundle exec rake
/home/r/.ruby/gems/minitest-5.5.0/lib/minitest/assertions.rb:413: warning: mismatched indentations at 'ensure' with 'begin' at 404
/home/r/.ruby/gems/minitest-5.5.0/lib/minitest/assertions.rb:452: warning: mismatched indentations at 'ensure' with 'begin' at 437
Run options: --seed 48118

# Running:

\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[31mERROR\u001b[0m: Puzzle a.txt:1-1 has an estimate of 0 minutes, which is lower than 30 minutes
\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[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[0mNOT IMPLEMENTED
\u001b[32m.\u001b[0m

Finished in 0.516052s, 89.1384 runs/s, 205.4059 assertions/s.

46 runs, 106 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for Unit Tests to /home/r/repo/coverage. 304 / 309 LOC (98.38%) covered.
/usr/local/rvm/rubies/ruby-2.6.0/bin/ruby -S bundle exec cucumber features --format progress
Using the default profile...
\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[31mERROR\u001b[0m: there are 2 duplicate(s) of the same puzzle: Sample.java:3-3, Sample.java:4-4, while maximum 1 duplicate is allowed
\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[31mF\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[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[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[36m-\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m/tmp/test20210714-10900-1lkluok/pdd/lib/pdd/version.rb:26: warning: already initialized constant PDD::VERSION
/home/r/repo/lib/pdd/version.rb:26: warning: previous definition of VERSION was here
\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[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/tmp/test20210714-10900-ez8jd1/pdd/lib/pdd/version.rb:26: warning: already initialized constant PDD::VERSION
/home/r/repo/lib/pdd/version.rb:26: warning: previous definition of VERSION was here
\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[31m(::) failed steps (::)\u001b[0m

\u001b[31mPDD failed but exception doesn't contain "puzzle at line #6": Sample.java; Sample.java:6 Space expected at 7:5; make sure all lines in the puzzle body have a single leading space. (RuntimeError)\u001b[0m
\u001b[31m/home/r/repo/features/step_definitions/steps.rb:69:in `rescue in block in <top (required)>'\u001b[0m
\u001b[31m/home/r/repo/features/step_definitions/steps.rb:64:in `/^I run pdd it fails with "([^"]*)"$/'\u001b[0m
\u001b[31mfeatures/catches_broken_puzzles.feature:24:in `When I run pdd it fails with "puzzle at line #6"'\u001b[0m

\u001b[31mFailing Scenarios:\u001b[0m
\u001b[31mcucumber features/catches_broken_puzzles.feature:6\u001b[0m\u001b[90m # Scenario: Throwing exception on broken puzzles\u001b[0m

24 scenarios (\u001b[31m1 failed\u001b[0m, \u001b[36m1 skipped\u001b[0m, \u001b[32m22 passed\u001b[0m)
109 steps (\u001b[31m1 failed\u001b[0m, \u001b[36m7 skipped\u001b[0m, \u001b[32m101 passed\u001b[0m)
0m7.930s
Coverage report generated for Cucumber Features, Unit Tests to /home/r/repo/coverage. 304 / 309 LOC (98.38%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
container 175f98c821d34372d2ff1a7f71b90f100dcc7ea0c80fdaa1c02dd449e103eb63 is dead
Wed Jul 14 11:55:58 CEST 2021
mbao01 commented 3 years ago

@yegor256 I fixed the feature that failed, please review

yegor256 commented 3 years ago

@rultor merge

rultor commented 3 years ago

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

rultor commented 3 years ago

@rultor merge

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

yegor256 commented 3 years ago

@mbao01 thanks!