Bug 6691 - Linting Rules should adhere to conditions
Summary: Linting Rules should adhere to conditions
Status: RESOLVED WORKSFORME
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: PC Windows 7
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-04 17:03 UTC by Kevin A. McGrail
Modified: 2019-07-08 09:21 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin A. McGrail 2011-11-04 17:03:19 UTC
This might be in another bug but just in case, there are scenarios where rules are throwing lint errors that should be conditionally ignored.

For example:

if (version < 3.200000)
  #BLANK EMAILS - CURRENTLY REQUIRES 99_FVGT_meta.cf for FM_NO_FROM AND NO_TO. UNDISC_RECIPS MIGHT BE REMOVED IN 3.2+
    #HTML_SHORT_LENGTH DEPENDENCY RULE REMOVED FROM SA 3.2
  meta          KAM_BLANK01     (MISSING_SUBJECT && (UNDISC_RECIPS || FM_NO_FROM_OR_TO || FM_NO_TO))
  describe      KAM_BLANK01     Blank emails
  score         KAM_BLANK01     1.0

    #MSGID_FROM_MTA_ID REMOVED IN NEWER SPAMASSASSIN 3.2
  meta          KAM_BLANK02     (KAM_BLANK01 && MSGID_FROM_MTA_ID)
  describe      KAM_BLANK02     Blank emails with MTA Headers
  score         KAM_BLANK02     1.0
endif

However, spamassassin -D --lint 2>&1 | grep depend still shows:

Nov  4 13:02:06.733 [27175] dbg: rules: meta test KAM_BLANK01 has undefined dependency 'UNDISC_RECIPS'
Nov  4 13:02:06.733 [27175] dbg: rules: meta test KAM_BLANK01 has undefined dependency 'FM_NO_FROM_OR_TO'
Nov  4 13:02:06.733 [27175] dbg: rules: meta test KAM_BLANK01 has undefined dependency 'FM_NO_TO'
Nov  4 13:02:06.764 [27175] dbg: rules: meta test KAM_BLANK02 has undefined dependency 'MSGID_FROM_MTA_ID'
Comment 1 Henrik Krohns 2019-07-08 09:21:07 UTC
Can't reproduce, prolly not an issue anymore? Closing.