PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: effekt-lang/effekt (scala)
Issue: Allow braces in a pattern match
When an arm of an pattern match gets too long, I'd like to wrap it in _braces_:
```scala
def main(opt: Option[Int]) = {
  opt match {
    case None() => println("Nothing")
    case Some(x) => {
      println("We have a number: ${x.show}")
    }
  }
}
```

Unfortunately, the parser doesn't like that very much:
<img width="418" alt="Screenshot 2024-03-22 at 11 26 18" src="https://github.com/effekt-lang/effekt/assets/11269173/1b9c7ef3-0e4f-4ca5-b4c1-bac4e4df94eb">

(As far as I know, this is one of the few places where we only allow delimiting by `case`)
Pull request description: Resolves #422

Patch:
diff --git a/effekt/shared/src/main/scala/effekt/RecursiveDescent.scala b/effekt/shared/src/main/scala/effekt/RecursiveDescent.scala
index 702a3c031..60c959695 100644
--- a/effekt/shared/src/main/scala/effekt/RecursiveDescent.scala
+++ b/effekt/shared/src/main/scala/effekt/RecursiveDescent.scala
@@ -721,7 +721,13 @@ class RecursiveDescent(positions: Positions, tokens: Seq[Token], source: Source)
 
   def matchClause(): MatchClause =
     nonterminal:
-      MatchClause(`case` ~> matchPattern(), manyWhile(`and` ~> matchGuard(), `and`), `=>` ~> stmts())
+      MatchClause(
+        `case` ~> matchPattern(),
+        manyWhile(`and` ~> matchGuard(), `and`),
+        // allow a statement enclosed in braces or without braces
+        // both is allowed since match clauses are already delimited by `case`
+        `=>` ~> (if (peek(`{`)) { stmt() } else { stmts() })
+      )
 
   def matchGuards() =
     nonterminal:


