PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: fxamacker/cbor (go)
Issue: bug: encoding cbor.RawTag with empty content returns malformed CBOR data 
### What version of fxamacker/cbor are you using?

v2.2.0

### Does this issue reproduce with the latest release?

Yes

### What OS and CPU architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build778508732=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

Encode cbor.RawTag with empty content.

```
rtag := cbor.RawTag{Number: 100} // RawTag.Content is empty
b, err = cbor.Marshal(rtag)
fmt.Printf("Marshal(%+v) returns 0x%x, error %v\n", rtag, b, err)
// Marshal({Number:100 Content:[]}) returns 0xd864, error <nil>
```

### What did you expect to see?

Encoding cbor.RawTag should return either valid CBOR data or error.

### What did you see instead?

See comments in code snippet in previous section.
Pull request description: Fix encoding cbor.RawTag with empty content
Encoding cbor.RawTag with empty content returns CBOR representation of tag_number(null).

Closes #258



Patch:
diff --git a/tag.go b/tag.go
index 924f74d..db29149 100644
--- a/tag.go
+++ b/tag.go
@@ -60,9 +60,14 @@ func (t RawTag) MarshalCBOR() ([]byte, error) {
 
 	encodeHead(e, byte(cborTypeTag), t.Number)
 
-	buf := make([]byte, len(e.Bytes())+len(t.Content))
+	content := t.Content
+	if len(content) == 0 {
+		content = cborNil
+	}
+
+	buf := make([]byte, len(e.Bytes())+len(content))
 	n := copy(buf, e.Bytes())
-	copy(buf[n:], t.Content)
+	copy(buf[n:], content)
 
 	putEncoderBuffer(e)
 	return buf, nil


Test patch:
diff --git a/tag_test.go b/tag_test.go
index f8322b8..560af47 100644
--- a/tag_test.go
+++ b/tag_test.go
@@ -1215,6 +1215,30 @@ func TestMarshalUninitializedRawTag(t *testing.T) {
 	}
 }
 
