Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Added gulp clean tasks #681

Merged
merged 5 commits into from
Jan 28, 2016
Merged

Conversation

colin-marshall
Copy link
Collaborator

Fixes: #680

@colin-marshall
Copy link
Collaborator Author

@olefredrik any idea why the build is failing? It just stopped once it hit library/navigation.php when running the code sniff tests.

@colin-marshall
Copy link
Collaborator Author

Closed and reopened the PR so the tests would run again, hoping that it was something wrong with Travis, but it's still not passing. I get nothing wrong with library/navigation.php when I run the code sniffs locally.

@olefredrik
Copy link
Owner

@colin-marshall : Seems to be an issue with Travis CI. Related: travis-ci/travis-ci#3358

I'll check what's going on and see how this can be fixed.

@colin-marshall
Copy link
Collaborator Author

Thanks @olefredrik! This can probably get merged in despite the build failing since none of this PR involves php.

@olefredrik
Copy link
Owner

@colin-marshall : I did some testing last night, hoping to get some answers for the Travis CI build failure. There is no way the build will pass unless I remove navigation.php. That does really make no sense to me, since the navigation.php has no errors and has previously passed the build without errors. I think it's good to have the WP Coding Standards check as part of the repository, but it's quite unfortunate if it should stop and err on files that are ok.

@colin-marshall
Copy link
Collaborator Author

@olefredrik are there any differences between the CodeSniffing done locally and when it's done on Travis CI? To see if maybe a new WPCS rule was breaking the build, I removed the local CodeSniffing, cleared the composer cache, reinstalled, and tested locally. All CodeSniffs passed with a couple warnings, none of which had to do with navigation.php.

@colin-marshall
Copy link
Collaborator Author

@olefredrik I have narrowed the problem down to the foundationpress_top_bar_r() function.

@colin-marshall colin-marshall force-pushed the gulp-clean branch 4 times, most recently from 84722ec to f2d3d91 Compare January 27, 2016 09:28
@colin-marshall
Copy link
Collaborator Author

Finally resolved @olefredrik!!! This is what I came to conclude about the build issue:

  • There was a missing @link before the URL in the doc comments for foundationpress_top_bar_r() which was stalling the build
  • The comments inside of the array in that function were also stalling the build

While fixing this I noticed that the local wpcs was only checking php files in the root directory of the theme, so I fixed it so that it checks php files in all directories. When running the sniffs locally it didn't stall or give errors when it hit library/navigation.php. No clue what was going on with Travis but at least we found what was causing it.

.on('change', function(event) {
logFileChange(event);
});

// JS Watch
gulp.watch(['assets/javascript/custom/**/*.js'], ['javascript', 'lint'])
gulp.watch(['assets/javascript/custom/**/*.js'], ['clean:javscript', 'javascript', 'lint'])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`clean: javscript`` ? :)

@olefredrik
Copy link
Owner

Awesome, Colin!!! Thanks a lot! I'll sit down a few hours this evening and look through all recent issues. Just found a typo in the clean task I think. See comment above.

olefredrik added a commit that referenced this pull request Jan 28, 2016
@olefredrik olefredrik merged commit a7dc9b6 into olefredrik:master Jan 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants