diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-07 11:41:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-07 11:41:28 +0100 |
commit | 662145d0554de5e769b92dab2d41173a98adcee5 (patch) | |
tree | ec28311a0bce6181f248ba7b50304293ad764e44 /rules/subject_checks.lua | |
parent | bbd88232db43d18f5e0de5a6502848d4074621c5 (diff) | |
download | rspamd-662145d0554de5e769b92dab2d41173a98adcee5.tar.gz rspamd-662145d0554de5e769b92dab2d41173a98adcee5.zip |
[Minor] Reformat all Lua code, no functional changes
Diffstat (limited to 'rules/subject_checks.lua')
-rw-r--r-- | rules/subject_checks.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rules/subject_checks.lua b/rules/subject_checks.lua index a21dc86cc..f781e1d6d 100644 --- a/rules/subject_checks.lua +++ b/rules/subject_checks.lua @@ -22,8 +22,8 @@ local subject_re = rspamd_regexp.create('/^(?:(?:Re|Fwd|Fw|Aw|Antwort|Sv):\\s*)+ local function test_subject(task, check_function, rate) local function normalize_linear(a, x) - local f = a * x - return true, (( f < 1 ) and f or 1), tostring(x) + local f = a * x + return true, ((f < 1) and f or 1), tostring(x) end local sbj = task:get_header('Subject') @@ -48,7 +48,7 @@ rspamd_config.SUBJ_ALL_CAPS = { local caps_test = function(sbj) return util.is_uppercase(sbj) end - return test_subject(task, caps_test, 1.0/40.0) + return test_subject(task, caps_test, 1.0 / 40.0) end, score = 3.0, group = 'subject', @@ -61,7 +61,7 @@ rspamd_config.LONG_SUBJ = { local length_test = function(_, len) return len > 200 end - return test_subject(task, length_test, 1.0/400.0) + return test_subject(task, length_test, 1.0 / 400.0) end, score = 3.0, group = 'subject', |