+func TestMarshalTagWithEmptyContent(t *testing.T) {
+	v := Tag{Number: 100}       // Tag.Content is empty
+	want := hexDecode("d864f6") // 100(null)
+	b, err := Marshal(v)
+	if err != nil {
+		t.Errorf("Marshal(%v) returned error %v", v, err)
+	}
+	if !bytes.Equal(b, want) {
+		t.Errorf("Marshal(%v) = 0x%x, want 0x%x", v, b, want)
+	}
+}
+
+func TestMarshalRawTagWithEmptyContent(t *testing.T) {
+	v := RawTag{Number: 100}    // RawTag.Content is empty
+	want := hexDecode("d864f6") // 100(null)
+	b, err := Marshal(v)
+	if err != nil {
+		t.Errorf("Marshal(%v) returned error %v", v, err)
+	}
+	if !bytes.Equal(b, want) {
+		t.Errorf("Marshal(%v) = 0x%x, want 0x%x", v, b, want)
+	}
+}
+
 func TestEncodeTag(t *testing.T) {
 	m := make(map[interface{}]bool)
 	m[10] = true
Repository: typescript-eslint/tslint-to-eslint-config (ts)
Issue: one-variable-per-declaration should output ruleArguments: ["never"]
# 🐛 Bug Report

-   `tslint-to-eslint-config` version: 0.2.9
-   ESLint version: 5.16.0
-   Node version: 12.X

#### Actual Behavior

`one-variable-per-declaration` outputs no rule arguments.

#### Expected Behavior

TSLint's `one-variable-per-declaration` is a subset of ESLint's `one-var`. `one-var` allows either style while `one-variable-per-declaration` only allows the `"never"` style.

#### Reproduction

`tslint.json`:
```json
{
    "rules": {
        "one-variable-per-declaration": true
    }
}
```
Pull request description: Added missing 'never' argument to one-var output
## PR Checklist

-   [x] Addresses an existing issue: fixes #256
-   [x] That issue was marked as [`status: accepting prs`](https://github.com/typescript-eslint/tslint-to-eslint-config/labels/status%3A%20accepting%20prs)

## Overview

Adds an ever-present `ruleArguments: ["never"]` to the `one-variable-per-declaration` converter.

Patch:
diff --git a/src/rules/converters/one-variable-per-declaration.ts b/src/rules/converters/one-variable-per-declaration.ts
index 75fdd7d..f018045 100644
--- a/src/rules/converters/one-variable-per-declaration.ts
+++ b/src/rules/converters/one-variable-per-declaration.ts
@@ -7,6 +7,7 @@ export const convertOneVariablePerDeclaration: RuleConverter = tslintRule => {
                 ...(!tslintRule.ruleArguments.includes("ignore-for-loop") && {
                     notices: ["Variables declared in for loops will no longer be checked."],
                 }),
+                ruleArguments: ["never"],
                 ruleName: "one-var",
             },
         ],


Test patch:
diff --git a/src/rules/converters/tests/one-variable-per-declaration.test.ts b/src/rules/converters/tests/one-variable-per-declaration.test.ts
index ced35ef..a2aaf0b 100644
--- a/src/rules/converters/tests/one-variable-per-declaration.test.ts
+++ b/src/rules/converters/tests/one-variable-per-declaration.test.ts
@@ -10,6 +10,7 @@ describe(convertOneVariablePerDeclaration, () => {
             rules: [
                 {
                     notices: ["Variables declared in for loops will no longer be checked."],
+                    ruleArguments: ["never"],
                     ruleName: "one-var",
                 },
             ],
@@ -24,6 +25,7 @@ describe(convertOneVariablePerDeclaration, () => {
         expect(result).toEqual({
             rules: [
                 {
+                    ruleArguments: ["never"],
                     ruleName: "one-var",
                 },
             ],
Repository: platers/obsidian-linter (ts)
Issue: Bug: `Empty Line Around Tables` messes up LaTeX with pipe character
## Describe the Bug

`Empty Line Around Tables` messes up LaTeX formulas with pipe (`|`) character

## How to Reproduce

Consider the following note

``` markdown
$|a| + |b|$
```

And enable `Empty Line Around Tables` rule.

## Expected Behavior

Markup unchanged

## Actual Behavior

```markdown
$|a

$|a| + |b|$
$|a
```
Pull request description: Exclude math and inline math
Fixes #527 

Patch:
diff --git a/src/rules/empty-line-around-tables.ts b/src/rules/empty-line-around-tables.ts
index 01c7d70..e8227cd 100644
--- a/src/rules/empty-line-around-tables.ts
+++ b/src/rules/empty-line-around-tables.ts
@@ -22,7 +22,7 @@ export default class EmptyLineAroundTables extends RuleBuilder<EmptyLineAroundTa
     return RuleType.SPACING;
   }
   apply(text: string, options: EmptyLineAroundTablesOptions): string {
-    return ignoreListOfTypes([IgnoreTypes.yaml, IgnoreTypes.code], text, (text: string) => {
+    return ignoreListOfTypes([IgnoreTypes.yaml, IgnoreTypes.code, IgnoreTypes.math, IgnoreTypes.inlineMath], text, (text: string) => {
       return ensureEmptyLinesAroundTables(text);
     });
   }


Test patch:
diff --git a/__tests__/empty-line-around-tables.test.ts b/__tests__/empty-line-around-tables.test.ts
index 06eca7d..b3c20bf 100644
--- a/__tests__/empty-line-around-tables.test.ts
+++ b/__tests__/empty-line-around-tables.test.ts
@@ -47,5 +47,31 @@ ruleTest({
         > | quux     | quuz     |
       `,
     },
+    {
+      testName: 'Don\'t modify inline math',
+      before: dedent`
+        ${''}
+        $|a| + |b|$
+      `,
+      after: dedent`
+        ${''}
+        $|a| + |b|$
+      `,
+    },
+    {
+      testName: 'Don\'t modify math',
+      before: dedent`
+        ${''}
+        $$
+        |a| + |b|
+        $$
+      `,
+      after: dedent`
+        ${''}
+        $$
+        |a| + |b|
+        $$
+      `,
+    },
   ],
 });
Repository: yargs/yargs (js)
Issue: Global middleware don't work in 12.0.1
I've tried this code:

```
const yargs = require('yargs');

const mwFunc1 = argv => console.log('I\'m a middleware function');
const mwFunc2 = argv => console.log('I\'m another middleware function');

yargs
  .command('myCommand', 'some command', {}, function(argv){
    console.log('Running myCommand!');
  })
  .middleware([mwFunc1, mwFunc2]).argv;
```


OUTPUT: 
```
Running myCommand!
```

No trace of the middlewares :(

Pull request description: I-1178: Middleware fix
- closes #1178 

Patch:
diff --git a/lib/command.js b/lib/command.js
index bbd986e..ea7aa3d 100644
--- a/lib/command.js
+++ b/lib/command.js
@@ -19,7 +19,8 @@ module.exports = function command (yargs, usage, validation, globalMiddleware) {
     let aliases = []
     handler = handler || (() => {})
     middlewares = middlewares || []
-    middlewares = globalMiddleware.concat(middlewares)
+    globalMiddleware.push(...middlewares)
+    middlewares = globalMiddleware
     if (Array.isArray(cmd)) {
       aliases = cmd.slice(1)
       cmd = cmd[0]


Test patch:
diff --git a/test/middleware.js b/test/middleware.js
index 764b1b0..0423768 100644
--- a/test/middleware.js
+++ b/test/middleware.js
@@ -53,4 +53,31 @@ describe('middleware', () => {
       .exitProcess(false) // defaults to true.
       .parse()
   })
+
+  it('should be able to register middleware regardless of when middleware is called', function (done) {
+    yargs(['mw'])
+      .middleware([
+        function (argv) {
+          argv.mw1 = 'mw1'
+        }
+      ])
+      .command(
+        'mw',
+        'adds func list to middleware',
+        function () {},
+        function (argv) {
+          // we should get the argv filled with data from the middleware
+          argv.mw1.should.equal('mw1')
+          argv.mw2.should.equal('mw2')
+          return done()
+        }
+      )
+      .middleware([
+        function (argv) {
+          argv.mw2 = 'mw2'
+        }
+      ])
+      .exitProcess(false) // defaults to true.
+      .parse()
+  })
 })
Repository: stretchr/testify (go)
Issue: InEpsilon does not fail when passed a NaN value
Hi! We ran into a small isue today with `require.InEpsilon`, at version 1.5.1

```go
func TestInEpsilonNaN(t *testing.T) {
	require.InEpsilon(t, 42, math.NaN(), 1)
}
```

Actual result : test passes

Expected result : an error
Pull request description: Make InEpsilon fail when given a NaN
fixes #918

Patch:
diff --git a/assert/assertions.go b/assert/assertions.go
index eefc89c..bfbe9cf 100644
--- a/assert/assertions.go
+++ b/assert/assertions.go
@@ -1245,6 +1245,9 @@ func calcRelativeError(expected, actual interface{}) (float64, error) {
 	if !aok {
 		return 0, fmt.Errorf("expected value %q cannot be converted to float", expected)
 	}
+	if math.IsNaN(af) {
+		return 0, errors.New("expected value must not be NaN")
+	}
 	if af == 0 {
 		return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error")
 	}
@@ -1252,6 +1255,9 @@ func calcRelativeError(expected, actual interface{}) (float64, error) {
 	if !bok {
 		return 0, fmt.Errorf("actual value %q cannot be converted to float", actual)
 	}
+	if math.IsNaN(bf) {
+		return 0, errors.New("actual value must not be NaN")
+	}
 
 	return math.Abs(af-bf) / math.Abs(af), nil
 }
@@ -1261,6 +1267,9 @@ func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAnd
 	if h, ok := t.(tHelper); ok {
 		h.Helper()
 	}
+	if math.IsNaN(epsilon) {
+		return Fail(t, "epsilon must not be NaN")
+	}
 	actualEpsilon, err := calcRelativeError(expected, actual)
 	if err != nil {
 		return Fail(t, err.Error(), msgAndArgs...)


Test patch:
diff --git a/assert/assertions_test.go b/assert/assertions_test.go
index 744a191..042cf68 100644
--- a/assert/assertions_test.go
+++ b/assert/assertions_test.go
@@ -1458,6 +1458,9 @@ func TestInEpsilon(t *testing.T) {
 		{0.1, -0.1, 1.99},
 		{0, 0.1, 2}, // expected must be different to zero
 		{time.Second, time.Second + 10*time.Millisecond, 0.002},
+		{math.NaN(), 0, 1},
+		{0, math.NaN(), 1},
+		{0, 0, math.NaN()},
 	}
 
 	for _, tc := range cases {
Repository: jlongster/prettier (js)
Issue: Incorrect Flow type removal for imports
The following import statement: 

```js
import { Foo, type Baz } from "../module";
```

is converted wrongly into:

```js
import { Foo, Baz } from "../module";
```

Flow introduced this type syntax in imports in version 0.38.0 and it does not seem to be supported in prettier yet.
Pull request description: Ensure importKind is printed
Fixes #713 

Patch:
diff --git a/src/printer.js b/src/printer.js
index 0acad6736..e8bfe91be 100644
--- a/src/printer.js
+++ b/src/printer.js
@@ -376,6 +376,10 @@ function genericPrintNoParens(path, options, print) {
       return join(" ", parts);
     case "ImportSpecifier":
       if (n.imported) {
+        if (n.importKind) {
+          parts.push(path.call(print, "importKind"), " ");
+        }
+
         parts.push(path.call(print, "imported"));
 
         if (n.local && n.local.name !== n.imported.name) {


Test patch:
diff --git a/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap
index 0beb91ee7..059cd220d 100644
--- a/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap
@@ -345,6 +345,21 @@ function foo() {
 "
 `;
 
+exports[`test import_type_specifier.js 1`] = `
+"/**
+ * @flow
+ */
+
+import { Foo, type Baz } from \"../module\";
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/**
+ * @flow
+ */
+
+import { Foo, type Baz } from \"../module\";
+"
+`;
+
 exports[`test issue-359.js 1`] = `
 "/* @flow */
 
diff --git a/tests/flow/import_type/import_type_specifier.js b/tests/flow/import_type/import_type_specifier.js
new file mode 100644
index 000000000..4e5d1bfae
--- /dev/null
+++ b/tests/flow/import_type/import_type_specifier.js
@@ -0,0 +1,5 @@
+/**
+ * @flow
+ */
+
+import { Foo, type Baz } from "../module";
Repository: mila-udem/fuel (python)
Issue: Is IndexableDataset.__getattr__ interfering with pickling?
Here's a small example exhibiting the issue:

``` python
>>> import pickle
>>> from fuel.datasets import IndexableDataset
>>> dataset = IndexableDataset({'features': [[0, 0], [1, 1]]})
>>> dataset = pickle.loads(pickle.dumps(dataset))
TypeError: argument of type 'NoneType' is not iterable
```

Removing the `__getattr__` method solves the issue, but I'm not familiar enough with pickling to determine whether this is a coincidence or not.
Pull request description: Fix unpickling bug in IndexableDataset
Fixes #183.

Patch:
diff --git a/fuel/datasets/base.py b/fuel/datasets/base.py
index 42f7de8..1ca7175 100644
--- a/fuel/datasets/base.py
+++ b/fuel/datasets/base.py
@@ -361,6 +361,13 @@ class IndexableDataset(Dataset):
             return self.indexables[self.sources.index(attr)]
         raise AttributeError
 
+    # Without explicitly defining a trivial __setstate__ method,
+    # the __getattribute__ method would call the __getattr__ method,
+    # which would raise an AttributeError. This causes problems
+    # when unpickling.
+    def __setstate__(self, dict):
+        self.__dict__ = dict
+
     @property
     def num_examples(self):
         return len(self.indexables[0])


Test patch:
diff --git a/tests/test_datasets.py b/tests/test_datasets.py
index 3294974..f9e42aa 100644
--- a/tests/test_datasets.py
+++ b/tests/test_datasets.py
@@ -3,7 +3,7 @@ from collections import OrderedDict
 import numpy
 from numpy.testing import assert_raises, assert_equal
 from picklable_itertools import repeat
-from six.moves import zip, range
+from six.moves import zip, range, cPickle
 
 from fuel.datasets import Dataset, IterableDataset, IndexableDataset
 from fuel.streams import DataStream
@@ -117,6 +117,9 @@ class TestIndexableDataset(object):
         assert_raises(
             ValueError, IndexableDataset([1, 2, 3]).get_data, None, None)
 
+    def test_pickling(self):
+        cPickle.loads(cPickle.dumps(IndexableDataset({'a': (1, 2)})))
+
     def test_batch_iteration_scheme_with_lists(self):
         """Batch schemes should work with more than ndarrays."""
         data = IndexableDataset(OrderedDict([('foo', list(range(50))),
Repository: yamatoiizuka/palt-typesetting (ts)
Issue: Prevent thin space insertion around whitespace characters
スペースやタブ、その他制御文字（改行を行う `\n` など）の前後に四分アキを入れない
Pull request description: Prevent thin space insertion around whitespace characters
Fix #117 

Patch:
diff --git a/src/insert-separators.ts b/src/insert-separators.ts
index 6024a74..e124d90 100644
--- a/src/insert-separators.ts
+++ b/src/insert-separators.ts
@@ -2,6 +2,7 @@ import LineBreaker from 'linebreak'
 import { CharClass, LanguageClass } from './util-text-classes'
 import { createWbr, createThinSpace } from './util-tags'
 import { TypesettingOptions } from '../types'
+import { whitespaceRegex } from './util-regex'
 
 /**
  * HTMLテキストノードにセパレーター（四分アキ、<wbr>）を挿入します。
@@ -62,6 +63,8 @@ const addSeparatorsToSegment = (current: string, next = '', options: Typesetting
  * @return 四分アキを追加すべきかどうか
  */
 const shouldAddThinSpace = (current: string, next: string): boolean => {
+  if (whitespaceRegex.test(current) || whitespaceRegex.test(next)) return false
+
   return LanguageClass.shouldAddThinSpace(current, next) || CharClass.shouldAddThinSpace(current, next)
 }
 
diff --git a/src/util-regex.ts b/src/util-regex.ts
index d51e812..84760b1 100644
--- a/src/util-regex.ts
+++ b/src/util-regex.ts
@@ -40,3 +40,8 @@ export const periodsRegex = /。|．/
 export const noBreakRulesRegex = new RegExp(
   `[${'—‥…＿'}${String.fromCharCode(0x2500)}-${String.fromCharCode(0x257f)}]+`
 )
+
+/**
+ * 空白文字、制御文字
+ */
+export const whitespaceRegex = /[\s\u00A0]/


Test patch:
diff --git a/tests/insert-separators.test.ts b/tests/insert-separators.test.ts
index 5de9f86..de1dc9d 100644
--- a/tests/insert-separators.test.ts
+++ b/tests/insert-separators.test.ts
@@ -21,6 +21,27 @@ describe('insertSeparators', () => {
     expect(insertSeparatorsToText(currentText, nextText, options)).toEqual(expected)
   })
 
+  it('does not insert a thin space before a space', () => {
+    const currentText = 'です。'
+    const nextText = ' '
+    const expected = 'です。'
+    expect(insertSeparatorsToText(currentText, nextText, options)).toEqual(expected)
+  })
+
+  it('does not insert a thin space after a space', () => {
+    const currentText = ' '
+    const nextText = '「こんにちは」'
+    const expected = ' <wbr>'
+    expect(insertSeparatorsToText(currentText, nextText, options)).toEqual(expected)
+  })
+
+  it('does not insert a thin space before a line fead', () => {
+    const currentText = 'です。'
+    const nextText = '\n'
+    const expected = 'です。'
+    expect(insertSeparatorsToText(currentText, nextText, options)).toEqual(expected)
+  })
+
   it('inserts a thin space between Japanese–Cyrillic', () => {
     const currentText = 'こんにちはДобрий день'
     const nextText = ''
Repository: astropenguin/xarray-dataclasses (python)
Issue: Release v0.1.2
- Update version numbers written in:
    - `pyproject.toml`
    - `xarray_dataclasses/__init__.py`
    - `tests/test_metadata.py`
Pull request description: Release v0.1.2
This PR closes #7.

Patch:
diff --git a/pyproject.toml b/pyproject.toml
index cd339df..5ccfaae 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "xarray-dataclasses"
-version = "0.1.1"
+version = "0.1.2"
 description = "xarray extension for dataarray classes"
 authors = ["Akio Taniguchi <taniguchi@a.phys.nagoya-u.ac.jp>"]
 license = "MIT"
diff --git a/xarray_dataclasses/__init__.py b/xarray_dataclasses/__init__.py
index 38e2c5f..6a612d2 100644
--- a/xarray_dataclasses/__init__.py
+++ b/xarray_dataclasses/__init__.py
@@ -1,6 +1,6 @@
 # flake8: noqa
 __author__ = "Akio Taniguchi"
-__version__ = "0.1.1"
+__version__ = "0.1.2"
 
 
 # submodules


Test patch:
diff --git a/tests/test_metadata.py b/tests/test_metadata.py
index ce98ba5..abd2a51 100644
--- a/tests/test_metadata.py
+++ b/tests/test_metadata.py
@@ -6,4 +6,4 @@ def test_author():
 
 
 def test_version():
-    assert xarray_dataclasses.__version__ == "0.1.1"
+    assert xarray_dataclasses.__version__ == "0.1.2"
Repository: ember-template-lint/ember-template-lint (js)
Issue: no-implicit-this and hasBlock
The `no-implicit-this` rule complains about `hasBlock` but `hasBlock` should not be used with either `this`, nor with `@` (as it returns `undefined`). Perhaps this rule can implicitly ignore `hasBlock`.
Pull request description: Allow has-block and hasBlock in the no-implicit-this rule
Fixes #481 

Patch:
diff --git a/lib/rules/lint-no-implicit-this.js b/lib/rules/lint-no-implicit-this.js
index 9abaee3f..823fd368 100644
--- a/lib/rules/lint-no-implicit-this.js
+++ b/lib/rules/lint-no-implicit-this.js
@@ -19,6 +19,8 @@ function isString(value) {
 // Allow Ember's builtin argless syntaxes
 const ARGLESS_BUILTINS = [
   'debugger',
+  'has-block',
+  'hasBlock',
   'input',
   'outlet',
   'textarea',


Test patch:
diff --git a/test/unit/rules/lint-no-implicit-this-test.js b/test/unit/rules/lint-no-implicit-this-test.js
index 6854c48c..9ff5e3a0 100644
--- a/test/unit/rules/lint-no-implicit-this-test.js
+++ b/test/unit/rules/lint-no-implicit-this-test.js
@@ -15,6 +15,8 @@ let statements = [
 
 let good = [
   '{{debugger}}',
+  '{{has-block}}',
+  '{{hasBlock}}',
   '{{input}}',
   '{{outlet}}',
   '{{textarea}}',
Repository: shellscape/postcss-less (js)
Issue: Bracket selectors are considered mixin parameters.
* Node Version: v6.10.3
* NPM Version: v5.5.1
* postcss-less Version: v1.1.3

### LESS

```less
.a,
.b[type=text] {
  color: blue;
}
```

### JavaScript

```js
let postCssLess = require('./dist/less-syntax');
const less = `
.a,
.b[type=text] {
  color: blue;
}
`;
const root = postCssLess.parse(less);
console.log(root);
```

### Expected Behavior
No `params` set to match other postcss outputs.

### Actual Behavior
Bracket selector is considered a `params` value.

### How can we reproduce the behavior?
Use above JS file at project root.
This issue was found when using `stylelint`.
Pull request description: #96 - Add extra check for not adding params from brackets.
Hopefully Fixes #96.

Please check one:
- [X] New tests created for this change
- [ ] Tests updated for this change

This PR:
- [ ] Adds new API
- [ ] Extends existing API, backwards-compatible
- [ ] Introduces a breaking change
- [X] Fixes a bug

---

After looking through the less documentation I have not found any mixin or extend syntax that uses brackets `[]`. The Idea is to not fill `params` with brackets.


Patch:
diff --git a/lib/less-parser.js b/lib/less-parser.js
index 30192e8..3b2aa62 100755
--- a/lib/less-parser.js
+++ b/lib/less-parser.js
@@ -316,8 +316,8 @@ export default class LessParser extends Parser {
         }
       }
 
-      // we don't want to add params for pseudo-selectors that utilize parens (#56)
-      if ((extend || !colon) && (brackets.length > 0 || type === 'brackets' || params[0])) {
+      // we don't want to add params for pseudo-selectors that utilize parens (#56) or bracket selectors (#96)
+      if ((extend || !colon) && (brackets.length > 0 || type === 'brackets' || params[0]) && brackets[0] !== ']') {
         params.push(token);
       }
 


Test patch:
diff --git a/test/parser/params.spec.js b/test/parser/params.spec.js
index d54b2c5..2e76c11 100644
--- a/test/parser/params.spec.js
+++ b/test/parser/params.spec.js
@@ -15,5 +15,13 @@ describe('Parser', () => {
       expect(root.first.params).to.be.undefined;
     });
 
+    it('should not assign parameters for bracket selectors', () => {
+      const code = '.test1,.test2[test=test] {}';
+      const root = parse(code);
+
+      expect(root.first.selector).to.eql('.test1,.test2[test=test]');
+      expect(root.first.params).to.be.undefined;
+    });
+
   });
 });