PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: goadesign/goa (go)
Issue: chi: wildcard '*' must be the last value in a route. trim trailing text or use a '{param}' instead
'panic: chi: wildcard '*' must be the last value in a route. trim trailing text or use a '{param}' instead
 I have a problem with new version in goa.design v3.13.0:

```go
var _ = Service("swagger", func() {
	Meta("swagger:generate", "false")
	Description("The swagger service serves the API swagger definition.")

	Method("jsonSpecification", func() {
		Result(MapOf(String, Any))
		HTTP(func() {
			GET("swagger/swagger.json")
			Response(StatusOK, func() {
				ContentType(jsonContentType)
			})
		})

	})
	Files("/swagger-ui/{*path}", "./swagger-ui", func() {
		Description("This path contains the Swagger UI files")
	})
})
```

It occurs when trying to mount the service.

`swaggersvr.Mount(mux, swaggerServer)`




 
Pull request description: Update wildcard handling for chi router
The upgrade to chi caused a regression for file servers using wildcards.

Fix #3357 

Patch:
diff --git a/http/codegen/server.go b/http/codegen/server.go
index 7cc5a03b..883bd29f 100644
--- a/http/codegen/server.go
+++ b/http/codegen/server.go
@@ -415,7 +415,7 @@ func {{ .MountHandler }}(mux goahttp.Muxer, h http.Handler) {
 	{{- if .IsDir }}
 		{{- range .RequestPaths }}
 	mux.Handle("GET", "{{ . }}{{if ne . "/"}}/{{end}}", h.ServeHTTP)
-	mux.Handle("GET", "{{ . }}{{if ne . "/"}}/{{end}}*{{ $.PathParam }}", h.ServeHTTP)
+	mux.Handle("GET", "{{ . }}{{if ne . "/"}}/{{end}}{*{{ $.PathParam }}}", h.ServeHTTP)
 		{{- end }}
 	{{- else }}
 		{{- range .RequestPaths }}


Test patch:
diff --git a/http/codegen/testdata/server_init_functions.go b/http/codegen/testdata/server_init_functions.go
index c2a66304..ee3a31ee 100644
--- a/http/codegen/testdata/server_init_functions.go
+++ b/http/codegen/testdata/server_init_functions.go
@@ -235,7 +235,7 @@ func (s *Server) Mount(mux goahttp.Muxer) {
 var ServerMultipleFilesMounterCode = `// MountPathToFolder configures the mux to serve GET request made to "/".
 func MountPathToFolder(mux goahttp.Muxer, h http.Handler) {
 	mux.Handle("GET", "/", h.ServeHTTP)
-	mux.Handle("GET", "/*wildcard", h.ServeHTTP)
+	mux.Handle("GET", "/{*wildcard}", h.ServeHTTP)
 }
 `
 
@@ -243,7 +243,7 @@ var ServerMultipleFilesWithPrefixPathMounterCode = `// MountPathToFolder configu
 // "/server_file_server".
 func MountPathToFolder(mux goahttp.Muxer, h http.Handler) {
 	mux.Handle("GET", "/server_file_server/", h.ServeHTTP)
-	mux.Handle("GET", "/server_file_server/*wildcard", h.ServeHTTP)
+	mux.Handle("GET", "/server_file_server/{*wildcard}", h.ServeHTTP)
 }
 `
Repository: bombsimon/wsl (go)
Issue: False-negative cuddled assignment line above
My code:
```
	// Network constants
	networkConstants := bc.Current.CurrentConstants()
	log.WithFields(log.Fields{
		"PreservedCycles":       networkConstants.PreservedCycles,
		"BlocksPerCycle":        networkConstants.BlocksPerCycle,
		"BlocksPerRollSnapshot": networkConstants.BlocksPerRollSnapshot,
		"BlocksPerCommitment":   networkConstants.BlocksPerCommitment,
	}).Debug("Loaded Network Constants")
```

Linter error:
```
tribbles.go:61:2:only cuddled expressions if assigning variable or using from line above (wsl)
	log.WithFields(log.Fields{
```

As you can see, I am absolutely using the assigned variable from the line above. Not sure how to ignore this.
Pull request description: Add *ast.KeyValueExpr as a source for RHS varaibles
Key-value expressions can use variables both as keys and values so we
must parse them to check for assigned and used variables.

Fixes #106

Patch:
diff --git a/wsl.go b/wsl.go
index 313b527..01cc9dc 100644
--- a/wsl.go
+++ b/wsl.go
@@ -845,8 +845,7 @@ func (p *Processor) findRHS(node ast.Node) []string {
 	case *ast.BasicLit, *ast.SelectStmt, *ast.ChanType,
 		*ast.LabeledStmt, *ast.DeclStmt, *ast.BranchStmt,
 		*ast.TypeSpec, *ast.ArrayType, *ast.CaseClause,
-		*ast.CommClause, *ast.KeyValueExpr, *ast.MapType,
-		*ast.FuncLit:
+		*ast.CommClause, *ast.MapType, *ast.FuncLit:
 	// Nothing to add to RHS
 	case *ast.Ident:
 		return []string{t.Name}
@@ -905,6 +904,9 @@ func (p *Processor) findRHS(node ast.Node) []string {
 		rhs = append(rhs, p.findRHS(t.X)...)
 		rhs = append(rhs, p.findRHS(t.Low)...)
 		rhs = append(rhs, p.findRHS(t.High)...)
+	case *ast.KeyValueExpr:
+		rhs = p.findRHS(t.Key)
+		rhs = append(rhs, p.findRHS(t.Value)...)
 	default:
 		if x, ok := maybeX(t); ok {
 			return p.findRHS(x)


Test patch:
diff --git a/wsl_test.go b/wsl_test.go
index 3dd30e9..10b9a3d 100644
--- a/wsl_test.go
+++ b/wsl_test.go
@@ -1921,6 +1921,19 @@ func TestWithConfig(t *testing.T) {
 				reasonShortDeclNotExclusive,
 			},
 		},
+		{
+			description: "key value pairs can use variables",
+			code: []byte(`package main
+
+			func main() {
+				someData := GetSomeData()
+				log.WithFields(log.Fields{
+					"data1": someData.One,
+					"data2": someData.Two,
+					"data3": someData.Three,
+				}).Debug("Got some data")
+			}`),
+		},
 	}
 
 	for _, tc := range cases {
Repository: sindresorhus/query-string (js)
Issue: TypeError when both parseBooleans and parseNumbers are enabled
Repro:
```js
const queryString = require('query-string');

queryString.parse(
  'num=1.23&bool=false', { parseNumbers: true, parseBooleans: true }
);
```
Results in error
```
/home/user/project/node_modules/query-string/index.js:209
                if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {
                                                                      ^

TypeError: value.toLowerCase is not a function
```

Using query-string 6.8.0 and node 10.16.0
Pull request description: Fix using the `parseNumbers` and `parseBooleans` options together
Not tested but I expect it to work. Problem was that if it's was a number, value was set to number already and it still checked if it's a boolean.

Fixes #186

Patch:
diff --git a/index.js b/index.js
index 552baa4..da459c9 100644
--- a/index.js
+++ b/index.js
@@ -204,9 +204,7 @@ function parse(input, options) {
 
 		if (options.parseNumbers && !Number.isNaN(Number(value))) {
 			value = Number(value);
-		}
-
-		if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {
+		} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {
 			value = value.toLowerCase() === 'true';
 		}
 


Test patch:
diff --git a/test/parse.js b/test/parse.js
index 61bba90..9ae2dc6 100644
--- a/test/parse.js
+++ b/test/parse.js
@@ -253,3 +253,8 @@ test('boolean value returns as boolean if option is set', t => {
 	t.deepEqual(queryString.parse('foo=true', {parseBooleans: true}), {foo: true});
 	t.deepEqual(queryString.parse('foo=false&bar=true', {parseBooleans: true}), {foo: false, bar: true});
 });
+
+test('boolean value returns as boolean and number value as number if both options are set', t => {
+	t.deepEqual(queryString.parse('foo=true&bar=1.12', {parseNumbers: true, parseBooleans: true}), {foo: true, bar: 1.12});
+	t.deepEqual(queryString.parse('foo=16.32&bar=false', {parseNumbers: true, parseBooleans: true}), {foo: 16.32, bar: false});
+});