[dokuwiki] New PR: PSR 2 Adoption

  • From: "splitbrain" <wiki@xxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 27 Apr 2018 19:19:29 +0200 (CEST)

Hi,

splitbrain opened a new pull request at 
https://github.com/splitbrain/dokuwiki/pull/2358:

This is the beginning of the refactoring to the PSR-2 coding standard as 
announced on the [mailing 
list](https://www.freelists.org/post/dokuwiki/Coding-Style,15).

For now I only care about fixing errors that can *not* be fixed automatically. 
Any help is appreciated.

The following gets you started. It creates a `todo` file listing all the 
problems that need manual fixing. Yes, its a lot.

```
cd _test
wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
chmod 755 phpcs.phar
./phpcs.phar --no-colors |grep -vF ' [x] ' |grep -E '^( |FILE:)' >todo && (grep 
-v FILE: todo |wc -l)
```

Not all of the problems can be fixed. We will need to define a lot of 
exceptions to keep backward compatibility. We will probably also define 
exceptions for things we want to fix later.

We might also end up deciding to not fix a lot of files for now and only do 
them when we refactor them anyway.

[PHPCS Advanced 
Usage](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage
explains how to exclude sniffs.

For now I want to fix as much as possible, exclude the rest, finally run the 
automatic fixing and then merge this back.

People reviewing this PR should probably do so on a commit-by-commit base.

Please help us to review this pull request, so new contributors get feedback in 
a timely manner.

245f71b0-4a3f-11e8-8024-2513b8fafcba


-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts:

  • » [dokuwiki] New PR: PSR 2 Adoption - splitbrain