-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Fixes for custom rules #3473
Conversation
Can you please add a test that would fail without this change so we avoid regressions in the future? 🙏 In the mean time, I'll test it against my project to confirm the fix UPDATE: Confirmed that it fixed the issue for me. |
@marcelofabri I thought about adding a test, but that would require me to leak some currently private interfaces of the |
Linux tests failing because of a new Swift version... I guess this shouldn't get fixed within this PR. |
Generated by 🚫 Danger |
This PR also addresses #3468 now. @marcelofabri I' rather not add the test you suggested as I can only think of a way of implementing it that would be depending largely on the implementation rather than on the result. |
ba17d60
to
30b35bf
Compare
Now also addresses #3477. |
As these are quite important fixes, I will test this again and probably merge it in some days' time, unless concerns emerge in the meantime. |
90645a1
to
2d17045
Compare
commit bbf1ad4 Author: JP Simard <jp@jpsim.com> Date: Fri Jan 29 13:59:28 2021 -0500 [ExplicitSelfRule] Fix violation location and misplaced corrections (realm#3507) commit 59eb887 Author: Otavio Cordeiro <otaviocc@users.noreply.github.com> Date: Fri Jan 29 18:30:57 2021 +0100 Add opt-in rule discouraged_assert (realm#3506) Co-authored-by: Keith Smiley <keithbsmiley@gmail.com> commit 6a38b15 Author: JP Simard <jp@jpsim.com> Date: Fri Jan 22 13:31:05 2021 -0500 Revert "Merge pull request realm#3473 from realm/feature/3472-fix-custom-rules-merging" (realm#3503) This reverts commit 537e53f, reversing changes made to ba49f7d. commit 6de5771 Author: JP Simard <jp@jpsim.com> Date: Fri Jan 22 12:44:30 2021 -0500 [Analyze] Support compile commands with relative paths (realm#3501) * [Analyze] Support compile commands with relative paths * Add changelog entry And made small formatting edits to other recent entries. commit 537e53f Merge: ba49f7d 22d25da Author: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Fri Jan 15 11:53:17 2021 +0100 Merge pull request realm#3473 from realm/feature/3472-fix-custom-rules-merging Multiple Fixes for custom rules commit 22d25da Author: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Fri Jan 15 00:14:50 2021 +0100 Add newline at end of yml test file commit 2d17045 Author: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Tue Dec 22 19:41:40 2020 +0100 [realm#3477] Fix bug that prevented the reconfiguration of a custom rule in a child config commit a39e72e Author: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Mon Dec 21 12:40:53 2020 +0100 Fix changelog commit 56e4f17 Author: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Sun Dec 20 00:52:17 2020 +0100 Fix if statement formatting commit 5bffc77 Author: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Sun Dec 20 00:44:49 2020 +0100 Fix custom_rules merging when a configuration is based on only_rules commit e3e169b Author: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Sat Dec 19 00:11:13 2020 +0100 Add changelog entry commit 256288a Author: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Sat Dec 19 00:03:13 2020 +0100 Separate custom rules merging & filtering to avoid misleading warnings
…custom-rules-merging"" This reverts commit ca4a0aa. Going to try to use this PR to remember to narrow down the issues I saw in my closed source project when these changes were originally merged.
Addresses #3472.
The reason why this issue occurred is that I didn't properly apply the new principle of first defining all available rules and only then filtering those that are active depending on the mode to the custom rules. As you can see, I now moved the custom rules filtering logic to the same place where the normal rules get filtered so that the filtering isn't part of the custom rules merging algorithm.