-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new line at the end of file and missing white space #1153
Conversation
Maybe adding a PHPCS rule for that? |
There already is one included ;-) The reason these files were not reported is that PHPCS is currently configured in |
I would like to see this being checked for in travis before the changes are made so that they do not get reversed by mistake in the future. |
Hi @grappler, |
Add this to The problem is that PHPCS would not not check the other files like We need to come up with another solution that could run in travis to check this. |
Here is another way we could run this in bash https://stackoverflow.com/a/34944104/850651 |
You can pass You could also consider changing the |
The only thing that is not checked are the "hidden" files If we enable PHPCS for JS then will need to fix the following warnings.
|
Those all look legitimate and easy enough to fix. If the <exclude-pattern>*.min.(css|js)</exclude-pattern> |
@truongwp I have had another look at this PR. Could you add the CSS and SCSS files to the PHPCS check? Like this: --- phpcs.xml.dist
+++ phpcs.xml.dist
@@ -17,7 +17,7 @@
<arg value="psvn"/>
<!-- Only check the PHP files. JS files are checked separately with JSCS and JSHint. -->
- <arg name="extensions" value="php"/>
+ <arg name="extensions" value="php,css,scss/css"/>
<!-- Check all files in this directory and the directories below it. -->
<file>.</file> When you run PHPCS you will notice that @jrfnl I have created a separate pull request for the JavaScript file issues #1187. We can add the |
f746f18
to
6e75903
Compare
@grappler I updated the old commit to add newline at end of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. It makes sense to have two commits here.
This PR add a missing white space between css selector and open brace, and add new line at the end of many files.