README.md in yardcheck-0.0.1 vs README.md in yardcheck-0.0.2

- old
+ new

@@ -12,13 +12,13 @@ # Validates the user # # @param user [User] # # @return [true,false] -# def valid?(user) -# ... -# end +def valid?(user) + # ... +end ``` You are saying that you are always going to be passing in a `User` instance and the method will always returns `true` or `false`. `yardcheck` traces method invocations to observe the parameters and return values in your application while running your test suite. When your test suite finishes running we compare the observed types found while running your tests against the types in your documentation. @@ -72,12 +72,27 @@ 3. It tells you that it actually observed cases where the param was `nil` which does not respond to `#call`. 4. It lists all of the tests that observed a `nil` block param. In this case I would update the documentation to be `@param [#call, nil] block` -# Is this ready? +## Is this ready? Kind of. It is not ready to be run in CI to check your documentation and it may never be since tracing method calls is fairly slow. We also sometimes mess up. For example, if another method raises an error then all of the methods that bubble up that error without rescuing it will be marked as returning `nil`. This seems like a limitation of ruby's `TracePoint` right now. It is very helpful though. It will find a lot of cases where your documentation isn't quite right and the output is clear. Install it and give it a try. + +## Install + +You probably could have guessed this, but to install just run + +``` +$ gem install yardcheck +``` + +Or add this to your Gemfile + +``` +gem 'yardcheck' +``` +