primordic/IssueDupesLite huggingface dataset:
Repository: presidentbeef/brakeman

Issue #664: Brakeman does not catch lack of protect_from_forgery in Rails engines
Created: 2015-06-16T15:39:07Z
It looks like the CheckForgerySetting will only check ApplicationController[1]. This becomes an issue when running the test against a Rails engine as the rails engine generator will throw the ApplicationController into a namespace (i.e. Foobar::ApplicationController) which the check will be unable to find. With help from @jjarmoc, we came up with putting the entire check into a block that grabs all ApplicationControllers via a regex:
  def run_check
    tracker.controllers.keys.select{|key| key =~ /.*ApplicationController/ }.each do |controller_key|
      app_controller = tracker.controllers[controller_key]

      return unless ancestor? app_controller, :"ActionController::Base"
      ...
This should catch CSRF when running brakeman against the Rails engine itself, however it becomes more complicated when attempting to find it in Rails engines that are in other Rails applications. It looks like engines used to be generated in the engines/ directory, but when following the documentation[2], the engine just shows up in the root as a directory with whatever name you give it. A possible way to detect this is via the routes file where AFAIK is how you tell Rails you want to use the engine using something like mount Blorgh::Engine => "/blorgh". This should tell you the Rails engines being used but I'm not sure how you would differentiate between a Rails engine that's a part of the source and a Rails engine that's coming from a gem. Maybe checking for the blorgh directory in the root and if it's not there assume it's coming from a gem?
[1] 
  
    
      brakeman/lib/brakeman/checks/check_forgery_setting.rb
    
    
         Line 13
      in
      a3dab55
    
  
  
    

        
          
           app_controller = tracker.controllers[:ApplicationController] 
        
    
  


[2] http://guides.rubyonrails.org/engines.html#generating-an-engine

Duplicate issue #848: CheckForgerySetting Skips Controllers
Created: 2016-03-31T14:10:08Z
Currently brakeman only performs protect_from_forgery checks in the ApplicationController. While this is sufficient for most cases, it fails to catch controllers that also inherit from ActionController::Base but use a different name. Like for example BaseController or AdminController. See https://github.com/typus/typus/blob/master/app/controllers/admin/base_controller.rb#L1 and https://github.com/spree/spree/blob/148bcaf1e44081f940248d94d3aa6c5e95bb4fe2/api/app/controllers/spree/api/base_controller.rb#L5.
This commit was recently added to typus to turn on CSRF protection. This shows that brakeman shouldn't just simply restrict itself to ApplicationControllers.

Closing comment (2016-03-31T23:26:19Z): Agree, related to #664.
Repository: presidentbeef/brakeman

Issue #967: Warn about using secure_compare to validate equality of tokens
Created: 2016-11-28T21:44:37Z
organization.badge_token == params[:token]

should generate a:
Confidence: Medium
Category: Timing attack
Message: Use Rack::Utils.secure_compare to avoid timing attack on token comparisson
Code: organization.badge_token == params[:token]
File: app/controllers/foobar_controller.rb
Line: 28

/cc @cericksen @jcheatham

Duplicate issue #1127: Consider warning on token, password checks that look vulnerable to timing attacks
Created: 2017-12-01T10:56:11Z
This is proposing a check in Brakeman that could detect and warn on code that smells like it might be vulnerable to a timing attack that reveals a secret.
One pattern that would detect some vulnerable code seen in the wild:

