Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-3866

Code comment with issue numbers

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When I read the code of carbondata, I find several comments with issue numbers. One of them comes from CSVCarbonWriterTest.java:

       // [CARBONDATA-3688]: compressor name is added in data file name 
      @Test public void testFileName() throws IOException { 
        String path = "./testWriteFiles"; 
        FileUtils.deleteDirectory(new File(path)); 
        Field[] fields = new Field[2]; 
        fields[0] = new Field("name", DataTypes.STRING); 
        fields[1] = new Field("age", DataTypes.INT); 
        TestUtil.writeFilesAndVerify(new Schema(fields), path);
      ...
      }

      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 activemq, and the instrumented version is https://github.com/ackelcn/carbondata 

       

      To avoid confusion, if there is already an issue number in code comments, my tool ignored the issue number. 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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ackelcn ackelcn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: