Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdd does not recognize my puzzle #96

Closed
nikolausm opened this issue Apr 2, 2018 · 12 comments · Fixed by #162
Closed

pdd does not recognize my puzzle #96

nikolausm opened this issue Apr 2, 2018 · 12 comments · Fixed by #162

Comments

@nikolausm
Copy link

nikolausm commented Apr 2, 2018

// @todo #3 This should a developed as a small service.

which refers to Ticked: HSHighStake/partner-dashboard#3

This sends me an email with the following content:

I wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard && pdd -v -f /tmp/pdd.xml20180402-7852-6pfrh7 [1]: bash: warning: setlocale: LC_ALL: cannot change locale (UTF-8) + set -e + set -o pipefail + cd...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard && pdd -v -f /tmp/pdd.xml20180402-7852-6pfrh7 [1]:
bash: warning: setlocale: LC_ALL: cannot change locale (UTF-8)
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard
+ pdd -v -f /tmp/pdd.xml20180402-7852-6pfrh7

My version is 0.20.3
Ruby version is 2.3.3 at x86_64-linux
Reading /tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard
55 file(s) found, 121 excluded
/tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard/src/favicon.ico is a binary file (5430 bytes)
/tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard/src/app/hs-salary-summay/hs-salary-summay.component.css is a binary file (0 bytes)
/tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard/src/app/app.component.css is a binary file (0 bytes)
/tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard/src/app/hs-salary-formular/hs-salary-formular.component.css is a binary file (0 bytes)
/tmp/0pdd20180401-4-piwsdn/HSHighStake/partner-dashboard/src/assets/.gitkeep is a binary file (0 bytes)
Reading README.md...
Reading .gitignore...
Reading tslint.json...
Reading src/index.html...
Reading src/test.ts...
Reading src/app/hs-salary-summay/hs-salary-summay.component.html...
Reading src/app/hs-salary-summay/hs-salary-summay.component.ts...
Reading src/app/hs-salary-summay/hs-salary-summay.component.spec.ts...
Reading src/app/app.component.ts...
Reading src/app/app.component.spec.ts...
Reading src/app/app.component.html...
Reading src/app/app.module.ts...
Reading src/app/hs-salary-formular/hs-salary-formular.component.spec.ts...
Reading src/app/hs-salary-formular/hs-salary-formular.component.html...
Reading src/app/hs-salary-formular/hs-salary-formular.component.ts...
Puzzle 3-75b80ec9 0/DEV at src/app/hs-salary-formular/hs-salary-formular.component.ts
Puzzle 3-336cbffa 0/DEV at src/app/hs-salary-formular/hs-salary-formular.component.ts
Reading src/app/hs-profits-calculator.service.spec.ts...
Reading src/app/hs-piechart/hs-piechart.component.ts...
Reading src/app/hs-piechart/hs-piechart.component.spec.ts...
Reading src/app/hs-piechart/hs-piechart.component.html...
Reading src/app/hs-piechart/hs-piechart.component.css...
Reading src/app/hs-profits-calculator.service.ts...
Reading src/environments/environment.prod.ts...
Reading src/environments/environment.ts...
Reading src/tsconfig.spec.json...
Reading src/tsconfig.app.json...
Reading src/typings.d.ts...
Reading src/models/dto/facts.ts...
Reading src/models/dto/fc-piechart.ts...
Reading src/models/dto/chart-data.ts...
Reading src/models/dto/fact.ts...
Reading src/models/dto/facts-with-date.ts...
Reading src/models/dto/fact-with-date.ts...
Reading src/models/dto/hs-profits-calculator-data.ts...
ERROR: src/models/dto/hs-profits-calculator-data.ts; puzzle at line #29; Space expected at 30:5; make sure all lines in the puzzle body have a single leading space.. 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/yegor256/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/yegor256/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:66:in `rescue in xml'
/app/objects/git_repo.rb:63:in `xml'
/app/objects/puzzles.rb:36:in `deploy'
/app/objects/job.rb:38:in `proceed'
/app/objects/job_starred.rb:33:in `proceed'
/app/objects/job_recorded.rb:32:in `proceed'
/app/objects/job_emailed.rb:35:in `proceed'
/app/objects/job_commiterrors.rb:36:in `proceed'
/app/objects/job_detached.rb:49:in `block in exclusive'
/app/vendor/ruby-2.3.3/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
/app/vendor/ruby-2.3.3/lib/ruby/2.3.0/timeout.rb:33:in `block in catch'
/app/vendor/ruby-2.3.3/lib/ruby/2.3.0/timeout.rb:33:in `catch'
/app/vendor/ruby-2.3.3/lib/ruby/2.3.0/timeout.rb:33:in `catch'
/app/vendor/ruby-2.3.3/lib/ruby/2.3.0/timeout.rb:106:in `timeout'
/app/objects/job_detached.rb:47:in `exclusive'
/app/objects/job_detached.rb:37:in `block in proceed'
/app/objects/job_detached.rb:37:in `fork'
/app/objects/job_detached.rb:37:in `proceed'
/app/0pdd.rb:340:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1634:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1634:in `block in compile!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:992:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1011:in `route_eval'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:992:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1039:in `block in process_route'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1037:in `catch'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1037:in `process_route'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:990:in `block in route!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:989:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:989:in `route!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1096:in `block in dispatch!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `block in invoke'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `catch'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `invoke'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1093:in `dispatch!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:924:in `block in call!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `block in invoke'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `catch'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `invoke'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:924:in `call!'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:913:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/xss_header.rb:18:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/path_traversal.rb:16:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/json_csrf.rb:26:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/frame_options.rb:31:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/logger.rb:15:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/common_logger.rb:33:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:231:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:224:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/method_override.rb:22:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:194:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1957:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1501:in `block in call'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1728:in `synchronize'
/app/vendor/bundle/ruby/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1501:in `call'
/app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.4/lib/rack/handler/webrick.rb:86:in `service'
/app/vendor/ruby-2.3.3/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
/app/vendor/ruby-2.3.3/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
/app/vendor/ruby-2.3.3/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
@0crat
Copy link
Collaborator

