nsh87 / receptormarker

Source for 'receptormarker' package for R: antibody receptor and phenotypic marker analysis
http://receptormarker.com
BSD 2-Clause "Simplified" License
4 stars 9 forks source link

Add linter as a unit test #5

Closed nsh87 closed 9 years ago

nsh87 commented 9 years ago

Lints code on devtools::test() and outputs linter errors that need to be fixed. Added linting as a test function to break the build check if code doesn't conform to style guide.

nsh87 commented 9 years ago

This shouldn't have passed Travis CI...the linter test failed. Try to install lintr onto Travis CI using some script.

nsh87 commented 9 years ago

lintr now gets installed onto Travis CI via devtools::install_github(), as is preferred.

Added a custom build script: make sure it exits with status code 1 if there are any errors from the devtools::test() call in the script.

nsh87 commented 9 years ago

It works...congratulations, me (you embedded some code style errors so your script could catch the errors in devtools::test() and exit with status code 1 to fail the build). Now no one, including me, can submit crappy code style without build checks failing during lint. Need to do some cleanup:

  1. Move the Travis CI files to a separate directory
  2. Add Travis CI files to .Rignore
  3. Fix the build failure caused by the purposeful code style error you put in