nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: styled-components/babel-plugin-styled-components
Pull request #381 (2022-10-14 07:10:54)

Add tricky expression on object expression
except object key interpolation if property value is member expression

```tsx
const ObjectInterpolationMember = p => {
  const theme = useTheme()
  const color = 'red'

  return (
    <p
      css={{
        color: theme.colors[color],
      }}
    >
      H
    </p>
  )
}
```

<img width="1093" alt="스크린샷 2023-04-06 오전 2 44 34" src="https://user-images.githubusercontent.com/58503584/230161829-aaf56106-d6fa-423f-ad46-a24a95050f17.png">


healtheloper: @probablyup 👀

Patch:
diff --git a/src/visitors/transpileCssProp.js b/src/visitors/transpileCssProp.js
index 930fcf4..2c5b057 100644
--- a/src/visitors/transpileCssProp.js
+++ b/src/visitors/transpileCssProp.js
@@ -163,6 +163,7 @@ export default t => (path, state) => {
             ? property.key.name !== property.value.name
             : true) &&
           // and not a tricky expression
+          !t.isMemberExpression(property.value) &&
           !t.isLogicalExpression(property.value) &&
           !t.isConditionalExpression(property.value))
       ) {


Test patch:
diff --git a/test/fixtures/transpile-css-prop/code.js b/test/fixtures/transpile-css-prop/code.js
index 755c436..1a4ed2c 100644
--- a/test/fixtures/transpile-css-prop/code.js
+++ b/test/fixtures/transpile-css-prop/code.js
@@ -233,6 +233,21 @@ const ObjectInterpolationLogical = ({ bg, content, height, width, ...p }) => {
   )
 }
 