0crat commented Apr 2, 2018

@yegor256/z please, pay attention to this issue

@0crat
Copy link
Collaborator

0crat commented Apr 2, 2018

@nikolausm/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

@yegor256
Copy link
Member

yegor256 commented Apr 2, 2018

@nikolausm please, show the full text. What do you have before the puzzle and after?

@nikolausm
Copy link
Author

nikolausm commented Apr 2, 2018

As requested, the second todo i‘ve added afterwards:

import { Component, OnInit } from '@angular/core';
import { FormsModule } from '@angular/forms';

@Component({
  selector: 'app-hs-salary-formular',
  templateUrl: './hs-salary-formular.component.html',
  styleUrls: ['./hs-salary-formular.component.css']
})
export class HsSalaryFormularComponent {
  technologies;
  types;

  // @todo #3 This should a developed as a small service.
  // @todo #3 Whats the problem!
  constructor() {
    this.types = [
      {
        label: 'Frontend',
        id: 'frontend'
      },
      {
        label: 'Backend',
        id: 'backend'
      },
      {
        label: 'Fullstack',
        id: 'fullstack'
      }
    ];
    this.technologies = [
      {
        label: 'C#',
        id: 'c_sharp'
      },
      {
        label: 'Java',
        id: 'java'
      }
    ];
  }
}

@yegor256 yegor256 added the bug label Jul 3, 2019
@0crat 0crat added the scope label Jul 3, 2019
@0crat
Copy link
Collaborator

0crat commented Jul 3, 2019

Job #96 is now in scope, role is DEV

@0crat
Copy link
Collaborator

0crat commented Jul 3, 2019

Thanks for your contribution, @nikolausm/z! If you would be a member of the project, you would now earn +15 reputation points, as explained in §29. You can join and apply to it, see §2.

@mbao01
Copy link
Contributor

mbao01 commented Jul 6, 2021

Thanks for submitting this issue @nikolausm. I cannot replicate this issue because puzzles were generated successfully. This issue seems to have been fixed.
If you still have this problem, please reopen this issue.

Screenshot 2021-07-06 at 23 45 16

Please close this issue @yegor256

@firedev
Copy link

firedev commented Jul 11, 2021

Here is another case:

$ cat > bug
    # TODO: #85 Make custom callbacks
    # TODO: #85 Check alert messages
    # TODO: #85 Refactor methods

$ pdd 
ERROR: bug; puzzle at line #1; Space expected at 2:6; make sure all lines in the puzzle body have a single leading space.

Expected: It would be great to have 3 issues created.

@yegor256
Copy link
Member

@mbao01 what do you think?

@firedev
Copy link

firedev commented Jul 11, 2021

Okay maybe the example above is a little bit too much, after all we can add new lines and this is what I did. But indented lines after the first comment are being removed by standardrb and rubocop.

Here is a proposal. Treat non-interrupted comment blocks starting with a marker as issues until the first empty line or the beginning of the next code block:

# TODO: #1 Issue title
#
# ^ if you need an empty line for aesthetics
#
# Everything here is added as
# an issue body
#
# ... still the issue body

# This comment is left in the code
def hello

@mbao01
Copy link
Contributor

mbao01 commented Jul 11, 2021

Here is another case:

$ cat > bug
    # TODO: #85 Make custom callbacks
    # TODO: #85 Check alert messages
    # TODO: #85 Refactor methods

$ pdd 
ERROR: bug; puzzle at line #1; Space expected at 2:6; make sure all lines in the puzzle body have a single leading space.

Expected: It would be great to have 3 issues created.

Hi @firedev thanks for catching this. Looks like an issue with the TODO: marker. The issue does not happen with the @todo marker. I will take a look at the problem with TODO: marker. Thank you

Works as expected ✅

# @todo #85 Make custom callbacks
# @todo #85 Check alert messages
# @todo #85 Refactor methods

@mbao01
Copy link
Contributor

mbao01 commented Jul 11, 2021

Okay maybe the example above is a little bit too much, after all we can add new lines and this is what I did. But indented lines after the first comment are being removed by standardrb and rubocop.

Here is a proposal. Treat non-interrupted comment blocks starting with a marker as issues until the first empty line or the beginning of the next code block:

# TODO: #1 Issue title
#
# ^ if you need an empty line for aesthetics
#
# Everything here is added as
# an issue body
#
# ... still the issue body

# This comment is left in the code
def hello

Nice @firedev , this is a good proposal! Is it possible for you to create a new issue for this proposal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants