PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: sindresorhus/awesome-lint (js)

Issue:
Add support for the new badge
In the badge rule.

This one `https://awesome.re/badge-flat2.svg`

Pull request:
Add support for the new Awesome badge
Whitelist the new badge.

Fixes #61 

Patch:
diff --git a/rules/badge.js b/rules/badge.js
index 052df3c..8b53b92 100644
--- a/rules/badge.js
+++ b/rules/badge.js
@@ -9,7 +9,8 @@ const badgeUrlWhitelist = new Set([
 
 const badgeSrcUrlWhitelist = new Set([
 	'https://awesome.re/badge.svg',
-	'https://awesome.re/badge-flat.svg'
+	'https://awesome.re/badge-flat.svg',
+	'https://awesome.re/badge-flat2.svg'
 ]);
 
 const isValidBadgeUrl = url => badgeUrlWhitelist.has(url);


Test patch:
diff --git a/test/fixtures/badge/success2.md b/test/fixtures/badge/success2.md
new file mode 100644
index 0000000..e57e8c2
--- /dev/null
+++ b/test/fixtures/badge/success2.md
@@ -0,0 +1,15 @@
+# Foo [![Awesome](https://awesome.re/badge-flat2.svg)](https://github.com/sindresorhus/awesome)
+
+> Bar
+
+## Contents
+
+- [Foo](#foo)
+
+## Foo
+
+non-empty
+
+## License
+
+non-empty
diff --git a/test/rules/badge.js b/test/rules/badge.js
index 3758489..d997b68 100644
--- a/test/rules/badge.js
+++ b/test/rules/badge.js
@@ -47,3 +47,8 @@ test('badge - success (long)', async t => {
 	const messages = await lint({config, filename: 'test/fixtures/badge/success1.md'});
 	t.deepEqual(messages, []);
 });
+
+test('badge - success (new badge)', async t => {
+	const messages = await lint({config, filename: 'test/fixtures/badge/success2.md'});
+	t.deepEqual(messages, []);
+});
Repository: Peternator7/strum (rust)

Issue:
Disabled variant still included in Count
The [additional attributes docs](https://docs.rs/strum/latest/strum/additional_attributes/index.html#attributes-on-variants) define the `disabled` attribute as:

> `disabled`: removes variant from generated code.

However, when deriving the `EnumCount` trait, the disabled variant is still counted in the final count.


Here is some example code:

```rust
use strum::EnumCount;

#[derive(strum::EnumCount)]
enum Fields {
    Field0,
    Field1,
    Field2,
    #[strum(disabled)]
    Unknown,
}

fn main() {
    println!("Count: {}", Fields::COUNT);
}
````

Expected output: `Count: 3`
Actual output: `Count: 4`

This issue seems similar to #244 

Pull request:
Fix EnumCount with disabled variants
Do not include disabled variants in the count with EnumCount. Fixes #267

Patch:
diff --git a/strum_macros/src/macros/enum_count.rs b/strum_macros/src/macros/enum_count.rs
index 44c7f2e..b9e6aaa 100644
--- a/strum_macros/src/macros/enum_count.rs
+++ b/strum_macros/src/macros/enum_count.rs
@@ -2,11 +2,18 @@ use proc_macro2::TokenStream;
 use quote::quote;
 use syn::{Data, DeriveInput};
 
+use crate::helpers::variant_props::HasStrumVariantProperties;
 use crate::helpers::{non_enum_error, HasTypeProperties};
 
 pub(crate) fn enum_count_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
     let n = match &ast.data {
-        Data::Enum(v) => v.variants.len(),
+        Data::Enum(v) => v.variants.iter().try_fold(0usize, |acc, v| {
+            if v.get_variant_properties()?.disabled.is_none() {
+                Ok::<usize, syn::Error>(acc + 1usize)
+            } else {
+                Ok::<usize, syn::Error>(acc)
+            }
+        })?,
         _ => return Err(non_enum_error()),
     };
     let type_properties = ast.get_type_properties()?;


Test patch:
diff --git a/strum_tests/tests/enum_count.rs b/strum_tests/tests/enum_count.rs
index 794e563..db98110 100644
--- a/strum_tests/tests/enum_count.rs
+++ b/strum_tests/tests/enum_count.rs
@@ -11,12 +11,29 @@ enum Week {
     Saturday,
 }
 
+#[allow(dead_code)]
+#[derive(Debug, EnumCount, EnumIter)]
+enum Pets {
+    Dog,
+    Cat,
+    Fish,
+    Bird,
+    #[strum(disabled)]
+    Hamster,
+}
+
 #[test]
 fn simple_test() {
     assert_eq!(7, Week::COUNT);
     assert_eq!(Week::iter().count(), Week::COUNT);
 }
 
+#[test]
+fn disabled_test() {
+    assert_eq!(4, Pets::COUNT);
+    assert_eq!(Pets::iter().count(), Pets::COUNT);
+}
+
 #[test]
 fn crate_module_path_test() {
     pub mod nested {
Repository: graphql/graphql-js (ts)

Issue:
Input object coercion should reject arrays directly
If an array is fed into input object coercion it should be rejected directly, rather than passing the object check and then failing on the keys checks.

See this repro:

https://gist.github.com/benjie/58ba75340a85b0da4b403973bea2c5fb

Seems like adding a `!Array.isArray(...)` check should cover it?

Pull request:
fix(coerce-input-value): input object coercion rejects arrays
This PR closes #4365 

Rejects arrays when input type is an object. Works for top level arrays and deep ones. 

Patch:
diff --git a/src/utilities/coerceInputValue.ts b/src/utilities/coerceInputValue.ts
index eeab0614..5263e925 100644
--- a/src/utilities/coerceInputValue.ts
+++ b/src/utilities/coerceInputValue.ts
@@ -86,7 +86,7 @@ function coerceInputValueImpl(
   }
 
   if (isInputObjectType(type)) {
-    if (!isObjectLike(inputValue)) {
+    if (!isObjectLike(inputValue) || Array.isArray(inputValue)) {
       onError(
         pathToArray(path),
         inputValue,


Test patch:
diff --git a/src/utilities/__tests__/coerceInputValue-test.ts b/src/utilities/__tests__/coerceInputValue-test.ts
index 3692ce26..03afca6a 100644
--- a/src/utilities/__tests__/coerceInputValue-test.ts
+++ b/src/utilities/__tests__/coerceInputValue-test.ts
@@ -183,11 +183,19 @@ describe('coerceInputValue', () => {
   });
 
   describe('for GraphQLInputObject', () => {
+    const DeepObject = new GraphQLInputObjectType({
+      name: 'DeepObject',
+      fields: {
+        foo: { type: new GraphQLNonNull(GraphQLInt) },
+        bar: { type: GraphQLInt },
+      },
+    });
     const TestInputObject = new GraphQLInputObjectType({
       name: 'TestInputObject',
       fields: {
         foo: { type: new GraphQLNonNull(GraphQLInt) },
         bar: { type: GraphQLInt },
+        deepObject: { type: DeepObject },
       },
     });
 
@@ -271,6 +279,31 @@ describe('coerceInputValue', () => {
         },
       ]);
     });
+
+    it('returns an error for an array type', () => {
+      const result = coerceValue([{ foo: 1 }, { bar: 1 }], TestInputObject);
+      expectErrors(result).to.deep.equal([
+        {
+          error: 'Expected type "TestInputObject" to be an object.',
+          path: [],
+          value: [{ foo: 1 }, { bar: 1 }],
+        },
+      ]);
+    });
+
+    it('returns an error for an array type on a nested field', () => {
+      const result = coerceValue(
+        { foo: 1, deepObject: [1, 2, 3] },
+        TestInputObject,
+      );
+      expectErrors(result).to.deep.equal([
+        {
+          error: 'Expected type "DeepObject" to be an object.',
+          path: ['deepObject'],
+          value: [1, 2, 3],
+        },
+      ]);
+    });
   });
 
   describe('for GraphQLInputObject that isOneOf', () => {
Repository: VincentLanglet/Twig-CS-Fixer (php)

Issue:
Trailing Comma MultiLine rule breaks multiline strings
### Rule(s) related to or rule(s) missing

TrailingCommaMultiLineRule

### Expected behavior

Any twig function with a multiline string parameter should not trigger a fatal error.

```twig
{{ dump('line1
    line2') }}
```

### Actual behavior

```
KO templates/test/index.html
 ------- ------------------------------------------------------------------------------------ 
  FATAL   >>   | Unable to fix file: Too many iteration while trying to fix file.             
 ------- ------------------------------------------------------------------------------------ 
  ERROR   9    |     {{ dump('line1                                                           
          10   |     line2') }}                                                               
          >>   | Multi-line arrays, objects and parameters lists should have trailing comma.  
          11   | </body>                                                                      
 ------- ------------------------------------------------------------------------------------ 
```


Pull request:
fix(rules): revert TrailingCommaMultiLineRule
Fixes #257 #256 

Temporary disable this rule (too buggy for now).

Patch:
diff --git a/src/Standard/TwigCsFixer.php b/src/Standard/TwigCsFixer.php
index a4cc6b3..cd96e38 100644
--- a/src/Standard/TwigCsFixer.php
+++ b/src/Standard/TwigCsFixer.php
@@ -6,7 +6,6 @@ namespace TwigCsFixer\Standard;
 
 use TwigCsFixer\Rules\Delimiter\BlockNameSpacingRule;
 use TwigCsFixer\Rules\Function\IncludeFunctionRule;
-use TwigCsFixer\Rules\Punctuation\TrailingCommaMultiLineRule;
 use TwigCsFixer\Rules\Punctuation\TrailingCommaSingleLineRule;
 use TwigCsFixer\Rules\String\HashQuoteRule;
 use TwigCsFixer\Rules\String\SingleQuoteRule;
@@ -31,7 +30,6 @@ final class TwigCsFixer implements StandardInterface
             new IncludeFunctionRule(),
             new IndentRule(),
             new SingleQuoteRule(),
-            new TrailingCommaMultiLineRule(),
             new TrailingCommaSingleLineRule(),
             new TrailingSpaceRule(),
         ];


Test patch:
diff --git a/tests/Standard/TwigCsFixerTest.php b/tests/Standard/TwigCsFixerTest.php
index 32e7f92..220c4f3 100644
--- a/tests/Standard/TwigCsFixerTest.php
+++ b/tests/Standard/TwigCsFixerTest.php
@@ -11,7 +11,6 @@ use TwigCsFixer\Rules\Function\IncludeFunctionRule;
 use TwigCsFixer\Rules\Operator\OperatorNameSpacingRule;
 use TwigCsFixer\Rules\Operator\OperatorSpacingRule;
 use TwigCsFixer\Rules\Punctuation\PunctuationSpacingRule;
-use TwigCsFixer\Rules\Punctuation\TrailingCommaMultiLineRule;
 use TwigCsFixer\Rules\Punctuation\TrailingCommaSingleLineRule;
 use TwigCsFixer\Rules\String\HashQuoteRule;
 use TwigCsFixer\Rules\String\SingleQuoteRule;
@@ -41,7 +40,6 @@ final class TwigCsFixerTest extends TestCase
             new IncludeFunctionRule(),
             new IndentRule(),
             new SingleQuoteRule(),
-            new TrailingCommaMultiLineRule(),
             new TrailingCommaSingleLineRule(),
             new TrailingSpaceRule(),
         ], $standard->getRules());