+const ObjectInterpolationMember = p => {
+  const theme = useTheme()
+  const color = 'red'
+
+  return (
+    <p
+      css={{
+        color: theme.colors[color],
+      }}
+    >
+      H
+    </p>
+  )
+}
+
 const RenderPropComponentCSSProp = () => {
   return (
     <RenderPropComponent>
diff --git a/test/fixtures/transpile-css-prop/output.js b/test/fixtures/transpile-css-prop/output.js
index 339ef75..f3ad67c 100644
--- a/test/fixtures/transpile-css-prop/output.js
+++ b/test/fixtures/transpile-css-prop/output.js
@@ -206,6 +206,14 @@ var ObjectInterpolationLogical = function ObjectInterpolationLogical(_ref4) {
     </_StyledP14>;
 };
 
+var ObjectInterpolationMember = function ObjectInterpolationMember(p) {
+  var theme = useTheme();
+  var color = 'red';
+  return <_StyledP15 $_css19={theme.colors[color]}>
+      H
+    </_StyledP15>;
+};
+
 var RenderPropComponentCSSProp = function RenderPropComponentCSSProp() {
   return <RenderPropComponent>
       {function () {
@@ -309,6 +317,12 @@ var _StyledP14 = (0, _styledComponents["default"])("p")(function (p) {
   };
 });
 
+var _StyledP15 = (0, _styledComponents["default"])("p")(function (p) {
+  return {
+    color: p.$_css19
+  };
+});
+
 var _StyledDiv2 = (0, _styledComponents["default"])("div")(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n            color: black;\n          "])));
 
 var _StyledDiv3 = (0, _styledComponents["default"])("div")(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n            color: black;\n          "])));
Repository: honeybadger-io/honeybadger-elixir
Pull request #604 (2025-04-04 13:06:28)

Sanitizer updates
* Convert date like structs to a ISO8601 representation
* If sanitizing removes all keys from a nested map, remove the root key as well.


Patch:
diff --git a/lib/honeybadger/utils.ex b/lib/honeybadger/utils.ex
index c47ef07..8ce5920 100644
--- a/lib/honeybadger/utils.ex
+++ b/lib/honeybadger/utils.ex
@@ -88,6 +88,11 @@ defmodule Honeybadger.Utils do
     @depth_token
   end
 
+  defp sanitize_val(%DateTime{} = datetime, _), do: DateTime.to_iso8601(datetime)
+  defp sanitize_val(%NaiveDateTime{} = naive, _), do: NaiveDateTime.to_iso8601(naive)
+  defp sanitize_val(%Date{} = date, _), do: Date.to_iso8601(date)
+  defp sanitize_val(%Time{} = time, _), do: Time.to_iso8601(time)
+
   defp sanitize_val(%{__struct__: _} = struct, opts) do
     sanitize_val(Map.from_struct(struct), opts)
   end
@@ -105,7 +110,18 @@ defmodule Honeybadger.Utils do
           Map.put(acc, key, @filtered_token)
         end
       else
-        Map.put(acc, key, sanitize_val(val, Map.put(opts, :depth, depth + 1)))
+        # If the sanitized value is empty after removal, we don't want to
+        # include it in the sanitized map.
+        case sanitize_val(val, Map.put(opts, :depth, depth + 1)) do
+          v when is_map(v) and map_size(v) == 0 and v != val ->
+            acc
+
+          v when is_list(v) and length(v) == 0 and v != val ->
+            acc
+
+          v ->
+            Map.put(acc, key, v)
+        end
       end
     end)
   end


Test patch:
diff --git a/test/honeybadger/utils_test.exs b/test/honeybadger/utils_test.exs
index 5161597..2ebfe4f 100644
--- a/test/honeybadger/utils_test.exs
+++ b/test/honeybadger/utils_test.exs
@@ -30,6 +30,20 @@ defmodule Honeybadger.UtilsTest do
     assert Utils.sanitize(item, max_depth: 2) == [["[DEPTH]"], 1, 2, 3]
   end
 
+  test "converts dates to ISO8601" do
+    item = %{
+      date: ~D[2023-10-01],
+      datetime: ~U[2023-10-01 12:00:00Z],
+      naive_datetime: ~N[2023-10-01 12:00:00]
+    }
+
+    assert Utils.sanitize(item) == %{
+             date: "2023-10-01",
+             datetime: "2023-10-01T12:00:00Z",
+             naive_datetime: "2023-10-01T12:00:00"
+           }
+  end
+
   test "sanitize truncates strings" do
     item = "123456789"
 
@@ -47,4 +61,17 @@ defmodule Honeybadger.UtilsTest do
              okay: "not a secret at all"
            }
   end
+
+  test "sanitize removes nested keys" do
+    item = %{
+      key1: "val1",
+      key2: %{
+        __remove__: "val2"
+      }
+    }
+
+    assert Utils.sanitize(item, filter_keys: [:__remove__], remove_filtered: true) == %{
+             key1: "val1"
+           }
+  end
 end
Repository: hrzndhrn/recode
Pull request #92 (2024-07-02 21:06:01)

Fix tags task issue

coveralls: ## Pull Request Test Coverage Report for [Build dcb0ebf6c70cc1e2b778ab6fe79625672feb1c4e](https://coveralls.io/builds/68431181)


### Details

* **0** of **0**   changed or added relevant lines in **0** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage remained the same at **91.111%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/68431181/badge)](https://coveralls.io/builds/68431181) |
| :-- | --: |
| Change from base [Build 3fa7f5828849bf6412530b4099697e2316a12c06](https://coveralls.io/builds/68430521): |  0.0% |
| Covered Lines: | 943 |
| Relevant Lines: | 1035 |

---
##### 💛  - [Coveralls](https://coveralls.io)


Patch:
diff --git a/lib/recode/task/tags.ex b/lib/recode/task/tags.ex
index adfbddc..c45f123 100644
--- a/lib/recode/task/tags.ex
+++ b/lib/recode/task/tags.ex
@@ -45,7 +45,7 @@ defmodule Recode.Task.Tags do
     Source.add_issues(source, issues)
   end
 
-  defp check_tags(%Zipper{node: {doc, _meta, args}} = zipper, issues, opts)
+  defp check_tags(%Zipper{node: {:@, _, [{doc, _, args}]}} = zipper, issues, opts)
        when doc in [:moduledoc, :doc, :shortdoc] do
     issues =
       if opts[:include_docs] && doc?(args) do


Test patch:
diff --git a/test/recode/task/tags_test.exs b/test/recode/task/tags_test.exs
index 1aa9feb..91d237f 100644
--- a/test/recode/task/tags_test.exs
+++ b/test/recode/task/tags_test.exs
@@ -80,6 +80,16 @@ defmodule Recode.Task.TagsTest do
       |> refute_issues()
     end
 
+    test "triggers no issue for doc function" do
+      ~s'''
+      defmodule Foo do
+        def doc(:x), do: :x
+      end
+      '''
+      |> run_task(Tags, tag: "TODO", reporter: Tags)
+      |> refute_issues()
+    end
+
     #
     # cases raising issues
     #