Skip to content

Commit

Permalink
Use more colloquial names in rule_id for watch/blacklists
Browse files Browse the repository at this point in the history
  • Loading branch information
makyen committed May 31, 2022
1 parent 544c3b0 commit c4ca85c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions findspam.py
Original file line number Diff line number Diff line change
Expand Up @@ -2212,11 +2212,11 @@ def religion_troll(s, site):
FindSpam.rule_bad_keywords = create_rule("bad keyword in {}", regex="",
username=True, body_summary=True,
max_rep=32, max_score=1, skip_creation_sanity_check=True,
rule_id="Bad keywords: main detection")
rule_id="main blacklisted keywords")
FindSpam.rule_watched_keywords = create_rule("potentially bad keyword in {}", regex="",
username=True, body_summary=True,
max_rep=32, max_score=1, skip_creation_sanity_check=True,
rule_id="Potentialy bad keywords: main detection (watchlist)",
rule_id="main watchlist",
elapsed_time_reporting={
'draw_attention_min': 20,
'levels': [
Expand All @@ -2227,11 +2227,11 @@ def religion_troll(s, site):
})
FindSpam.rule_blacklisted_websites = create_rule("blacklisted website in {}", regex="", body_summary=True,
max_rep=52, max_score=5, skip_creation_sanity_check=True,
rule_id="Blacklisted websites: main detection")
rule_id="main blacklisted websites")
FindSpam.rule_blacklisted_usernames = create_rule("blacklisted username", regex="",
title=False, body=False, username=True,
skip_creation_sanity_check=True,
rule_id="Blacklisted usernames: main detection")
rule_id="main blacklisted usernames")

# gratis near the beginning of post or in title, SoftwareRecs and es.stackoverflow.com are exempt
create_rule("potentially bad keyword in {}", r"(?is)gratis\b(?<=^.{0,200}\bgratis\b)",
Expand Down

0 comments on commit c4ca85c

Please sign in to comment.