]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Minor] Migrate src/plugins/lua/clustering.lua to lua_shape
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 18 Nov 2025 09:55:40 +0000 (09:55 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 18 Nov 2025 09:55:40 +0000 (09:55 +0000)
commit5ea96ee892e902caaa2220faafb470f50ff8c9dc
tree3a45e87fc99f5767d8fa8aca4add27d0f07c5d31
parent2ddbf91d486bfc9ca52bc289715a424499a5a7a5
[Minor] Migrate src/plugins/lua/clustering.lua to lua_shape

Replace tableshape with lua_shape in clustering plugin.

Changes:
- ts.shape { ... } → T.table({ ... })
- ts.number, ts.string → T.number(), T.string()
- ts.number + ts.string / fn → T.one_of({T.number(), T.transform(T.string(), fn)})
- :is_optional() → :optional()
- Added comprehensive documentation to all fields

Schema: rule_schema with clustering configuration including max_elts,
expire times, score multipliers for spam/junk/ham, and selectors.
src/plugins/lua/clustering.lua