Example: here I was playing with an alternative constructor and have commented it out for now, in NetBeans IDE, using its "comment out" function:

  //  public function __construct(array $items, $title = null) {
  //    if (!is_array($items)) {
  //      throw new \Exception('$items must by an array !');
  //     }
  //    $this->items = $items;
  //
  //    if (!empty($title) && !is_string($title)) {
  //      throw new \Exception('$title must a string (or null) !');
  //    }
  //    if (!empty($title)) {
  //      $this->title = $title;
  //    }
  //  }

Coder spits the dummy multiple times.

  54 | ERROR   | Inline comments must start with a capital letter
  55 | ERROR   | Comment indentation error, expected only 2 spaces
  56 | ERROR   | Comment indentation error, expected only 4 spaces
  61 | ERROR   | Comment indentation error, expected only 4 spaces
  64 | ERROR   | Comment indentation error, expected only 4 spaces

The problem with inline comments and capitals with code is already reported, I am concerned here about the indentation errors.

Commenting out code with inline comments // is a very common practice. Developers shouldn't have to waste time indenting such code pathologically.

Please relent concerning this and all other issues regarding inline comments and code. Developers do, should be allowed to, and will continue to use inline comments to comment out code, and across the board, the current rules are causing trouble. It's wasting your (the maintainer's) time, and mine.

Now just imagine how relaxed we will all be if you relax these rules. Feel the fresh air ..

Comments

webel’s picture

Issue summary: View changes
klausi’s picture

Status: Active » Closed (won't fix)

Coder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.

hansfn’s picture

Just adding an related D8 issue.