Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-24797

Code formatter: define and hook code formatting enforcement for github PRs

    XMLWordPrintable

Details

    Description

      Code formatting differs across developers. We should be at least consistent since odd formatting makes reading code more difficult for obvious reasons.
      The most prominent differences I am aware of are

      • use spaces vs tabs
      • differences in formatting "if statements" (as displayed here):
        if(XX){
        

        vs

        if (XX) {
        
      • insonsitent code identations like displayed here:
            public void method() {
         int i = 0;
         i++;
              i +=2;
        
      • odd identations of whole anonymous classes as displayed here
                     class Listener {
        int i = 0;
         public void method()        {
                     }
           }
        
      • multiple empty lines for no obvious reason like shown here
        public class ZZ {
        
        
            int i = 0;
        
        
           i++
        }
        

      Attachments

        Issue Links

          Activity

            People

              dbocharo@redhat.com Dmitrii Bocharov (Inactive)
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: