Skip to content

Commit 4da60bf

Browse files
Improve interop-rules.md loading: trigger on diff content, not just file presence
The previous heuristic loaded interop rules only when both C# and native files changed. This missed cases where a C#-only diff touches JNI/P/Invoke boundary code (e.g., DllImport, [Register], JNIEnv, [MarshalAs], [StructLayout]). Now triggers based on actual interop markers in the diff. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f3e52e3 commit 4da60bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/skills/android-reviewer/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Based on the file types identified in step 2, read the appropriate rule files fr
7272
- `references/csharp-rules.md` — When any `.cs` files changed. Covers nullable, async, error handling, performance, and code organization.
7373
- `references/msbuild-rules.md` — When `.targets`, `.props`, `.projitems`, or `.csproj` files changed, or when MSBuild task C# files changed (e.g., files under `src/Xamarin.Android.Build.Tasks/`).
7474
- `references/native-rules.md` — When `.c`, `.cpp`, `.h`, or `.hpp` files changed. Covers memory management, C++ best practices, symbol visibility, and platform-specific code.
75-
- `references/interop-rules.md` — When both C# and native files changed, or when P/Invoke or JNI boundary files changed (e.g., files under `src/Mono.Android/` that contain `DllImport` or files under `src/native/` that reference managed types).
75+
- `references/interop-rules.md` — When both C# and native files changed, or when the diff contains P/Invoke or JNI interop code (e.g., `DllImport`, `[Register]` attribute changes, `JNIEnv` calls, `[MarshalAs]`, `[StructLayout]`, or marshal-related changes in files under `src/Mono.Android/` or `src/native/`).
7676
- `references/testing-rules.md` — When test files changed (e.g., files under `tests/`, `**/Tests/`, or test project directories).
7777
- `references/security-rules.md` — When any code files changed (C#, C/C++, or MSBuild).
7878

0 commit comments

Comments
 (0)