PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: editorconfig-checker/editorconfig-checker (go)
Issue: Empty `Format` field in config file breaks ECC 
I've upgraded to 3.12 just now and I got following error which I can't figure out:

```
$ ec
"" is not a valid output format
$ ec --version
"" is not a valid output format
```

Using MacOS Sequoia. Running ec on virtual environment for my work.

Any help?
Pull request description: fix: empty format in the config file should be treated as Default
Some of our users have an empty Format in their config file - this should be treated as having requested the "default" output format, as it would be when the option is missing entirely.

Closes #430

Patch:
diff --git a/pkg/outputformat/outputformat.go b/pkg/outputformat/outputformat.go
index 37070bf..aa88216 100644
--- a/pkg/outputformat/outputformat.go
+++ b/pkg/outputformat/outputformat.go
@@ -2,6 +2,7 @@
 package outputformat
 
 import (
+	"cmp"
 	"fmt"
 	"slices"
 	"strings"
@@ -39,7 +40,7 @@ func (format OutputFormat) MarshalText() ([]byte, error) {
 }
 
 func (format *OutputFormat) UnmarshalText(data []byte) error {
-	*format = OutputFormat(string(data))
+	*format = OutputFormat(cmp.Or(string(data), "default"))
 	if !format.IsValid() {
 		return fmt.Errorf("%q is not a valid output format", data)
 	}


Test patch:
diff --git a/pkg/outputformat/outputformat_test.go b/pkg/outputformat/outputformat_test.go
index e6853fe..f9aeb4c 100644
--- a/pkg/outputformat/outputformat_test.go
+++ b/pkg/outputformat/outputformat_test.go
@@ -56,3 +56,14 @@ func TestUnmarshallingBrokenInputFails(t *testing.T) {
 		t.Error("unmarshalling did not recognize an invalid value and unmarshalled it anyway")
 	}
 }
+
+func TestUnmarshallingEmptyFormat(t *testing.T) {
+	var working OutputFormat
+	err := working.UnmarshalText([]byte(""))
+	if err != nil {
+		t.Errorf("unmarshalling an empty string as the default output format failed: %v", err)
+	}
+	if working != Default {
+		t.Error("unmarshalling an empty string did not return the default output format")
+	}
+}
Repository: arve0/markdown-it-attrs (js)
Issue: = in attribute value are removed
When including an `=` in the value of an attribute, the `=` is parsed out. Different escaping mechanisms were ignored (`link='...'` and `\=`).

Example input:
```md
**Bold Link** {link=/some/page/in/app/id=1}
```

Current output:
```html
<p link="/some/page/in/app/id1"><strong>Bold Link</strong></p>
```

Expected output:
```html
<p link="/some/page/in/app/id=1"><strong>Bold Link</strong></p>
```

Pull request description: allow = in values
fixes #70 

Patch:
diff --git a/utils.js b/utils.js
index f0ba535..a210f24 100644
--- a/utils.js
+++ b/utils.js
@@ -30,7 +30,7 @@ exports.getAttrs = function (str, start, options) {
     let char_ = str.charAt(i);
 
     // switch to reading value if equal sign
-    if (char_ === keySeparator) {
+    if (char_ === keySeparator && parsingKey) {
       parsingKey = false;
       continue;
     }


Test patch:
diff --git a/test.js b/test.js
index e881964..8505dbb 100644
--- a/test.js
+++ b/test.js
@@ -30,6 +30,13 @@ function describeTestsWithOptions(options, postText) {
       let res = utils.getAttrs(replaceDelimiters(src, options), 0, options);
       assert.deepEqual(res, expected);
     });
+
+    it(replaceDelimiters('should parse attributes with = {attr=/id=1}', options), () => {
+      let src = '{link=/some/page/in/app/id=1}';
+      let expected = [['link', '/some/page/in/app/id=1']];
+      let res = utils.getAttrs(replaceDelimiters(src, options), 0, options);
+      assert.deepEqual(res, expected);
+    });
   });
 
   describe('markdown-it-attrs' + postText, () => {
Repository: jira-node/node-jira-client (js)
Issue: URL is not encoded, using special characters is broken (æøå)
When trying to download attachments with special characters in the filename, Jira responds with error 400.
This cannot be fixed by encoding the filename outside the library, this is reverted later.
URL should be encoded.
Pull request description: fix encoding for attachments. 
I'm open to doing this in a more general way - but this seemed liked the simplest solution. 

Patch:
diff --git a/src/jira.js b/src/jira.js
index 1e7b6fe..23cef5f 100644
--- a/src/jira.js
+++ b/src/jira.js
@@ -142,7 +142,9 @@ export default class JiraApi {
    * Creates a URI object for a given pathname
    * @param {object} [options] - an object containing path information
    */
-  makeUri({ pathname, query, intermediatePath }) {
+  makeUri({
+    pathname, query, intermediatePath, encode = false,
+  }) {
     const intermediateToUse = this.intermediatePath || intermediatePath;
     const tempPath = intermediateToUse || `/rest/api/${this.apiVersion}`;
     const uri = url.format({
@@ -152,7 +154,7 @@ export default class JiraApi {
       pathname: `${this.base}${tempPath}${pathname}`,
       query,
     });
-    return decodeURIComponent(uri);
+    return encode ? encodeURI(uri) : decodeURIComponent(uri);
   }
 
   /**
@@ -315,6 +317,7 @@ export default class JiraApi {
     return this.doRequest(this.makeRequestHeader(this.makeUri({
       pathname: `/attachment/${attachment.id}/${attachment.filename}`,
       intermediatePath: '/secure',
+      encode: true,
     }), { json: false, encoding: null }));
   }
 


Test patch:
diff --git a/test/jira-tests.js b/test/jira-tests.js
index 240c930..395a220 100644
--- a/test/jira-tests.js
+++ b/test/jira-tests.js
@@ -407,6 +407,11 @@ describe('Jira API Tests', () => {
       result.should.eql('http://jira.somehost.com:8080/secure/attachment/123456/attachment.txt');
     });
 
+    it('downloadAttachment hits proper url with attachment id and filename with special characters', async () => {
+      const result = await dummyURLCall('downloadAttachment', [{ id: '123456', filename: 'attachment-æøå.txt' }]);
+      result.should.eql('http://jira.somehost.com:8080/secure/attachment/123456/attachment-%C3%A6%C3%B8%C3%A5.txt');
+    });
+
     it('getUnresolvedIssueCount hits proper url', async () => {
       async function dummyRequest(requestOptions) {
         return { issuesUnresolvedCount: requestOptions };
Repository: platers/obsidian-linter (ts)
Issue: Bug: Remove space header when option `RemoveSpaceAroundCharacters` is enabled and Katakata is beginning of the line
- [x] I have verified that I am on the latest version of the Linter

## Describe the Bug

Title.

## How to Reproduce

1. Enable `RemoveSpaceAroundCharacters` and `includeCJKSymbolsAndPunctuation` in the settings
2. Create a note with the following content:

```
## テスト
```

3. Lint the note, then the space between `##` and `テスト` will be removed.

## Expected Behavior

Don't remove the space between `##` and `テスト`.

## Device

- [ ] Desktop
- [x] Mobile


<!-- 新しいイシューの本文を編集し、エディターの右上にある ✓ [イシューの作成] ボタンをクリックします。最初の行がイシューのタイトルになります。担当者とラベルは空白行の後に続きます。イシューの本文を開始する前に空の行を残します。 -->
Pull request description: Fix CJK symbols and punctuation unicode
fix #1127

Reference:
https://en.wikipedia.org/wiki/CJK_Symbols_and_Punctuation

Patch:
diff --git a/src/rules/remove-space-around-characters.ts b/src/rules/remove-space-around-characters.ts
index 4e3ce3b..c032a17 100644
--- a/src/rules/remove-space-around-characters.ts
+++ b/src/rules/remove-space-around-characters.ts
@@ -33,7 +33,7 @@ export default class RemoveSpaceAroundCharacters extends RuleBuilder<RemoveSpace
     }
 
     if (options.includeCJKSymbolsAndPunctuation) {
-      symbolsRegExpBuilder += '\u3000-\u30ff';
+      symbolsRegExpBuilder += '\u3000-\u303f';
     }
 
     if (options.includeDashes) {


Test patch:
diff --git a/__tests__/remove-space-around-characters.test.ts b/__tests__/remove-space-around-characters.test.ts
index fc85621..15510dd 100644
--- a/__tests__/remove-space-around-characters.test.ts
+++ b/__tests__/remove-space-around-characters.test.ts
@@ -80,5 +80,17 @@ ruleTest({
         otherSymbols: ':;',
       },
     },
+    { // accounts for to https://github.com/platers/obsidian-linter/issues/1127
+      testName: 'Make sure that a header does not get spaces removed in some situations with CJK',
+      before: dedent`
+        ## テスト
+      `,
+      after: dedent`
+        ## テスト
+      `,
+      options: {
+        includeCJKSymbolsAndPunctuation: true,
+      },
+    },
   ],
 });
Repository: prettier/plugin-xml (js)
Issue: TypeError: Cannot read property 'startLine' of undefined (v0.13.0)
I get the following error if i try to update to newest version

```

$ prettier "{**/*,*}.*" -u --list-different
--
1183 | [error] dir\file.xml: TypeError: Cannot read property 'startLine' of undefined
1184 | [error]     at Object.element (C:\drone\src\node_modules\@prettier\plugin-xml\src\printer.js:336:34)
1185 | [error]     at Object.genericPrint [as print] (C:\drone\src\node_modules\@prettier\plugin-xml\src\printer.js:412:30)
1186 | [error]     at callPluginPrintFunction (C:\drone\src\node_modules\prettier\index.js:14718:18)
1187 | [error]     at C:\drone\src\node_modules\prettier\index.js:14649:47
1188 | [error]     at Object.printComments (C:\drone\src\node_modules\prettier\index.js:14305:19)
1189 | [error]     at printGenerically (C:\drone\src\node_modules\prettier\index.js:14649:22)
1190 | [error]     at FastPath.call (C:\drone\src\node_modules\prettier\index.js:14441:20)
1191 | [error]     at C:\drone\src\node_modules\@prettier\plugin-xml\src\printer.js:308:27
1192 | [error]     at Array.map (<anonymous>)
1193 | [error]     at Object.element (C:\drone\src\node_modules\@prettier\plugin-xml\src\printer.js:304:19)


```

*dir\file.xml*
```yml
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Event>
    <Process id="XXX.Notification">

    </Process>
    <!--<Process id="XXX.Notification.Tmpl" >
        <Condition>[v:NType] == 'Tmpl'</Condition>
    </Process>-->
</Event>

```
Pull request description: fix: check for empty array
Check for undefined

fixes #158

Patch:
diff --git a/src/printer.js b/src/printer.js
index 32bba52..6f86b91 100644
--- a/src/printer.js
+++ b/src/printer.js
@@ -332,6 +332,11 @@ const nodes = {
         );
       }
 
+      if (children.length === 0) {
+        const space = opts.xmlSelfClosingSpace ? line : softline;
+        return group(concat(parts.concat(space, "/>")));
+      }
+
       const docs = [];
       let lastLine = children[0].startLine;
 


Test patch:
diff --git a/test/__snapshots__/format.test.js.snap b/test/__snapshots__/format.test.js.snap
index cc3983e..1d406f8 100644
--- a/test/__snapshots__/format.test.js.snap
+++ b/test/__snapshots__/format.test.js.snap
@@ -24,6 +24,7 @@ exports[`defaults 1`] = `
   <?pagebreak?>
 
   <style />
+  <style> </style>
   <style type=\\"text/css\\">
 circle {
   stroke-opacity: 0.7;
@@ -87,6 +88,7 @@ exports[`xmlWhitespaceSensitivity => ignore 1`] = `
   </desc>
   <?pagebreak?>
 
+  <style />
   <style />
   <style type=\\"text/css\\">
 circle {
diff --git a/test/fixture.xml b/test/fixture.xml
index 9868c95..c3594be 100644
--- a/test/fixture.xml
+++ b/test/fixture.xml
@@ -21,6 +21,7 @@
   <?pagebreak?>
 
   <style></style>
+  <style> </style>
   <style type="text/css">
     circle          { stroke-opacity: 0.7; }
     .special circle { stroke: green; }
Repository: AfterShip/clickhouse-sql-parser (go)
Issue: nil pointer dereference on a simple query with no table name after FROM
query: `SELECT * FROM` 

```
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x102ee9d80]

[redacted]
github.com/AfterShip/clickhouse-sql-parser/parser.(*Parser).parseJoinTableExpr(0x1400009ef30, 0x102ee2e74?)
	/pkg/mod/github.com/AfterShip/clickhouse-sql-parser@v0.0.0-20250301225821-9825d50f553f/parser/parser_query.go:217 +0x2d0
[redacted]
```

the problematic code line:
```
return nil, fmt.Errorf("expected table name or subquery, got %s", p.last().Kind)
```
i would guess `p.last()` is nil
Pull request description: Fix panic with the invalid SQL
This closes #129 

Patch:
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index b11ad71..5efe351 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -29,7 +29,7 @@ jobs:
           fetch-depth: '0'
 
       - name: Restore Go Module Cache
-        uses: actions/cache@v2
+        uses: actions/cache@v4
         with:
           path: ~/go/internal/mod
           key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
diff --git a/parser/parser_common.go b/parser/parser_common.go
index 07b8d4f..dbb181e 100644
--- a/parser/parser_common.go
+++ b/parser/parser_common.go
@@ -274,7 +274,7 @@ func (p *Parser) parseLiteral(pos Pos) (Literal, error) {
 		// accept the NULL keyword
 		return &NullLiteral{NullPos: pos}, nil
 	default:
-		return nil, fmt.Errorf("expected <int>, <string> or keyword <NULL>, but got %q", p.last().Kind)
+		return nil, fmt.Errorf("expected <int>, <string> or keyword <NULL>, but got %q", p.lastTokenKind())
 	}
 }
 
diff --git a/parser/parser_query.go b/parser/parser_query.go
index 79b6d28..b82bbfd 100644
--- a/parser/parser_query.go
+++ b/parser/parser_query.go
@@ -214,7 +214,7 @@ func (p *Parser) parseJoinTableExpr(_ Pos) (Expr, error) {
 			StatementEnd: statementEnd,
 		}, nil
 	default:
-		return nil, fmt.Errorf("expected table name or subquery, got %s", p.last().Kind)
+		return nil, fmt.Errorf("expected table name or subquery, got %s", fmt.Sprintf("%v", p.lastTokenKind()))
 	}
 }
 


Test patch:
diff --git a/parser/parser_test.go b/parser/parser_test.go
index 389b055..7b5044b 100644
--- a/parser/parser_test.go
+++ b/parser/parser_test.go
@@ -127,3 +127,14 @@ func validFormatSQL(t *testing.T, sql string) {
 	}
 	require.Equal(t, sql, builder.String())
 }
+
+func TestParser_InvalidSyntax(t *testing.T) {
+	invalidSQLs := []string{
+		"SELECT * FROM",
+	}
+	for _, sql := range invalidSQLs {
+		parser := NewParser(sql)
+		_, err := parser.ParseStmts()
+		require.Error(t, err)
+	}
+}
Repository: mholt/PapaParse (js)
Issue: 'columns' unparse config not working when first object doesn't have all properties
When using the `columns` unparse config option together with a data array where the first object does not have all properties that are listed in the `columns` array, then not all columns of the `columns` array are used even if later objects have these values.

E.g.
```javascript
const columns= ["First", "Second", "Third"];
const rows= [
  { First: "1-1"},
  {
    First: "2-1",
    Second: "2-2",
    "Third": "2-3",
  },
];
const result = Papa.unparse(
  { data: rows},
  {
    header: true,
    columns: columns,
  }
);
console.log(result)
```
The `result` is 
```
First
1-1
2-1
```

instead of the expected

```
First,Second,Third
1-1,,
2-1,2-2,2-3
```
Pull request description: fix: columns config works with input type object
Closes #918

Patch:
diff --git a/papaparse.js b/papaparse.js
index df7ba06..667a109 100755
--- a/papaparse.js
+++ b/papaparse.js
@@ -307,7 +307,7 @@ License: MIT
 			if (Array.isArray(_input.data))
 			{
 				if (!_input.fields)
-					_input.fields =  _input.meta && _input.meta.fields;
+					_input.fields = _input.meta && _input.meta.fields || _columns;
 
 				if (!_input.fields)
 					_input.fields =  Array.isArray(_input.data[0])


Test patch:
diff --git a/tests/test-cases.js b/tests/test-cases.js
index ab806ba..469c74c 100644
--- a/tests/test-cases.js
+++ b/tests/test-cases.js
@@ -1865,6 +1865,13 @@ var UNPARSE_TESTS = [
 		config: {columns: ['a', 'b', 'c']},
 		expected: 'a,b,c\r\n1,2,\r\n\r\n3,,4'
 	},
+	{
+		description: "Column option used to manually specify keys with input type object",
+		notes: "Should not throw any error when attempting to serialize key not present in object. Columns are different than keys of the first object. When an object is missing a key then the serialized value should be an empty string.",
+		input: { data: [{a: 1, b: '2'}, {}, {a: 3, d: 'd', c: 4,}] },
+		config: {columns: ['a', 'b', 'c']},
+		expected: 'a,b,c\r\n1,2,\r\n\r\n3,,4'
+	},
 	{
 		description: "Use different escapeChar",
 		input: [{a: 'foo', b: '"quoted"'}],