Skip to content

C#: The field implicit param can be skipped in a pattern#525

Merged
maciejpirog merged 1 commit intomainfrom
mpir/csharp-make-implicit-field-param-extern
Jan 7, 2026
Merged

C#: The field implicit param can be skipped in a pattern#525
maciejpirog merged 1 commit intomainfrom
mpir/csharp-make-implicit-field-param-extern

Conversation

@maciejpirog
Copy link
Copy Markdown
Contributor

If we don't care about the field value in the rule, we can now skip it in the pattern. That is, we can write patterns like

  pattern-sources:
    - patterns:
      - pattern-inside: |
          [set] $T $F($VALUE) { ... }
      - focus-metavariable: $VALUE
      - metavariable-regex:
          metavariable: $VALUE
          regex: value

This is more in line with what code is generated for properties by the C# compiler

@maciejpirog maciejpirog merged commit 11721ac into main Jan 7, 2026
6 checks passed
@maciejpirog maciejpirog deleted the mpir/csharp-make-implicit-field-param-extern branch January 7, 2026 00:19
@dimitris-m dimitris-m mentioned this pull request Jan 8, 2026
@dimitris-m dimitris-m added the lang Add or improve language support label Jan 11, 2026
@maciejpirog maciejpirog mentioned this pull request Jan 14, 2026
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 17, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [opengrep/opengrep](https://github.com/opengrep/opengrep) | minor | `v1.14.1` → `v1.15.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>opengrep/opengrep (opengrep/opengrep)</summary>

### [`v1.15.1`](https://github.com/opengrep/opengrep/releases/tag/v1.15.1): Opengrep 1.15.1

[Compare Source](opengrep/opengrep@v1.15.0...v1.15.1)

#### Bug fixes

- Clojure translation improvements by [@&#8203;dimitris-m](https://github.com/dimitris-m) in [#&#8203;534](opengrep/opengrep#534)

**Full Changelog**: <opengrep/opengrep@v1.15.0...v1.15.1>

### [`v1.15.0`](https://github.com/opengrep/opengrep/releases/tag/v1.15.0): Opengrep 1.15.0

[Compare Source](opengrep/opengrep@v1.14.1...v1.15.0)

#### What's Changed

- Clojure translation part III by [@&#8203;dimitris-m](https://github.com/dimitris-m) in [#&#8203;527](opengrep/opengrep#527)
- Php modernisation by [@&#8203;corneliuhoffman](https://github.com/corneliuhoffman) in [#&#8203;529](opengrep/opengrep#529)
- Intrafile tainting with variadic functions by [@&#8203;maciejpirog](https://github.com/maciejpirog) in [#&#8203;538](opengrep/opengrep#538)
- C#: The `field` implicit parameter can be skipped in a pattern by [@&#8203;maciejpirog](https://github.com/maciejpirog) in [#&#8203;525](opengrep/opengrep#525)
- C#: Add conditional array access (`?[...]`) to l-values by [@&#8203;maciejpirog](https://github.com/maciejpirog) in [#&#8203;535](opengrep/opengrep#535)
- C#: Collection expressions vs attributes with targets (parser fix) by [@&#8203;maciejpirog](https://github.com/maciejpirog) in [#&#8203;539](opengrep/opengrep#539)
- Add `noopengrep` to the default nosem patterns by [@&#8203;dimitris-m](https://github.com/dimitris-m) in [#&#8203;533](opengrep/opengrep#533)

**Full Changelog**: <opengrep/opengrep@v1.14.1...v1.15.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44MS4yIiwidXBkYXRlZEluVmVyIjoiNDIuODIuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang Add or improve language support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants