You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Robin Anil (JIRA)" <ji...@apache.org> on 2009/12/28 19:57:29 UTC
[jira] Created: (MAHOUT-233) Modifying Mahout Check style to match
our current coding style
Modifying Mahout Check style to match our current coding style
--------------------------------------------------------------
Key: MAHOUT-233
URL: https://issues.apache.org/jira/browse/MAHOUT-233
Project: Mahout
Issue Type: Task
Affects Versions: 0.3
Reporter: Robin Anil
Fix For: 0.3
Checkstyle currently throws a lot of errors for small things like
private static Logger log
if(booleanVar == false) // Required for readability
This task is created to track
how to match the checkstyle to relax certain rules and
changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MAHOUT-233) Modifying Mahout Check style to match
our current coding style
Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved MAHOUT-233.
------------------------------
Resolution: Fixed
Committed the checkstyle changes. We don't have the Eclipse style in SVN right? don't seem to have the file. Anyone interested should use the updated version I suppose.
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-233) Modifying Mahout Check style to
match our current coding style
Posted by "Robin Anil (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796627#action_12796627 ]
Robin Anil commented on MAHOUT-233:
-----------------------------------
bq. does the checkstyle rule now say no space after comma? that seems uncovnentional
Its as per the new lucene code style found on the wiki
bq. what are the new, large alignment values in codestyle?
the large alignment values forces function and method parameters in to each line and aligns it at the opening bracket. They prevent the codestyle alignment error.
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-233) Modifying Mahout Check style to
match our current coding style
Posted by "Jake Mannix (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796774#action_12796774 ]
Jake Mannix commented on MAHOUT-233:
------------------------------------
{code}
String foo(int param1,
Object param2,
Float param3) throws Exception1,
Exception2
Exception3
{code}
Is there a reason why this is preferred over
{code}
String foo(int param1,
Object param2,
Float param3) throws Exception1,
Exception2
Exception3
{code}
lining up things that are the same is something I never understood why people didn't do more... (hi there, my OCD-tendencies!). It makes it much easier on the eyes to scan down the row of parameters, just as you can scan right to left if they aren't wrapping.
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MAHOUT-233) Modifying Mahout Check style to match
our current coding style
Posted by "Robin Anil (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robin Anil updated MAHOUT-233:
------------------------------
Attachment: checkstyle-xml.patch
Some basic changes
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MAHOUT-233) Modifying Mahout Check style to match
our current coding style
Posted by "Robin Anil (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robin Anil updated MAHOUT-233:
------------------------------
Attachment: Eclipse-Codestyle.diff
Eclipse-Mahout-Codestyle.xml
I am attaching a slightly modified Lucene Code style the diff is also attached. Using this i created almost zero check style errors from eclipse,
except a small violation i.e. empty constructor there is no space between {}
* the line length is set as 80 for wrapping. But checkstyle allows for lines upto 120.
This is ok considering few unwrappable lines do need 120 chars like simple map<map<map<>>>> declaration
Other than than it agrees with checkstyle perfectly. If the code in the mahout bayes patch looks ok and if the eclipse code style looks ok, I will go ahead and do a mass CTRL+SHIFT+F :)
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-233) Modifying Mahout Check style to
match our current coding style
Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796598#action_12796598 ]
Sean Owen commented on MAHOUT-233:
----------------------------------
The only items I'd ask about are:
- does the checkstyle rule now say no space after comma? that seems uncovnentional
- what are the new, large alignment values in codestyle?
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-233) Modifying Mahout Check style to
match our current coding style
Posted by "Jake Mannix (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796780#action_12796780 ]
Jake Mannix commented on MAHOUT-233:
------------------------------------
hah. that didn't format correctly. :P
String foo(int param1,
________Object param2,
________Float param3) throws Exception1,
_________________________Exception2,
_________________________Exception3
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-233) Modifying Mahout Check style to
match our current coding style
Posted by "Robin Anil (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796635#action_12796635 ]
Robin Anil commented on MAHOUT-233:
-----------------------------------
No. relaxing the space occurs only in checkstyle. In the code formatter, does keep space for method params. But it strips space from Map<String,String>
bq. Yes but how does one fixed indent value like "81" possibly work for all code? I probably don't understand the value.
try the Eclipse Code style in the editor
those indentation values are Eclipse specific, what it does is this.
{noformat}
String foo(int param1,
Object param2,
Float param3) throws Exception1,
Exception2
Exception3
{noformat}
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-233) Modifying Mahout Check style to
match our current coding style
Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796640#action_12796640 ]
Sean Owen commented on MAHOUT-233:
----------------------------------
Oh OK I understand now. That all sounds good, +1 to commit!
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-233) Modifying Mahout Check style to
match our current coding style
Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796629#action_12796629 ]
Sean Owen commented on MAHOUT-233:
----------------------------------
Really, I've never seen Java code with this convention. So it's like "public void foo(int i,int j)" and "foo(bar,baz)". All the Mahout code doesn't do this. I'd vote to not take this convention, but don't feel strongly enough to argue about it. It will be a big ol' patch to change that.
Yes but how does one fixed indent value like "81" possibly work for all code? I probably don't understand the value.
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-233) Modifying Mahout Check style to
match our current coding style
Posted by "Robin Anil (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796489#action_12796489 ]
Robin Anil commented on MAHOUT-233:
-----------------------------------
Do these checkstyle and Eclipse formatters look OK for Mahout wide consumption ?
> Modifying Mahout Check style to match our current coding style
> --------------------------------------------------------------
>
> Key: MAHOUT-233
> URL: https://issues.apache.org/jira/browse/MAHOUT-233
> Project: Mahout
> Issue Type: Task
> Affects Versions: 0.3
> Reporter: Robin Anil
> Fix For: 0.3
>
> Attachments: checkstyle-xml.patch, Eclipse-Codestyle.diff, Eclipse-Mahout-Codestyle.xml
>
>
> Checkstyle currently throws a lot of errors for small things like
> private static Logger log
> if(booleanVar == false) // Required for readability
> This task is created to track
> how to match the checkstyle to relax certain rules and
> changes in code for the strict ones
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.