Test patch:
diff --git a/effekt/jvm/src/test/scala/effekt/RecursiveDescentTests.scala b/effekt/jvm/src/test/scala/effekt/RecursiveDescentTests.scala
index 6436fe6d4..7f426ffa8 100644
--- a/effekt/jvm/src/test/scala/effekt/RecursiveDescentTests.scala
+++ b/effekt/jvm/src/test/scala/effekt/RecursiveDescentTests.scala
@@ -157,6 +157,14 @@ class RecursiveDescentTests extends munit.FunSuite {
         |}
         |""".stripMargin)
 
+    parseExpr(
+          """x match {
+            |  case 0 => { 42 }
+            |  case 1 => { 1; 2 }
+            |  case _ => 42
+            |}
+            |""".stripMargin)
+
     parseExpr(
       """x match {
         |  case Some(b) => acc = Cons(b, acc)
Repository: yannickcr/eslint-plugin-react (js)
Issue: jsx-no-comment-textnodes rejecting html-entity "&#x2F;&#x2F;"
The rule `jsx-no-comment-textnodes` is warning when using html-entities for slashes
(`//` -> `&#x2F;&#x2F;`)

Example:
```html
<pre>&#x2F;&#x2F; TODO: Put instructions about usage here</pre>
```
This should not warn, since it is not valid comment.
Pull request description: Fix bad report by jsx-no-comment-textnodes
The rule was reporting usage of two slashes via html entities at the
beginning of a literal between JSX elements. Since that is not a valid
comment, there should be no error reported by this rule.

Closes #1517 

Patch:
diff --git a/lib/rules/jsx-no-comment-textnodes.js b/lib/rules/jsx-no-comment-textnodes.js
index 87ec1937..1dc7b1b8 100644
--- a/lib/rules/jsx-no-comment-textnodes.js
+++ b/lib/rules/jsx-no-comment-textnodes.js
@@ -34,7 +34,10 @@ module.exports = {
 
     return {
       Literal: function(node) {
-        if (/^\s*\/(\/|\*)/m.test(node.value)) {
+        const sourceCode = context.getSourceCode();
+        // since babel-eslint has the wrong node.raw, we'll get the source text
+        const rawValue = sourceCode.getText(node);
+        if (/^\s*\/(\/|\*)/m.test(rawValue)) {
           // inside component, e.g. <div>literal</div>
           if (node.parent.type !== 'JSXAttribute' &&
               node.parent.type !== 'JSXExpressionContainer' &&


Test patch:
diff --git a/tests/lib/rules/jsx-no-comment-textnodes.js b/tests/lib/rules/jsx-no-comment-textnodes.js
index f7b20d31..2638ad89 100644
--- a/tests/lib/rules/jsx-no-comment-textnodes.js
+++ b/tests/lib/rules/jsx-no-comment-textnodes.js
@@ -131,6 +131,20 @@ ruleTester.run('jsx-no-comment-textnodes', rule, {
       <Foo title={'foo' /* valid */}/>
     `,
       parser: 'babel-eslint'
+    },
+    {
+      code: '<pre>&#x2F;&#x2F; TODO: Write perfect code</pre>'
+    },
+    {
+      code: '<pre>&#x2F;&#x2F; TODO: Write perfect code</pre>',
+      parser: 'babel-eslint'
+    },
+    {
+      code: '<pre>&#x2F;&#42; TODO: Write perfect code &#42;&#x2F;</pre>'
+    },
+    {
+      code: '<pre>&#x2F;&#42; TODO: Write perfect code &#42;&#x2F;</pre>',
+      parser: 'babel-eslint'
     }
   ],
Repository: astropenguin/xarray-dataclasses (python)
Issue: Release v0.1.1
- Update version numbers written in:
    - `pyproject.toml`
    - `xarray_dataclasses/__init__.py`
    - `tests/test_metadata.py`
Pull request description: Release v0.1.1
This PR closes #3.

Patch:
diff --git a/pyproject.toml b/pyproject.toml
index 7371ac6..cd339df 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "xarray-dataclasses"
-version = "0.1.0"
+version = "0.1.1"
 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 a1ba9df..993a3bb 100644
--- a/xarray_dataclasses/__init__.py
+++ b/xarray_dataclasses/__init__.py
@@ -1,6 +1,6 @@
 # flake8: noqa
 __author__ = "Akio Taniguchi"
-__version__ = "0.1.0"
+__version__ = "0.1.1"
 
 
 # submodules


Test patch:
diff --git a/tests/test_metadata.py b/tests/test_metadata.py
index 85f748e..ce98ba5 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.0"
+    assert xarray_dataclasses.__version__ == "0.1.1"
Repository: rwjblue/ember-template-lint (js)
Issue: New Rule: `no-unnecessary-concatenation`
#### Bad

```hbs
<img src="{{url}}" alt="{{t "alternate-text"}}">
```

#### Good

```hbs
<img src={{url}} alt={{t "alternate-text"}}>
```
Pull request description: Add `no-unnecessary-concat` rule
Resolves #350 

/cc @rwjblue @tomdale

Patch:
diff --git a/lib/rules/index.js b/lib/rules/index.js
index 1797893..7194cf9 100644
--- a/lib/rules/index.js
+++ b/lib/rules/index.js
@@ -33,4 +33,5 @@ module.exports = {
   'no-trailing-spaces': require('./lint-no-trailing-spaces'),
   'quotes': require('./lint-quotes'),
   'no-trailing-dot-in-path-expression': require('./lint-trailing-dot-in-path-expression'),
+  'no-unnecessary-concat': require('./lint-no-unnecessary-concat'),
 };
diff --git a/lib/rules/lint-no-unnecessary-concat.js b/lib/rules/lint-no-unnecessary-concat.js
new file mode 100644
index 0000000..7e8221e
--- /dev/null
+++ b/lib/rules/lint-no-unnecessary-concat.js
@@ -0,0 +1,24 @@
+'use strict';
+
+const Rule = require('./base');
+
+module.exports = class NoUnnecessaryConcat extends Rule {
+  visitor() {
+    return {
+      ConcatStatement(node) {
+        if (node.parts.length === 1) {
+          let source = this.sourceForNode(node);
+          let innerSource = this.sourceForNode(node.parts[0]);
+          let message = `Unnecessary string concatenation. Use ${innerSource} instead of ${source}.`;
+
+          this.log({
+            message,
+            line: node.loc && node.loc.start.line,
+            column: node.loc && node.loc.start.column,
+            source
+          });
+        }
+      }
+    };
+  }
+};


Test patch:
diff --git a/test/unit/rules/lint-no-unnecessary-concat-test.js b/test/unit/rules/lint-no-unnecessary-concat-test.js
new file mode 100644
index 0000000..8f3a950
--- /dev/null
+++ b/test/unit/rules/lint-no-unnecessary-concat-test.js
@@ -0,0 +1,46 @@
+'use strict';
+
+const generateRuleTests = require('../../helpers/rule-test-harness');
+
+generateRuleTests({
+  name: 'no-unnecessary-concat',
+
+  config: true,
+
+  good: [
+    '<div class={{clazz}}></div>',
+    '<div class="first {{second}}"></div>',
+    '"{{foo}}"',
+  ],
+
+  bad: [
+    {
+      template: '<div class="{{clazz}}"></div>',
+
+      result: {
+        message: 'Unnecessary string concatenation. Use {{clazz}} instead of "{{clazz}}".',
+        moduleId: 'layout.hbs',
+        source: '"{{clazz}}"',
+        line: 1,
+        column: 11,
+      },
+    },
+    {
+      template: '<img src="{{url}}" alt="{{t "alternate-text"}}">',
+
+      results: [{
+        message: 'Unnecessary string concatenation. Use {{url}} instead of "{{url}}".',
+        moduleId: 'layout.hbs',
+        source: '"{{url}}"',
+        line: 1,
+        column: 9,
+      }, {
+        message: 'Unnecessary string concatenation. Use {{t "alternate-text"}} instead of "{{t "alternate-text"}}".',
+        moduleId: 'layout.hbs',
+        source: '"{{t "alternate-text"}}"',
+        line: 1,
+        column: 23,
+      }],
+    },
+  ],
+});