[Webkit-unassigned] [Bug 128422] Web Inspector: update check-webkit-style to flag single quotes in WebInspectorUI projects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 20 05:31:12 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=128422





--- Comment #16 from Diego Pino <dpino at igalia.com>  2014-02-20 05:28:23 PST ---
I recoded the whole thing. 

Now what the script does is iterating through lines, checks if line is in a multi-line-comment (it assumes that a line starting with '*' is a line within a multi-line-comment). If line is not a multi-line-comment, removes the content of strings, single-line-comment (if any) and regular expressions. If after that, there's a single quote character returns error.

I also added the other tests suggested by Joseph.

After checking against the whole Web Inspector code base, the results are the following:

CookieStorageContentView.js(254):     if (cookieDomain.charAt(0) !== '.')
DOMTreeElement.js(539):             tag.textContent = '';
DOMTreeElement.js(540):             tag.appendChild(document.createTextNode('<'+nodeName));
DOMTreeElement.js(542):             tag.appendChild(document.createTextNode('>'));
DOMTreeElement.js(752):             tagNameElement.removeEventListener('keyup', keyupListener, false);
DOMTreeElement.js(758):             tagNameElement.removeEventListener('keyup', keyupListener, false);
DOMTreeElement.js(762):         tagNameElement.addEventListener('keyup', keyupListener, false);
DataGrid.js(660):             emptyData[identifier] = '';
DataGrid.js(1111):                     var columnTitle = this.dataGrid.columns.get(columnIdentifier).get('title');
ColorPicker.js(49):     this._opacityPattern = 'url("data:image/svg+xml;base64,' + btoa('<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="rgb(204, 204, 204)"><rect width="3" height="3" /><rect x="3" y="3" width="3" height="3"/></svg>') + '")';
DOMTreeOutline.js(380):         event.dataTransfer.dropEffect = 'move';
Main.js(491):         console.assert(profileTitle[0] === '/');

Same results as before (the single quote in DataGrid:1111 was added recently). Hope this approach can work.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list