Closed Bug 362843 Opened 18 years ago Closed 18 years ago

xpidl should warn about attribute anytype aaaIAa ([a-z]{2,3}I[A-Z][a-z])

Categories

(Core :: XPCOM, enhancement)

x86
SunOS
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

Attachments

(1 obsolete file)

because of interface flattening, any property named like this would cause collisions, and in general such a name is bad form as properties go: the "bad" input that we are more than willing to warn about is: attribute nsISupports canIGoHomeNow; which we feel is indeed a poor name. the normal protected input is: attribute long nsIFile; which is again a bad name and can cause problems with interface flattening. this is just a warning, so it won't actually cause anyone's interfaces to break (they're already broken) at build time, but hopefully they'll change their spots. http://mxr-test.landfill.bugzilla.org/seamonkey/search?string=attribute.*%5Ba-z%5DI%5BA-Z%5D%5Ba-z%5D&regexp=on&case=on&find=idl%24&findi=&filter=attribute%5Cs%2B%5Cw%2B%5Cs%2B%5Cw%5Cw%5Ba-z%5D%3FI%5BA-Z%5D%5Ba-z%5D&tree=seamonkey Is a moderate approximation of the list i'm trying to avoid. At this time there are 4 matches (2 are false positives - comments which i didn't bother trying to exclude) /embedding/browser/webBrowser/nsIWebBrowserPrint.idl, * line 119 -- readonly attribute boolean isIFrameSelected; -- This is imo a terrible interface attribute - bug 362841 /mailnews/imap/public/nsIMsgImapMailFolder.idl, * line 124 -- readonly attribute boolean canIOpenThisFolder; This is a perfect match for plasticmillion's canIGoHomeNow - bug 362842
Attached patch complain :) (obsolete) — Splinter Review
Assignee: dbradley → timeless
Status: NEW → ASSIGNED
Attachment #247603 - Flags: review?
Attachment #247603 - Flags: review? → review?(benjamin)
Comment on attachment 247603 [details] [diff] [review] complain :) Please separate out the < 'A' > 'Z' bits into little static functions Is_AlphaUpper and Is_AlphaLower. With that, r=me
Attachment #247603 - Flags: review?(benjamin) → review+
Comment on attachment 247603 [details] [diff] [review] complain :) mozilla/xpcom/typelib/xpidl/xpidl_util.c 1.22
Attachment #247603 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Component: xpidl → XPCOM
QA Contact: pschwartau → xpcom
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: