Git Product home page Git Product logo

phpcs-action's People

Contributors

chekalsky avatar ocean90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

phpcs-action's Issues

Option for installed_paths

Would be great that we have also the possibility to add options like installed_paths so we can set config like phpcs --config-set installed_paths "../../coding-standards/example/,../../automattic/phpcs-neutron-standard/"

About this option: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options#setting-the-installed-standard-paths

maybe like

inputs:
  enable_warnings:
    description: 'Enable checking for warnings (-w)'
    required: false
    default: ''
  installed_paths:
    description: 'Setting the installed standard paths'
    required: false
    default: ''

--cache support?

on medium/big sized projects running with --cache flag speeds it a lot...
Support based on cache from master/previous build on branch would speed it up a lot

Annotations not being commented in line

Hi @chekalsky - thanks for putting this together. I'm running this on a private repo, but the annotations I get are not being passed to the PR file that is triggering the error.

Reality
image

Expectation
image

Am I missing something obvious - was hoping for inline annotation like your screenshot.

Referenced sniff "Doctrine" does not exist

I want to run phpcs with a Doctrine code standard. This is my configuration:

//..
jobs:
  phpcs:
      name: chekalsky/phpcs-action@v1
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - name: Install dependencies
          run: composer install --prefer-dist --no-progress --no-suggest --no-scripts
        - name: PHPCS check
          uses: chekalsky/phpcs-action@v1
          with:
            enable_warnings: true
            phpcs_bin_path: './vendor/bin/phpcs'

But it gives my this error:

ERROR: Referenced sniff "Doctrine" does not exist

My composer.json includes:

  "require-dev": {
    "doctrine/coding-standard": "^7.0",
   }

That means this is also installed:

"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"slevomat/coding-standard": "^6.0",
"squizlabs/php_codesniffer": "^3.5.3"

I see dependencies (including doctrine/coding-standard) are installed.

Why can't phpcs find Doctrine?

Composer could not find a composer.json file in /home/runner/work/test-github-action/test-github-action even though composer.json file is present

Hello,

I'm getting the below error even when composer.json file is added in the project:

Composer could not find a composer.json file in /home/runner/work/test-github-action/test-github-action

premanshup/test-github-action#1

https://github.com/premanshup/test-github-action/runs/1428875407?check_suite_focus=true

Not sure how to resolve this issue, any help will be very much appreciated.

Thank you!

Limit to changed files

In repositories where PHPCS is just being introduced it can happen that not all files are correct yet.
In such cases it would be nice to only test files that are actually touched by this PR.

PHP 8 version problem

When running in Github Actions, I am getting the following error:

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.12. in /github/workspace/vendor/composer/platform_check.php on line 24

Is there a config setting I am missing?

Getting Error

Hi,

I'm getting the following error , when the workflow executes

ERROR: You must supply at least one file or directory to process

Below is my yaml file, Am I missing anything

name: PHPCS check

 on: pull_request

 jobs:
   phpcs:
       name: PHPCS
       runs-on: ubuntu-latest
       steps:
         - uses: actions/checkout@v2
         - name: PHPCS check
           uses: chekalsky/phpcs-action@v1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.