Nat Mote

Results 93 comments of Nat Mote

Probably not. I introduced the concept of a standalone switch case as a pattern (e.g. just `case 4: ...`). Fully-formed switch statements already worked as patterns in JS/TS. It looks...

bisects to d30da7627196fe2c2e24127450f6a45ab1b256fb

From reading that commit, it looks like this is intended behavior. When a pattern is a statement, Semgrep no longer matches the equivalent expression when it is nested within another...

I'm not clear on the reason for splitting up parsing into two different modes. Could you provide specifics on the undesirable outcome that would occur if we were to parse...

I don't have a strong opinion here. The main thing is that I think we should make sure we don't end up with submodules that point to commits that could...

I don't think AST-based autofix would affect it. It doesn't affect fix-regex at all, since fix-regex is by definition text-based. I bet this is due to a Python truthiness test...

Let me restate the issue to make sure that I understand it: Semgrep matches the pattern `cerealizer` in your example to `foo` in the target file because of the import...

Sorry -- I meant to write https://semgrep.dev/s/OzKn. Unfortunately that doesn't actually work as desired either. If there's a reasonable workaround for this, I'm not sure what it is.

Do you have a sense for when/if this might be addressed, and how involved the fix would be?

I believe I've found a workaround, but it's not pretty. Tree sitter uses the first alias it encounters to rename the extra, so I can insert unused rules just below...