Skip to content

janu-software/coding-standard

Repository files navigation

Nette Coding Standard code checker & fixer

Downloads this Month Latest Stable Version License

This is set of sniffs and fixers that checks and fixes code of Nette Framework against Coding Standard in Documentation.

Installation and Usage

Install the tool in a global directory. Its name will be for example /nette-cs:

composer create-project janu-software/coding-standard /nette-cs

Check coding standard for PHP 8.4 in folders src and tests:

/nette-cs/ecs check src tests --preset php84

And fix it:

/nette-cs/ecs fix src tests --preset php84

If no PHP version is specified, it will try to find out from the composer.json file.

GitHub Actions

# .github/workflows/coding-style.yml
steps:
    - uses: actions/checkout@v4
    - uses: shivammathur/setup-php@v2
      with:
          php-version: 8.4

    - run: composer create-project nette/coding-standard temp/coding-standard
    - run: php temp/coding-standard/ecs check src tests --preset php84

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages