chekalsky / phpcs-action Goto Github PK
View Code? Open in Web Editor NEWGithub Action helps you check your code with PHP_CodeSniffer
License: MIT License
Github Action helps you check your code with PHP_CodeSniffer
License: MIT License
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.
Am I missing something obvious - was hoping for inline annotation like your screenshot.
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
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.
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
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?
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: ''
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!
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.