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

RESOLVED FIXED

Status

()

--
enhancement
RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

Trunk
x86
SunOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 obsolete attachment)

(Assignee)

Description

12 years ago
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
(Assignee)

Comment 1

12 years ago
Created attachment 247603 [details] [diff] [review]
complain :)
Assignee: dbradley → timeless
Status: NEW → ASSIGNED
Attachment #247603 - Flags: review?
(Assignee)

Updated

12 years ago
Attachment #247603 - Flags: review? → review?(benjamin)

Comment 2

12 years ago
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+
(Assignee)

Comment 3

12 years ago
Comment on attachment 247603 [details] [diff] [review]
complain :)

mozilla/xpcom/typelib/xpidl/xpidl_util.c 	1.22
Attachment #247603 - Attachment is obsolete: true
(Assignee)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Updated

10 years ago
Component: xpidl → XPCOM
QA Contact: pschwartau → xpcom
You need to log in before you can comment on or make changes to this bug.