[xwiki-devs] [VOTE] Change checkstyle.xml to ignore the length of lines with GWT JSNI calls
Hi devs, Currently our Checkstyle configuration contains this: <module name="LineLength"> <property name="ignorePattern" value="(@version|@see|@link|^import)"/> <property name="max" value="120"/> </module> I propose we add the following pattern to the ignorePattern property: @(\w+\.)+\w+::\w+\( The reason is that "Java identifiers referenced from within JSNI methods can get quite long and cannot be parsed if split across lines." ( http://code.google.com/webtoolkit/makinggwtbetter.html#codestyle ). Here's an example: var editor = @com.xpn.xwiki.wysiwyg.client.editor.WysiwygEditorApi::new(Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(config); [email protected]::getSourceText(Lorg/xwiki/gwt/dom/client/JavaScriptObject;Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(onSuccess, onFailure); So without modifying the ignorePattern I'm forced to exclude an entire Java source file from Checkstyle just because some of the JSNI lines are too long. I'm +1 changing the ignorePattern property. Thanks, Marius
Marius Dumitru Florea wrote:
Hi devs,
Currently our Checkstyle configuration contains this:
<module name="LineLength"> <property name="ignorePattern" value="(@version|@see|@link|^import)"/> <property name="max" value="120"/> </module>
I propose we add the following pattern to the ignorePattern property:
@(\w+\.)+\w+::\w+\(
The reason is that "Java identifiers referenced from within JSNI methods can get quite long and cannot be parsed if split across lines." ( http://code.google.com/webtoolkit/makinggwtbetter.html#codestyle ).
Here's an example:
var editor = @com.xpn.xwiki.wysiwyg.client.editor.WysiwygEditorApi::new(Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(config); [email protected]::getSourceText(Lorg/xwiki/gwt/dom/client/JavaScriptObject;Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(onSuccess, onFailure);
So without modifying the ignorePattern I'm forced to exclude an entire Java source file from Checkstyle just because some of the JSNI lines are too long.
I'm +1 changing the ignorePattern property.
+1
Thanks, Marius _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1, Jerome. Marius Dumitru Florea wrote:
Hi devs,
Currently our Checkstyle configuration contains this:
<module name="LineLength"> <property name="ignorePattern" value="(@version|@see|@link|^import)"/> <property name="max" value="120"/> </module>
I propose we add the following pattern to the ignorePattern property:
@(\w+\.)+\w+::\w+\(
The reason is that "Java identifiers referenced from within JSNI methods can get quite long and cannot be parsed if split across lines." ( http://code.google.com/webtoolkit/makinggwtbetter.html#codestyle ).
Here's an example:
var editor = @com.xpn.xwiki.wysiwyg.client.editor.WysiwygEditorApi::new(Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(config); [email protected]::getSourceText(Lorg/xwiki/gwt/dom/client/JavaScriptObject;Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(onSuccess, onFailure);
So without modifying the ignorePattern I'm forced to exclude an entire Java source file from Checkstyle just because some of the JSNI lines are too long.
I'm +1 changing the ignorePattern property.
Thanks, Marius _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Marius Dumitru Florea wrote:
Hi devs,
Currently our Checkstyle configuration contains this:
<module name="LineLength"> <property name="ignorePattern" value="(@version|@see|@link|^import)"/> <property name="max" value="120"/> </module>
I propose we add the following pattern to the ignorePattern property:
@(\w+\.)+\w+::\w+\(
The reason is that "Java identifiers referenced from within JSNI methods can get quite long and cannot be parsed if split across lines." ( http://code.google.com/webtoolkit/makinggwtbetter.html#codestyle ).
Here's an example:
var editor = @com.xpn.xwiki.wysiwyg.client.editor.WysiwygEditorApi::new(Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(config); [email protected]::getSourceText(Lorg/xwiki/gwt/dom/client/JavaScriptObject;Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(onSuccess, onFailure);
So without modifying the ignorePattern I'm forced to exclude an entire Java source file from Checkstyle just because some of the JSNI lines are too long.
I'm +1 changing the ignorePattern property.
+1 -- Sergiu Dumitriu http://purl.org/net/sergiu/
+1, JV. On Tue, Jun 2, 2009 at 2:54 PM, Marius Dumitru Florea <[email protected]> wrote:
Hi devs,
Currently our Checkstyle configuration contains this:
<module name="LineLength"> <property name="ignorePattern" value="(@version|@see|@link|^import)"/> <property name="max" value="120"/> </module>
I propose we add the following pattern to the ignorePattern property:
@(\w+\.)+\w+::\w+\(
The reason is that "Java identifiers referenced from within JSNI methods can get quite long and cannot be parsed if split across lines." ( http://code.google.com/webtoolkit/makinggwtbetter.html#codestyle ).
Here's an example:
var editor = @com.xpn.xwiki.wysiwyg.client.editor.WysiwygEditorApi::new(Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(config); [email protected]::getSourceText(Lorg/xwiki/gwt/dom/client/JavaScriptObject;Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(onSuccess, onFailure);
So without modifying the ignorePattern I'm forced to exclude an entire Java source file from Checkstyle just because some of the JSNI lines are too long.
I'm +1 changing the ignorePattern property.
Thanks, Marius _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
5 +1, no -1, no 0, Committing now. Thanks, Marius Marius Dumitru Florea wrote:
Hi devs,
Currently our Checkstyle configuration contains this:
<module name="LineLength"> <property name="ignorePattern" value="(@version|@see|@link|^import)"/> <property name="max" value="120"/> </module>
I propose we add the following pattern to the ignorePattern property:
@(\w+\.)+\w+::\w+\(
The reason is that "Java identifiers referenced from within JSNI methods can get quite long and cannot be parsed if split across lines." ( http://code.google.com/webtoolkit/makinggwtbetter.html#codestyle ).
Here's an example:
var editor = @com.xpn.xwiki.wysiwyg.client.editor.WysiwygEditorApi::new(Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(config); [email protected]::getSourceText(Lorg/xwiki/gwt/dom/client/JavaScriptObject;Lorg/xwiki/gwt/dom/client/JavaScriptObject;)(onSuccess, onFailure);
So without modifying the ignorePattern I'm forced to exclude an entire Java source file from Checkstyle just because some of the JSNI lines are too long.
I'm +1 changing the ignorePattern property.
Thanks, Marius _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (5)
-
Anca Paula Luca -
Jean-Vincent Drean -
Jerome Velociter -
Marius Dumitru Florea -
Sergiu Dumitriu