[ https://issues.apache.org/jira/browse/DERBY-7080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17143413#comment-17143413 ]
ackelcn commented on DERBY-7080: -------------------------------- Shall I create a pull request? The added comments are thus visible. However, although I believe that most comments are useful, some may be not. Even if I create a pull request, you may not accept it as a whole? > Code comment with issue numbers > ------------------------------- > > Key: DERBY-7080 > URL: https://issues.apache.org/jira/browse/DERBY-7080 > Project: Derby > Issue Type: Improvement > Reporter: ackelcn > Priority: Major > > When I read the code of activemq, I find some comments with issue numbers. > One of them comes from CreateViewNode.java.java: > {code:java} > @Override @Override public void bindStatement() throws StandardException { > ... > if (queryExpression.getResultColumns().size() > > Limits.DB2_MAX_COLUMNS_IN_VIEW)if (queryExpression.getResultColumns().size() > > Limits.DB2_MAX_COLUMNS_IN_VIEW) { > throw > StandardException.newException(SQLState.LANG_TOO_MANY_COLUMNS_IN_TABLE_OR_VIEW, > String.valueOf(queryExpression.getResultColumns().size()), > getRelativeName(), String.valueOf(Limits.DB2_MAX_COLUMNS_IN_VIEW)); > } > // for each column, stuff system.column > // System columns should only include visible columns DERBY-4230 > ColumnInfo[queryExpression.getResultColumns().visibleSize()]; > genColumnInfos(colInfos); > }{code} > These comments are quite useful for other programmers and me to understand > the code, but I notice that not all issue numbers are written in code > comments. It can be already quite tedious to write them into commit messages > :) > > To handle the problem, I implemented a tool to automatically instrument issue > numbers into code comments. I tried my tool on derby, and the instrumented > version is > [https://github.com/ackelcn/derbywithissuecommenthttps://github.com/ackelcn/activemqwithissuecomment|https://github.com/ackelcn/activemqwithissuecomment] > > All my generated comments start from //IC, so it is easy to find them. > > Would you please some feedbacks to my tool? Please feel free to merge my > generated comments in your code, if you feel that some are useful. -- This message was sent by Atlassian Jira (v8.3.4#803005)