This commit is contained in:
Olivier 'reivilibre
2026-04-01 16:05:22 +01:00
parent 15449dcfc0
commit 35ecda71ca
3 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ rules:
...
- pattern: |
"...profiles..."
- pattern: |
"...user_id..."
# - pattern: |
# "...user_id..."
message: "Function '$FUNC' references both 'profiles' and 'user_id'"
languages: [python]
severity: WARNING
+2 -5
View File
@@ -5,10 +5,7 @@ rules:
def $FUNC(...):
...
- pattern: |
"=~/.*evil1.*$/"
# TODO somehow allow matching a separate node
- pattern: |
"=~/.*evil2.*$/"
message: "Function '$FUNC' contains evil1 and evil2"
"...evil..."
message: "Function '$FUNC' contains evil"
languages: [python]
severity: ERROR
+4
View File
@@ -109,6 +109,8 @@ def clone_event(event: EventBase) -> EventBase:
event.get_dict(), event.room_version, event.internal_metadata.get_dict()
)
x = "profiles"
# Starting FrozenEventV2, the event ID is an (expensive) hash of the event. This is
# lazily computed when we get the FrozenEventV2.event_id property, then cached in
# _event_id field. Later FrozenEvent formats all inherit from FrozenEventV2, so we
@@ -156,6 +158,8 @@ def prune_event_dict(room_version: RoomVersion, event_dict: JsonDict) -> JsonDic
event_type = event_dict["type"]
y = "evil"
new_content = {}
def add_fields(*fields: str) -> None: