T008

Keywords catch, for, if, switch and while should be followed by a single space

Description:

Keywords catch, for, if, switch and while should be followed by a single space and then an opening left parenthesis:

catch (...)
{
     for (int i = 0; i != 10; ++i)
     {
          if (foo(i))
          {
               while (getline(cin, line))
               {
                    switch (i % 3)
                    {
                    case 0:
                         bar(line);
                         break;
                    // ...
                    }
               }
          }
     }
}

Compliance: Inspirel

Rule index