http://bugzilla.spamassassin.org/show_bug.cgi?id=3370

           Summary: Further enhancement request for --lint
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Regression Tests
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


--lint might not be the proper place for this, some of it might but not all.

Those of us who create a lot of custom rules find ourselves checking for simple 
human errors that can cause a ruleset to go bad.

The following is a list of suggestions combined by our SARE group, order is set 
by importance:

Dumb rule checking, could lint check for a stupid rule like:
body  FOO  /(?:this|that|them|these||those)/

That double || will fire on everything and can not be valid in a rule.
A few of us have suffered from this in the past.  Asking for this because we 
are human and make mistakes.
Some other examples of this include:
/(?: |)/
/(?:| )/
or could be:
/(?: |foo|bar)/
/(?:foo|bar| )/

Other possible lint warnings:
Unknown meta rule warnings (meta rules that include rules that are possibly mis-
spelled or missing)
meta  FOO  (BAR_DOES_NOT_EXIST && NEITHER_DO_I)
score FOO  1.0
This produces no errors.


Missing Descriptions - I object to this but it was brought as a possible 
improvement.  I personally do not use any descriptions for my own rules, so if 
something like this does make it in, would it be possible to turn off warnings 
on something like this?  Config like:
lint_ignore_descriptions 1

Missing scores - This might be helpful, but many times I write a simple rule to 
run against mass-check and I don't need a score set until I figure out how the 
rule will perform.

Could the error messages from --lint be improved?  Maybe check for common 
mistakes like not escaping @
I'm not educated enough with perl to know what @ is used for, so maybe this 
alone would help some folks.

Take the following rule:
body TEST_FOO   /[EMAIL PROTECTED] test/


It produces the folling lint error:
LINTING RULESET
Failed to compile body SpamAssassin tests, skipping:
        (Global symbol "@man" requires explicit package name at 
C:\Perl\Site\Etc\Mail\SpamAssassin/NEW_RULES_UNDER_TEST.cf, rule TEST_FOO, line 
1.)

This does tell the filename the problem exists in, I thought is was doing 
something different, either way, that was reported to me and needed to be 
included.
Thank you



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to