nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: raviqqe/muffet
Pull request #299 (2023-04-19 02:36:57)

Deprecate options


Patch:
diff --git a/arguments.go b/arguments.go
index 5c93454..a9dba4f 100644
--- a/arguments.go
+++ b/arguments.go
@@ -22,11 +22,12 @@ type arguments struct {
 	// TODO Remove a short option.
 	IgnoreFragments bool   `short:"f" long:"ignore-fragments" description:"Ignore URL fragments"`
 	Format          string `long:"format" description:"Output format" default:"text" choice:"text" choice:"json" choice:"junit"`
-	// TODO Merge text, JSON, and JUnit XML format options into --format.
-	JSONOutput bool `long:"json" description:"Output results in JSON"`
-	// TODO Integrate this option into --verbose.
-	VerboseJSON         bool   `long:"experimental-verbose-json" description:"Include successful results in JSON"`
-	JUnitOutput         bool   `long:"junit" description:"Output results as JUnit XML file"`
+	// TODO Remove this option.
+	JSONOutput bool `long:"json" description:"Output results in JSON (deprecated)"`
+	// TODO Remove this option.
+	VerboseJSON bool `long:"experimental-verbose-json" description:"Include successful results in JSON (deprecated)"`
+	// TODO Remove this option.
+	JUnitOutput         bool   `long:"junit" description:"Output results as JUnit XML file (deprecated)"`
 	MaxRedirections     int    `short:"r" long:"max-redirections" value-name:"<count>" default:"64" description:"Maximum number of redirections"`
 	RateLimit           int    `long:"rate-limit" value-name:"<rate>" description:"Max requests per second"`
 	Timeout             int    `short:"t" long:"timeout" value-name:"<seconds>" default:"10" description:"Timeout for HTTP requests in seconds"`


Test patch:
diff --git a/.snapshots/TestHelp b/.snapshots/TestHelp
index f09e95f..8cd6ee2 100644
--- a/.snapshots/TestHelp
+++ b/.snapshots/TestHelp
@@ -21,9 +21,11 @@ Application Options:
       --header=<header>...                  Custom headers
   -f, --ignore-fragments                    Ignore URL fragments
       --format=[text|json|junit]            Output format (default: text)
-      --json                                Output results in JSON
+      --json                                Output results in JSON (deprecated)
       --experimental-verbose-json           Include successful results in JSON
+                                            (deprecated)
       --junit                               Output results as JUnit XML file
+                                            (deprecated)
   -r, --max-redirections=<count>            Maximum number of redirections
                                             (default: 64)
       --rate-limit=<rate>                   Max requests per second
Repository: raviqqe/muffet
Pull request #367 (2024-02-28 10:18:32)

Rename `Contains` methods


Patch:
diff --git a/redirect_http_client.go b/redirect_http_client.go
index 15d6e78..89151f0 100644
--- a/redirect_http_client.go
+++ b/redirect_http_client.go
@@ -43,7 +43,7 @@ func (c *redirectHttpClient) Get(u *url.URL, header http.Header) (httpResponse,
 
 		code := r.StatusCode()
 
-		if c.acceptedStatusCodes.isInSet(code) {
+		if c.acceptedStatusCodes.Contains(code) {
 			return r, nil
 		} else if code >= 300 && code <= 399 {
 			i++
diff --git a/status_code_range.go b/status_code_range.go
index 3b0168d..6e07d3b 100644
--- a/status_code_range.go
+++ b/status_code_range.go
@@ -35,6 +35,6 @@ func parseStatusCodeRange(s string) (*statusCodeRange, error) {
 	return &statusCodeRange{cs[0], cs[1]}, nil
 }
 
-func (r statusCodeRange) isInRange(code int) bool {
+func (r statusCodeRange) Contains(code int) bool {
 	return code >= r.start && code < r.end
 }
diff --git a/status_code_set.go b/status_code_set.go
index 790d434..b4fb2cc 100644
--- a/status_code_set.go
+++ b/status_code_set.go
@@ -19,9 +19,9 @@ func parseStatusCodeSet(value string) (statusCodeSet, error) {
 	return rs, nil
 }
 
-func (s statusCodeSet) isInSet(code int) bool {
+func (s statusCodeSet) Contains(code int) bool {
 	for r := range s {
-		if r.isInRange(code) {
+		if r.Contains(code) {
 			return true
 		}
 	}


Test patch:
diff --git a/status_code_range_test.go b/status_code_range_test.go
index 47b1d51..3d45518 100644
--- a/status_code_range_test.go
+++ b/status_code_range_test.go
@@ -30,11 +30,11 @@ func TestParsingInvalidStatusCode(t *testing.T) {
 func TestInRangeOfStatusCode(t *testing.T) {
 	r := statusCodeRange{200, 300}
 
-	assert.False(t, r.isInRange(199))
-	assert.True(t, r.isInRange(200))
-	assert.True(t, r.isInRange(201))
+	assert.False(t, r.Contains(199))
+	assert.True(t, r.Contains(200))
+	assert.True(t, r.Contains(201))
 
-	assert.True(t, r.isInRange(298))
-	assert.True(t, r.isInRange(299))
-	assert.False(t, r.isInRange(300))
+	assert.True(t, r.Contains(298))
+	assert.True(t, r.Contains(299))
+	assert.False(t, r.Contains(300))
 }
Repository: raviqqe/muffet
Pull request #408 (2024-09-15 04:41:21)

Update help test
- **Fix**
- **Fix**



Patch:
diff --git a/arguments.go b/arguments.go
index d807ad6..71195fb 100644
--- a/arguments.go
+++ b/arguments.go
@@ -11,7 +11,7 @@ import (
 )
 
 type arguments struct {
-	RawAcceptedStatusCodes string   `long:"accepted-status-codes" value-name:"<codes>" default:"200..300" description:"Accepted HTTP response status codes, example '200..300,403'"`
+	RawAcceptedStatusCodes string   `long:"accepted-status-codes" value-name:"<codes>" default:"200..300" description:"Accepted HTTP response status codes (e.g. '200..300,403')"`
 	BufferSize             int      `short:"b" long:"buffer-size" value-name:"<size>" default:"4096" description:"HTTP response buffer size in bytes"`
 	MaxConnections         int      `short:"c" long:"max-connections" value-name:"<count>" default:"512" description:"Maximum number of HTTP connections"`
 	MaxConnectionsPerHost  int      `long:"max-connections-per-host" value-name:"<count>" default:"512" description:"Maximum number of HTTP connections per host"`


Test patch:
diff --git a/.snapshots/TestHelp b/.snapshots/TestHelp
index 53f3d1a..fbddea1 100644
--- a/.snapshots/TestHelp
+++ b/.snapshots/TestHelp
@@ -3,7 +3,8 @@ Usage:
 
 Application Options:
       --accepted-status-codes=<codes>       Accepted HTTP response status codes
-                                            (default: 200..300)
+                                            (e.g. '200..300,403') (default:
+                                            200..300)
   -b, --buffer-size=<size>                  HTTP response buffer size in bytes
                                             (default: 4096)
   -c, --max-connections=<count>             Maximum number of HTTP connections