its usually in controllers or in a routes file (or anywhere a rack auth middleware might be setup, like config.ru), including apps that have split up routes into multiple files
in those files, search for lines matching regex /(token|password).*==.*(token|password)/i (needs work in case one side of == operator doesn't contain token or password (also look for user|username??)

And the output message might suggest using one of:
Rails 5.2+
ActiveSupport::SecurityUtils.secure_compare(a, b)
Rails 4.1-5.1
ActiveSupport::SecurityUtils.variable_size_secure_compare(a, b) && a == b
Related:

Why && a == b? rails/rails@f76ca45
Relevant changes to SecurityUtils for Rails 5.2: https://github.com/rails/rails/pull/24510/files

Closing comment (2017-12-06T05:05:35Z): Same as #967
Why would that be in the routes file? 🤔
Repository: presidentbeef/brakeman

Issue #876: prevent like injection
Created: 2016-05-11T17:13:34Z
would be great if brakeman could warn about values being passed into like queries without being sanitized. Which is a DOS attack on the database since that can make the query very complex.
Bad:
scope :search, ->(query) { where("name like ?", "#{query}%") }
Good:
scope :search, ->(query) { where("name like ?", "#{ActiveRecord::Base.send(:sanitize_sql_like, query)}%") }

Duplicate issue #1428: False negative: 'name LIKE ?', params[:name]
Created: 2019-11-11T12:55:24Z
Background
Brakeman version: 3.5.0
Rails version: 4.2.11.1
Ruby version: 2.4.6
False negative
The follow code is not show as a warning on Brakeman.
  paginate(current_scope.organizations.where("name LIKE ?", "#{params[:name]}%"))
I believe it should be suggested to use sanitize_sql_like to prevent problems, for example, if an organization includes '%' in their name.
Thank you!

Closing comment (2019-11-11T16:54:39Z): Same as #876
The tricky part here is that it requires parsing the string, finding LIKE ?s, and matching them up with the parameters. Then checking if the parameter is dangerous.
Repository: presidentbeef/brakeman

Issue #1173: Parse Error on ruby 2.5
Created: 2018-03-27T01:26:44Z
Background
Brakeman version: 4.2.1
Rails version: 5.1.5
Ruby version: 2.5.0p0
Parse Error
== Errors ==

Error: /Users/shim.taewon/Documents/Zodiac-backend/lib/excel_importer/model_transactable.rb:9 :: parse error on value ["rescue", 9] (kRESCUE)
Location: Could not parse /Users/shim.taewon/Documents/Zodiac-backend/lib/excel_importer/model_transactable.rb

$ ruby -c lib/excel_importer/model_transactable.rb
Syntax OK

Minimal example that does not parse:
    def save_models
      models_with_index do |model, index|
        model.save!
      rescue StandardError => err
        error(model, index, err)
      end
    end
Maybe you need to update ruby parser.

Duplicate issue #1298: Parse Error on `rescue` within block
Created: 2019-01-03T15:02:51Z
Background
Brakeman version: 4.3.1
Rails version: 5.2.2
Ruby version: 2.5.1
Link to Rails application code: (see simple example below)
Parse Error
parse error on value ["rescue", 6] (kRESCUE)
Location: Could not parse {project}/app/controllers/test_controller.rb

Minimal example that does not parse:
class TestController < ApplicationController
  def index
    array_of_stuff.each do |element|
      do_an_error_prone_thing_with(element)
    rescue ActiveRecord::RecordNotFound
      next
    end
  end
end
Ruby 2.5.0 supports rescue directly within do blocks, without an explicit call to begin. The above code, however, fails with a parsing error. I've checked this with ruby_parse and no errors were thrown.
Updating the code to explicitly define a begin and end with the rescue resolves the error in brakeman:
class TestController < ApplicationController
  def index
    array_of_stuff.each do |element|
      begin
        do_an_error_prone_thing_with(element)
      rescue ActiveRecord::RecordNotFound
        next
      end
    end
  end
end

Closing comment (2019-01-03T22:41:26Z): Hi @chrisdurheim,
This is a duplicate of #1173.
Thanks!
Repository: prettier/plugin-php

Issue #252: Comment missing in while loop
Created: 2018-03-25T21:15:11Z
I think I'm on the tip of master (speaking of which, is there any playground for testing)?
When I try to run prettier on the follow code
<?php

for ($i  = 0; $i < 10; $i++) {
    while ($row = $result->nextRow()) {
        // A comment
    }
}
I get the error Error: Comment "// A comment" was not printed. Please report this error!.
This was a minimal(ish) reproduction of the problem.

Duplicate issue #257: Inline comments on closing braces
Created: 2018-03-28T17:59:16Z
We're actually getting these out of our code base, but we have some inline comments on closing braces, and this seems to cause some wonkiness (although no breaking changes).  Some examples:
Input:
<?php
class test {
    public function method_with_hanging_commment() {

    } // a comment

    /**
     * Docblock
     */
    public function another_method() {
    }
}

Output
<?php
class test
{
    public function method_with_hanging_commment()
    {

    }

    /** // a comment
     * Docblock
     */
    public function another_method()
    {

    }
}

Input:
<?php
if (true) {

} // a comment

if (false) {

}

Output:
<?php
if (true) {

}

if (false) { // a comment
}

Input:
<?php
if (true) {

} // a comment

// another comment
if (false) {

}

Output:
<?php
if (true) {

}

// another comment // a comment
if (false) {

}

Closing comment (2018-03-28T21:37:33Z): This seems somewhat related to #252 (comment) maybe? Happy to close my other issue and merge it into this one if you'd like.
Repository: prettier/plugin-php

Issue #1439: Null coalesce operator getting too verbose sometimes
Created: 2020-05-23T11:27:06Z
@prettier/plugin-php@0.14.1
prettier@2.0.5

Options
### General
trailingComma: all
printWidth: 80
tabWidth: 4
useTabs: false
singleQuote: true
requirePragma: false
insertPragma: false

### JavaScript
semi: false

### VueJS
vueIndentScriptAndStyle: true

### PHP
phpVersion: "7.4"
trailingCommaPHP: true
braceStyle: psr-2
Input:
return $data['template_name'] ?? $data['templateName'] ?? $this->templateName ?? $this->template_name ?? null;
Output:
return $data['template_name'] ??
    ($data['templateName'] ??
        ($this->templateName ?? ($this->template_name ?? null)));
Expected behavior:
return $data['template_name'] 
    ?? $data['templateName']
    ?? $this->templateName 
    ?? $this->template_name 
    ?? null;

Duplicate issue #1412: No need to enclose single calls in parenthesis
Created: 2020-05-03T10:10:51Z
Versions:
├─ @prettier/plugin-php@0.14.0
│  ├─ prettier@^1.18.2
│  ├─ prettier@1.19.1
├─ prettier@2.0.5
Options
### General
trailingComma: all
printWidth: 80
tabWidth: 4
useTabs: false
singleQuote: true
requirePragma: false
insertPragma: false

### JavaScript
semi: false

### VueJS
vueIndentScriptAndStyle: true

### PHP
phpVersion: "7.4"
trailingCommaPHP: true
braceStyle: psr-2
Input:
public function __call($name, $arguments)
{
    return $this->__callTransformMethod($name, $arguments) ?? $this->__callGetMethod($name, $arguments) ?? $this->__callSetMethod($name, $arguments) ?? $this->__forwardCall($name, $arguments);
}
Output
public function __call($name, $arguments)
{
    return $this->__callTransformMethod($name, $arguments) ??
        ($this->__callGetMethod($name, $arguments) ??
            ($this->__callSetMethod($name, $arguments) ??
                $this->__forwardCall($name, $arguments)));
}
Would be nice to show things this way:
    public function __call($name, $arguments)
    {
        return $this->__callTransformMethod($name, $arguments) ??
               $this->__callGetMethod($name, $arguments) ??
               $this->__callSetMethod($name, $arguments) ??
               $this->__forwardCall($name, $arguments);
    }

Closing comment (2020-05-28T07:48:18Z): I'll close this as a duplicate of #1439 😉
Repository: prettier/plugin-php

Issue #18: @prettier/plugin-php not found in the registry
Created: 2018-01-24T12:05:36Z
Right now, the name of the npm lib is @prettier/php.
Thank you for your work!

Duplicate issue #50: Installation package not found
Created: 2018-02-17T01:39:40Z
yarn add --dev --exact @prettier/plugin-php
yarn add v1.3.2
[1/4] 🔍  Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@prettier%2fplugin-php: Not found".

Closing comment (2018-02-17T02:20:11Z): Duplicate of #18
Repository: prettier/plugin-php

Issue #298: Quote escaping removed
Created: 2018-04-01T18:41:30Z
Input:
$test = "\"$commandName\"";
Output:
$test = ""$commandName"";

Duplicate issue #322: Escaped double-quotes become unescaped
Created: 2018-04-03T14:24:03Z
PHP: 7.0
Node: 9
prettier-php: 26c6262
prettier: d676188
Input:
class Extensible_Walker_Nav_Menu extends \Walker_Nav_Menu
{
	public function start_lvl(&$output, $depth = 0, $args = []) 
    {
		$indent = str_repeat("\t", $depth);
		$output .= "\n$indent<ul class=\"sub-menu\">\n";
    }
}
Output:
class Extensible_Walker_Nav_Menu extends \Walker_Nav_Menu
{
	public function start_lvl(&$output, $depth = 0, $args = [])
	{
		$indent = str_repeat("\t", $depth);
		$output .= "\n$indent<ul class="sub-menu">\n";
	}
}
The escaped quotes in class=\"sub-menu\" are un-escaped in the output, which makes it invalid PHP.
(On the bright side, the \n are retained, so that's nice. 😄)

Closing comment (2018-04-03T14:25:54Z): Possible duplicate of #298
Repository: prettier/plugin-php

Issue #2409: Parentheses incorrectly removed from functions defined and called on the same line
Created: 2024-11-26T20:16:59Z
This code, which recursively computes the 10th Fibonacci number:
$result = ($fib = function($n) use (&$fib) {
    return $n <= 1 ? $n : $fib($n - 1) + $fib($n - 2);
})(10);
is incorrectly simplified to this:
$result = $fib = function ($n) use (&$fib) {
    return $n <= 1 ? $n : $fib($n - 1) + $fib($n - 2);
}(10);
removing the parentheses leads to incorrect code.

Duplicate issue #2333: Invoked import/require callable removes necessary parentheses
Created: 2024-02-22T08:15:52Z
An imported or required file returning a callable value cannot be immediately invoked as Prettier is stripping the surrounding parentheses.
(The below example assumes file.php contains e.g. <?php return function() { echo 'Hello world'; };)
@prettier/plugin-php v0.22.2
Playground link
Input:
<?php
(include 'file.php')();
(require 'file.php')();
Output:
<?php
include "file.php"();
require "file.php"();
Expected behavior:
<?php
(include 'file.php')();
(require 'file.php')();

Closing comment (2024-11-26T20:15:37Z): Possibly related to #2409
Repository: prettier/plugin-php

Issue #1942: Enum reserved word even for php<8.1
Created: 2022-03-07T23:24:30Z
PHP Plugin 0.18.2
Config:
phpVersion: '7.4'
OR any other version of php below 8.1, such as 8.0
Input:
<?php
use Name\Space\Enum;
OR
<?php
class Enum {}
Output:
Parse Error : syntax error, unexpected 'Enum' (T_ENUM), expecting ';'

OR
Parse Error : syntax error, unexpected 'Enum' (T_ENUM), expecting T_STRING

Expected behavior:
No parse error as Enum isn't a reserved word in php <8.1.
I understand that this might be an error with php-parser, but I thought it might also be plugin-php not telling php-parser the php version correctly, and I don't have an environment set up to test which is the case, so I reported it here because I'm experiencing it when using plugin-php.

Duplicate issue #1960: Enum in namespace causes error
Created: 2022-03-31T15:08:27Z
@prettier/plugin-php v0.18.4
Playground link
Input:
<?php

namespace App\Enum;

enum Foo {}
Output:
Parse Error : syntax error, unexpected 'Enum' (T_ENUM) on line 3

  1 | <?php
  2 |
> 3 | namespace App\Enum;
    |              ^
  4 |
  5 | enum Foo {}

Closing comment (2022-03-31T19:21:38Z): Duplicate of #1942
Repository: prettier/plugin-php

Issue #1222: prettier-ignore breaking the ignored line
Created: 2019-11-15T19:50:07Z
@prettier/plugin-php v0.11.2
Playground link
Input:
<?php

namespace App;

class Carousel extends Model
{
    protected $table = 'carousels';

    // prettier-ignore
    protected $fillable = [
        'status_id',
        'type',
        'image_path',
        'alt_text',
        'url',
        'begin_datetime',
        'end_datetime',
    ];

    protected $casts = [
        'begin_datetime' => 'datetime',
        'end_datetime' => 'datetime',
    ];
}
Output:
<?php

namespace App;

class Carousel extends Model
{
    protected $table = 'carousels';

    // prettier-ignore
    $fillable = [
        'status_id',
        'type',
        'image_path',
        'alt_text',
        'url',
        'begin_datetime',
        'end_datetime',
    ]

    protected $casts = [
        'begin_datetime' => 'datetime',
        'end_datetime' => 'datetime'
    ];
}

Duplicate issue #1194: Bug: prettier-ignore-start -> end around class const
Created: 2019-10-07T19:00:54Z
@prettier/plugin-php v0.11.2
Playground link
Input:
<?php


class A
{
    // prettier-ignore-start
    const UNLIMITEDPLAN     = 1;
    const TRIALPLAN         = 2;
    const LOWUSAGEPLAN      = 3;
    const MEDIUMUSAGEPLAN   = 4;
    const LARGEUSAGEPLAN    = 5;
    // prettier-ignore-end
}
Output:
<?php

class A
{
    // prettier-ignore-start
    UNLIMITEDPLAN     = 1
    const TRIALPLAN = 2;
    const LOWUSAGEPLAN = 3;
    const MEDIUMUSAGEPLAN = 4;
    LARGEUSAGEPLAN    = 5
    // prettier-ignore-end
}

Closing comment (2020-07-29T13:07:23Z): I'll close this as a duplicate of #1222.
Repository: prettier/plugin-php

Issue #1402: PHP file with // prettier-ignore on method call with comments between params - Error: Comment "// Some comment" was not printed. Please report this error!
Created: 2020-04-24T14:01:29Z
@prettier/plugin-php v0.14.0
Playground link
Input:
<?php

class PHPClass {


    public function someMethod() {
        // prettier-ignore
        $this->anotherMethod(
            // Some comment 1
            "A param 1",
                // Some comment 2 indented
                "Indented param 2",
                // Some comment 3
                "Indented param 3"
        );

        $a =      "Some value";
    }
}
Output:
Comment "// Some comment 1" was not printed. Please report this error!
Expected output:
<?php

class PHPClass
{
    public function someMethod()
    {
        // prettier-ignore
        $this->anotherMethod(
            // Some comment 1
            "A param 1",
                // Some comment 2 indented
                "Indented param 2",
                // Some comment 3
                "Indented param 3"
        );

        $a = "Some value";
    }
}

Duplicate issue #1193: Bug: comment in prettier-ignore node doesn't print
Created: 2019-10-07T18:37:43Z
@prettier/plugin-php v0.11.2
Playground link
Input:
<?php

// prettier-ignore
$a = [
    //  test
];
Output:
Comment "//  test" was not printed. Please report this error!

Closing comment (2020-07-29T13:06:52Z): I'll go ahead and close this as a duplicate of #1402.
Repository: prettier/plugin-ruby

Issue #370: Comments
Created: 2019-08-06T14:43:17Z
Currently, comment handling is done through the wrong abstraction and needs to be refactored. We currently use the ripper lexer state to determine which comment node to attach to, and then have comments printed out generically in the main printer. This results in massive amounts of weird errors.
For examples, see #100, #128, #149, #150, #175, #176, #177, #238, #274, #294, #332, #341, #343, #353, #391, #405, #408, #558, #564, #565, #571, #572, #576.
All of these can be fixed by attaching comments after the nodes have been built. The basic flow is going to be to parse out the comments but not attach them directly to the nodes. Instead to make a big list of them and attach them appropriately afterward. This is going to involve going through a ton of different examples and checking them by hand. For now, I'm going to close all of those issues in favor of tracking everything here.

Duplicate issue #564: "while" block incorrectly transformed into a single comment
Created: 2020-05-20T04:48:38Z
Metadata

Ruby version: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
@prettier/plugin-ruby version: 0.18.2 + prettier 2.0.5

Input
while
  # foo
  puts "bar"
end
Output
jareds-mbp:ruby-prettier-test jared$ bundle exec rbprettier test1.rb
# foo while puts 'bar'

Closing comment (2020-05-20T04:58:32Z): Maybe a duplicate of #370
Repository: prettier/plugin-ruby

Issue #370: Comments
Created: 2019-08-06T14:43:17Z
Currently, comment handling is done through the wrong abstraction and needs to be refactored. We currently use the ripper lexer state to determine which comment node to attach to, and then have comments printed out generically in the main printer. This results in massive amounts of weird errors.
For examples, see #100, #128, #149, #150, #175, #176, #177, #238, #274, #294, #332, #341, #343, #353, #391, #405, #408, #558, #564, #565, #571, #572, #576.
All of these can be fixed by attaching comments after the nodes have been built. The basic flow is going to be to parse out the comments but not attach them directly to the nodes. Instead to make a big list of them and attach them appropriately afterward. This is going to involve going through a ton of different examples and checking them by hand. For now, I'm going to close all of those issues in favor of tracking everything here.

Duplicate issue #497: comment are moved after if
Created: 2020-03-14T13:56:13Z
Metadata

Ruby version: 2.6.4
@prettier/plugin-ruby version: 0.17.0

Input
add_callback :start_binary do |node|
  # Consider anything used in an expression like "A or B" as used
  if %w[&& || and or].include?(node[2].to_s)
     test
   end
end
Current output
add_callback :start_binary do |node|
  if # Consider anything used in an expression like "A or B" as used
     %w[&& || and or].include?(node[2].to_s)
    test
  end
end
Expected output
add_callback :start_binary do |node|
  # Consider anything used in an expression like "A or B" as used
  if %w[&& || and or].include?(node[2].to_s)
     test
   end
end

Closing comment (2020-04-05T14:31:36Z): Thanks! This is part of the problem that's going to be addressed by the better-comments branch which is tracked in #370, so I'm going to close this in favor of that.
Repository: prettier/plugin-ruby

Issue #242: error when using string to symbol hash key
Created: 2019-04-08T12:00:45Z
Metadata

Ruby version: ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin17]
@prettier/plugin-ruby version: 0.10.0

Input
{ 'a': 1 }
Current output
[error] a.rb: TypeError: Cannot read property 'type' of undefined
[error]     at propagateBreaksOnEnterFn (prettier/bin-prettier.js:12581:13)
[error]     at traverseDoc (prettier/bin-prettier.js:12439:11)
[error]     at Object.propagateBreaks (prettier/bin-prettier.js:12606:3)
[error]     at printAstToDoc (prettier/bin-prettier.js:13560:14)
[error]     at coreFormat (prettier/bin-prettier.js:13871:16)
[error]     at format (prettier/bin-prettier.js:14117:73)
[error]     at formatWithCursor (prettier/bin-prettier.js:14133:12)
[error]     at Object.formatWithCursor (prettier/bin-prettier.js:42401:15)
[error]     at format$1 (prettier/bin-prettier.js:43770:21)
[error]     at prettier/bin-prettier.js:43965:16
Expected output
{ a: 1 }
# or 'a': 1 as what's most likely is that I couldn't use a: 1 when the `a` in question, e.g. `$a`

Duplicate issue #252: Parser cannot handle symbols in a hash if surrounded with quotes
Created: 2019-04-11T18:39:22Z
I have some code that was failing the parser. I managed to reduce it to this specific case:
{ 'test': 1 }
The error is:
[error] test.rb: TypeError: Cannot read property 'type' of undefined
[error]     at propagateBreaksOnEnterFn (node_modules/prettier/bin-prettier.js:12570:13)
[error]     at traverseDoc (node_modules/prettier/bin-prettier.js:12428:11)
[error]     at Object.propagateBreaks (node_modules/prettier/bin-prettier.js:12595:3)
[error]     at printAstToDoc (node_modules/prettier/bin-prettier.js:13549:14)
[error]     at coreFormat (node_modules/prettier/bin-prettier.js:13860:16)
[error]     at format (node_modules/prettier/bin-prettier.js:14106:73)
[error]     at formatWithCursor (node_modules/prettier/bin-prettier.js:14122:12)
[error]     at Object.formatWithCursor (node_modules/prettier/bin-prettier.js:42288:15)
[error]     at format$1 (node_modules/prettier/bin-prettier.js:43844:16

The use-case for the code is to have a hash with { 'Content-Type': 'application/json' }. { :'Content-Type' => 'application/json' } works, but it doesn't follow the preferHashLabels rule correctly.

Closing comment (2019-04-11T18:52:52Z): duplicate of #242
Repository: prettier/plugin-ruby

Issue #103: single line method call without parens with inline comment
Created: 2019-02-15T10:33:12Z
Input
ignore 'abc.html' # Google
ignore 'def.html' # Facebook
Current output
ignore
ignore
Expected output
ignore 'abc.html' # Google
ignore 'def.html' # Facebook

Duplicate issue #107: Methods without parenthesis, with arity 1, and an inline comment have their arg removed
Created: 2019-02-15T14:21:19Z
Metadata

Ruby version: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
@prettier/plugin-ruby version: 0.6.0
prettier version: 1.16.4

Input
require "something" # comment
Current output
require
Expected output
require 'something' # comment

Closing comment (2019-02-15T14:23:18Z): Thanks for the report @uri. This is a dup of #103 which has been fixed. It will be released in the upcoming bug fix (0.6.1)
Repository: prettier/plugin-ruby

Issue #1071: Invalid syntax after running prettier on a block with an inline comment
Created: 2021-12-08T17:37:09Z
Metadata

Operating system: macOS
Ruby version: ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin20]
Node version: v14.17.3
@prettier/plugin-ruby or prettier gem version: @prettier/plugin-ruby@2.0.0
Options:

rubyArrayLiteral - true
rubyHashLabel - true
rubyModifier - true
rubySingleQuote - true
rubyToProc - false
trailingComma - "es5"



Input
some_block do # a comment
end
Current output
some_block { # a comment
end
Expected output
some_block do # a comment
end

Duplicate issue #1119: do/end block formatted to invalid code
Created: 2022-01-22T21:27:08Z
A do / end block with the following properties is formatted to invalid code:

multiple lines
no arguments
a comment after the do keyword

Specifically prettier replaces the do keyword with an { making the code invalid.
Below is a contrived example of this where we call Array.each without declaring any arguments in the block.
Below that is the example I actually found this in: a call to let in an RSpec test.
Metadata

Operating system: macOS
Ruby version: 3.0.3
Node version: v17.2.0
@prettier/plugin-ruby or prettier gem version: 2.0.0
Options:

Input Example 1
[3, 2, 1].each do # this comment causes the problem
  puts 'entered'
  puts 'multiline'
  puts 'block'
end
Output
[3, 2, 1].each { # this comment causes the problem
  puts 'entered'
  puts 'multiline'
  puts 'block'
end
Input Example 2
let(:val) do # some comment
  puts "running"
  42    
end
Output
let(:val) { # some comment
  puts 'running'
  42
end

Closing comment (2022-01-23T13:42:26Z): Yeah this is a duplicate of #1071, #1054, and #1042. It'll be out in the next release.
Repository: prettier/plugin-ruby

Issue #128: MOVES comments to different lines
Created: 2019-02-18T00:03:13Z
this one is weird
input
  def do_thing(*some_stuff)
    do_other_thing
    self # => to allow chaining
  end

output
 def do_thing(*some_stuff)
    do_other_thing # => to allow chaining
    self
  end

Duplicate issue #227: Comment in object toggles position
Created: 2019-03-26T16:20:35Z
Metadata

Ruby version: 2.5.1
@prettier/plugin-ruby version: 0.10.0

Input
{
  closed: board.closed,
  shortLink: "some-long-string", # some long comment that goes this long
  organizationId: board.organization_id,
}
Current output
{
  closed: board.closed,
  shortLink: "some-long-string",
  organizationId:
    # some long comment that goes this long
    board
      .organization_id,
}
Output after running a second time
{
  closed: board.closed,
  shortLink: "some-long-string", # some long comment that goes this long
  organizationId: board.organization_id,
}

Closing comment (2019-04-17T22:28:17Z): Yeah this is a dup of #128, we have some issues with inline comments inside array and hash literals.
Repository: prettier/plugin-ruby

Issue #63: Long chains of method calls should be formatted one per line
Created: 2019-02-09T22:32:23Z
Input
Person
  .select('people.id, people.name, comments.text')
  .joins(:comments)
  .where('comments.created_at > ?', 1.week.ago)
Current output
Person.select('people.id, people.name, comments.text').joins(:comments).where(
  'comments.created_at > ?', 1.week.ago
)
Expected output
Person
  .select('people.id, people.name, comments.text')
  .joins(:comments)
  .where('comments.created_at > ?', 1.week.ago)
or maybe
Person.select('people.id, people.name, comments.text')
      .joins(:comments)
      .where('comments.created_at > ?', 1.week.ago)
I’d be willing to help implement this change if we decide it’s a good idea, however I’d need a little guidance on how to go about doing that.

Duplicate issue #250: Align the chained methods to start from the first chained method indentation
Created: 2019-04-09T19:38:14Z
current:
something.long_method_long_method_long_method_long_method_long_method
  .other_method
expected:
something.long_method_long_method_long_method_long_method_long_method
                  .other_method
#240

rubocop aligns the chained methods to start of the first chained method (prettier aligns to the next indentation) - yeah this would be nice. I'd be very down for this.

Closing comment (2019-04-18T01:21:56Z): This is actually a dup of #63, so I'm going to close this one.
Repository: prikhi/pencil

Issue #225: Exported HTML file with invalid URLs
Created: 2015-03-13T07:15:18Z
From thomasse...@gmail.com on October 11, 2010 09:47:20
I just installed a fresh copy of Pencil 1.2
I installed "HTML Template with thumbnails using JQuery" to test HTML export. (Standalone)
The HTML export looked file when seen on local machine - but failed to load images when uploaded to server. (Both seen in Firefox 3.6)
When inspecting the HTML source I saw the image URLs to be incorrect:
"pages%5Cplugin_manager_plugins.png" where it should be:
"pages/plugin_manager_plugins.png"
The problem is that the forward slash / was URL encoded.
I don't know why it worked when viewed locally, but I had to clean up all URL references in order for the HTML output to properly work online.
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=225

Duplicate issue #222: Export to web generates bad pathnames in WinXP
Created: 2015-03-13T07:14:20Z
From j3and...@gmail.com on October 04, 2010 13:34:06
To reproduce:

Produce a simple project
Export using any HTML template
View source of index.html
Image paths will look like pages%5cimage.png

The path should be pages/image.png. %5c is "" and when viewed locally, the system figures out what you want. If the export is loaded to a webserver (such as mine) there is a good chance it will return 404s for the images.
Version 1.2 build 0 on WinXP SP3
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=222

Closing comment (2015-03-13T07:14:26Z): From jan.stor...@googlemail.com on June 08, 2011 08:11:43
...this is the same as #225
Repository: prikhi/pencil

Issue #602: not all text is visible when reopening a saved *.ep file 
Created: 2015-03-13T20:47:46Z
From rajwinde...@gmail.com on November 07, 2013 23:25:18
What steps will reproduce the problem? 1. Open a new project.
2. Use 'Desktop Native UI Widgets' Label, Buttons and Group edit their text (heading for Group).
3. Save file.
4. Reopen saved *.ep file.
Expected: All saved texts, shapes should be visible as when saved.
Actual: Most saved text does not show up.
Double clicking that shape/ label/ group to edit, will show the saved text and then clicking elsewhere on the sheet enables the visibility of that particular text for the rest of the session
Pencil Version 2.0.5
Windows 7 Professional SP1 64-bit
ON Dell Vostro Intel Core i3
Have been using Pencil for a week and this is a consistent error
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=602

Duplicate issue #534: table does not render properly when file re-opened
Created: 2015-03-13T11:42:16Z
From Algorith...@gmail.com on February 03, 2013 23:07:18
What steps will reproduce the problem? 1. re-open a page with a table on it
2. table displays first column heading and no data or other columns
3. double click table
4. click out of table
5. click table (now it will display properly) What is the expected output? What do you see instead? Table should render properly when file is opened What version of the product are you using? On what operating system? 2.0.3 Tested on Ubuntu 12.10 and 13.04
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=534

Closing comment (2015-06-01T00:14:01Z): OK I'm gonna close this as a dupe of #602
Repository: prikhi/pencil

Issue #742: pencil icon replace firefox icon in taskbar
Created: 2015-08-19T23:51:18Z
When pencil addon is active (but not using it), the pencil icon take place of the firefox icon in the taskbar button.
I'm using firefox 40 on Linux Mint Debian Edition 2 (a fork of Jessie)

Duplicate issue #799: Firefox icon change
Created: 2016-03-01T13:30:01Z
The icon of firefox on windows is changed when we start the module.
But If I quit, the icon don't disappear.

Closing comment (2016-03-01T13:50:58Z): I presume this issue is a duplicate of #742.
Repository: prikhi/pencil

Issue #801: Text edit save on focus change
Created: 2016-03-02T14:37:00Z
This may be a duplicate of #483, or at least related.  Let's say I drag a new table onto the page and double-click it to edit the text.  If I alt-tab or click to another application (read an email, reference a document to ensure I account for all columns, etc) the table saves in whatever state I left it.  This leaves the object in an undesirable state if I'm not actually finished with my text entry (e.g. the table column widths get messed up) and forces me to double-click again to get back to the editing I was doing.  I'd expect instead for the text editing mode to stay active until I take the action to save/close it.

Duplicate issue #804: Useability Linux: marked text in text fields prevents paste from clipboard
Created: 2016-03-11T13:27:24Z
If a textfield should be filled with clipboard contents the clipboard contents got overwritten because the text in the textfield is marked. So it's been automatically copied to clipboard.
If the textfield lost focus it closes.
Maybe this is a linux-only issue because of the special clipboard nature on X which instantly copies marked text into the clipboard.

Closing comment (2016-03-29T13:53:04Z): @Olli no, this is completely unrelated to #801, which happens on Windows and has to do with focus change.  Nothing about the clipboard at all.
Repository: prikhi/pencil

Issue #802: No editing of texts and no new shapes on new document
Created: 2016-03-10T11:34:55Z
Since update to Firefox 45.0 its not possible to edit texts or drag-n-drop new elements in an existing or new document.
I assume this is caused by the update of Firefox.

Duplicate issue #825: Cannot drag items from collections to a page in Firefox on Windows
Created: 2016-04-24T19:06:50Z
Pencil 2.0.18
Firefox 45.0.2
when i drag an item from a collection to the page, cursor just shows "do not drop" shape

Closing comment (2016-05-25T11:40:56Z): Seems this is a duplicate of #802
Repository: prikhi/pencil

Issue #602: not all text is visible when reopening a saved *.ep file 
Created: 2015-03-13T20:47:46Z
From rajwinde...@gmail.com on November 07, 2013 23:25:18
What steps will reproduce the problem? 1. Open a new project.
2. Use 'Desktop Native UI Widgets' Label, Buttons and Group edit their text (heading for Group).
3. Save file.
4. Reopen saved *.ep file.
Expected: All saved texts, shapes should be visible as when saved.
Actual: Most saved text does not show up.
Double clicking that shape/ label/ group to edit, will show the saved text and then clicking elsewhere on the sheet enables the visibility of that particular text for the rest of the session
Pencil Version 2.0.5
Windows 7 Professional SP1 64-bit
ON Dell Vostro Intel Core i3
Have been using Pencil for a week and this is a consistent error
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=602

Duplicate issue #358: wrong behavior of the export templates
Created: 2015-03-13T08:12:59Z
From peter.u...@gmail.com on November 02, 2011 06:54:57
What steps will reproduce the problem? 1.  export multipage document via lefttab, jquery, tab navigation or default html template
2. first screen is empty or the last one is there instead (the last one is then repeated in its propoer position 3. What is the expected output? What do you see instead? first page in html export displaying the first page from the app What version of the product are you using? On what operating system? FF 7.0.1
macos 10.7.2
pencil 1.3.2 (this behavior was in older versions too), no idea if the problem is the tempplate or the app, but on windows it works ok Please provide any additional information below.
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=358

Closing comment (2015-03-28T08:32:17Z): I was wrong, it's unrelated to #602 - but incidentally I found a fix while I was trying to solve #602.
Repository: prikhi/pencil

Issue #431: Can't Open .ep File in Windows 7 (64 bit)
Created: 2015-03-13T09:34:29Z
From dirkwatkins on March 29, 2012 10:58:49
What steps will reproduce the problem? 1. Double click an .ep file.
2. Pencil opens but shows an Untitled Page instead of the selected file. What is the expected output? What do you see instead? The file should open. What version of the product are you using? On what operating system? 1.3.4 Please provide any additional information below. I associated the file type (.ep) with Pencil but it didn't work.  I can use the menu (Pencil > Document > Open) to open the file.
Windows 7 Professional 64-Bit
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=431

Duplicate issue #669: Double click on .ep doc does not load the document for editing
Created: 2015-03-13T21:30:37Z
From oduestu...@gmail.com on March 10, 2015 07:31:40
What steps will reproduce the problem? 1. Windows 7, file system double click on a doc.ep document
2. Evolus pencil will be loaded but showing an "untitled page" (not doc.ep as expected)
3. To load the document you must click on "Open existing document" What is the expected output? What do you see instead? By doubleclicking on a .ep doc i expect the doc to be load in evoluspencil What version of the product are you using? On what operating system? EP Version 2.0.5 on Windows 7 Please provide any additional information below.
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=669

Closing comment (2015-03-26T18:33:46Z): is dupe of #431
Repository: prikhi/pencil

Issue #459: Dangerous Issue [ ! ]
Created: 2015-03-13T09:38:27Z
From rartdesi...@gmail.com on June 21, 2012 14:05:45
Issue found in Pencil STANDALONE version !!!
SCENARIO:
After finishing a mockup (chart flow my case), user wants to export the page as a PDF:
If user folows the procedure (Document > Export As.. > PDF ecc.) he arrives at the point when he must input the destintion:
Example: C:\Users\XUser\Desktop(chartflow.pdf)
If the USER doesn't input manually "chartflow.pdf" at the end of the browsed path the application will throw some windows fatal error causing the complete and absolute deletion of all the file. folders and who knows what other important projects (like some damn android applications you're developing for instance)...
My case, my scenario, my files !!!
Don't ask me other specific info like "what was the error message" because it all happened so fast till I realised all my projects were gone before even managing to do some backup at the end of the day.
Hope no one else got into this disgrace !!!
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=459

Duplicate issue #576: Data Loss (Desktop)
Created: 2015-03-13T19:18:23Z
From wallfo...@gmail.com on July 16, 2013 10:58:11
What steps will reproduce the problem? 1. Document > Export Document > Export to PDF > All Pages in the document
2. In the Destination field I pasted
C:\Documents and Settings\username\Desktop\Test What is the expected output? What do you see instead? 1. Expected output was PDF File. A PDF file didn't get created.
2. Instead all the files inside the folder "Test" got deleted. What version of the product are you using? On what operating system? Version: 2.0.3
Operating System: Windows XP Professional (SP 3) Please provide any additional information below. How do i recover my files which got deleted?
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=576

Closing comment (2015-08-02T05:06:52Z): I believe this is a duplicate of #459
Repository: prikhi/pencil

Issue #225: Exported HTML file with invalid URLs
Created: 2015-03-13T07:15:18Z
From thomasse...@gmail.com on October 11, 2010 09:47:20
I just installed a fresh copy of Pencil 1.2
I installed "HTML Template with thumbnails using JQuery" to test HTML export. (Standalone)
The HTML export looked file when seen on local machine - but failed to load images when uploaded to server. (Both seen in Firefox 3.6)
When inspecting the HTML source I saw the image URLs to be incorrect:
"pages%5Cplugin_manager_plugins.png" where it should be:
"pages/plugin_manager_plugins.png"
The problem is that the forward slash / was URL encoded.
I don't know why it worked when viewed locally, but I had to clean up all URL references in order for the HTML output to properly work online.
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=225

Duplicate issue #237: html IMG resources do not load from dropbox public URL
Created: 2015-03-13T07:20:06Z
From terry.do...@gmail.com on October 22, 2010 23:22:00
What steps will reproduce the problem? 1. Export a document as html in a public dropbox.com folder
2. get the public URL from dropbox and open it in your browser
3. html file will load, but not the images resources What is the expected output? What do you see instead? I expect the images, etc to load, but they are not found. What version of the product are you using? On what operating system? pencil 1.2 using the default html template. Please provide any additional information below. If I edit the index.html file and replace the %5C with the '/' characters on the IMG SRC sttributes it works.
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=237

Closing comment (2015-03-13T07:20:08Z): From neil.mu...@catalyse.net on November 24, 2010 15:50:49
Same as #225
Repository: prikhi/pencil

Issue #777: Pencil 2.0.15 not working with Firefox 43 on Mint
Created: 2015-12-21T02:25:20Z
I have pencil 2.0.15 runing on Mint 17.3, it is installed from pencil-2.0.15-ubuntu-all.deb, and I upgrage firefox from 42 to 43 yesterday.
Now when I run pencil, it says:
Error: Platform version '43.0' is not compatible with
minVersion >= 36.0
maxVersion <= 42.*

I thought it should support firefox >= 36.0 as in README of pencil:

You will need version 36 or higher of firefox to run Pencil as a Firefox Extension. Linux users will need version 36 of either firefox, iceweasel or xulrunner.

What should I do? Edit any configuration file of pencil to make it support firefox43 or downgrade firefox in Mint to 42? Please provide detail steps.

Duplicate issue #791: Platform version '43.0.4' is not compatible
Created: 2016-01-18T08:14:46Z
I am getting following error on Ubuntu 14.04 LTS.
Error: Platform version '43.0.4' is not compatible with
minVersion >= 36.0
maxVersion <= 42.*

Closing comment (2016-01-21T12:59:10Z): this issue  #791 should be closed as duplicate of #777
Repository: primefaces/primevue

Issue #1389: Dropdown search don't work with Gboard
Created: 2021-07-28T17:00:35Z
Hello,
the search in the dropdown component does not search and does not work correctly when using the google keyboard, many users bring this keyboard by default, the error is reproducible from any phone with updated gboard even in beta phase


[ x] bug report


PrimeVue version: 3.6.0


Browser: [Mobile Chrome | Android X.X Web Browser]

Duplicate issue #2033: DROPDOWN BUG ON ANDROID
Created: 2022-01-20T15:05:11Z
We of Octavian-lab have notice a bug on dropdown. If i use the advanced dropdown with the filter property on, with android if i search something on the input, it doesn't work properly: the dropdown doesn't react to the keyEnter and doesn't search anything; then if i click outside the dropdown and return on the dropdown the search is done

Closing comment (2022-01-21T05:54:06Z): Duplicate #1389
Repository: primefaces/primevue

Issue #2808: ColorPicker: Color resets to violet after sliding to the left
Created: 2022-07-27T19:00:31Z
Describe the bug
Hello, I was playing with the ColorPicker on https://www.primefaces.org/primevue/colorpicker and I noticed that the color changes to violet when following these steps:

Move the vertical slider on the right to any color
Move the color picker circle all the way to the left side of the window
Move the color picker back to the right
Green value is 0, red and blue values are equal (I was watching the RGB values using dev tools)

Issue happens in Vue 2 and Vue 3 versions.
Browser: Chrome
Reproducer
https://www.primefaces.org/primevue/colorpicker
PrimeVue version
latest
Vue version
2.x
Language
ES6
Build / Runtime
Vue CLI App
Browser(s)
Chrome
Steps to reproduce the behavior

Go to https://www.primefaces.org/primevue/colorpicker
Move the vertical slider on the right to any color
Move the color picker circle all the way to the left side of the window
Move the color picker back to the right
Green value is 0, red and blue values are equal (I was watching the RGB values using dev tools)

Expected behavior
When sliding the color picker circle to the left and back to the right, it should retain the color ratio indicated by the vertical slider.

Duplicate issue #3586: ColorPicker: Saturation and Value reset after change the Hue
Created: 2023-01-25T22:46:35Z
Describe the bug

  
    
    

    Screen.Recording.2023-01-25.at.23.44.43.mov
    
  

  

  


Related #2808
Reproducer
https://www.primefaces.org/primevue/colorpicker
PrimeVue version
3.22.3
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response

Closing comment (2023-01-26T11:14:35Z): Duplicate #2808
Repository: primefaces/primevue

Issue #4809: Menu: `submenuheader` slot options TypeScript defect
Created: 2023-11-13T12:13:29Z

Duplicate issue #4810: Menu: Property 'item' does not exist on type '{ submenuheader: MenuItem; }'
Created: 2023-11-13T21:22:35Z
Describe the bug
I added lang="ts" to the example at https://primevue.org/menu/#template. When I ran the command vue-tsc --noEmit, I got the following error:
error TS2339: Property 'item' does not exist on type '{ submenuheader: MenuItem; }'. <template #submenuheader="{ item }">
Here are the versions of TypeScript and vue-tsc that I am using:
"typescript": "^5.2.2",
"vue-tsc": "^1.8.22"
Thank you for your help!
Reproducer
/
PrimeVue version
3.40.1
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response

Closing comment (2023-11-15T08:21:02Z): Duplicate #4809
Repository: primefaces/primevue

Issue #1861: OrderList: drag and drop
Created: 2021-12-09T13:40:35Z
Please add the ability to drag elements on the list with the mouse.
Simply put, add drag and drop support
https://www.primefaces.org/primevue/showcase-v2/#/orderlist

Duplicate issue #4275: Component Name: DragDropList
Created: 2023-08-15T22:22:18Z
Describe the feature you would like to see added
I'd love to see some kind of draggable list component, with slotted props for specifying which element is draggable. Right now there's the OrderList, but this seems pretty 2000s-era design, and I think most designers now would reach for something draggable (with mouse or finger) to implement the same requirement.
Is your feature request related to a problem?
OrderList isn't draggable.
Describe the solution you'd like
Allow draggable items, with things like ghosting or outline drag.
Describe alternatives you have considered
There are certainly draggable list / drag/drop components out there, like vue-easy-dnd. But it would be nice for one that has the same design sensibility / integration with PrimeVue.
Additional context
No response

Closing comment (2023-08-16T14:47:02Z): Duplicate #1861