Closed dhruvsinghal closed 9 years ago
Very nifty, @dhruvsinghal. I love the output format. :sparkles:
After thinking about this, I think we'll need to expand our audit a bit. Some API methods use the same URL with different HTTP verbs. The approach we used in Octokit.rb was to match on documentation URLs. With the work @dhs252 is doing in #78, I think we can do the same thing here.
I was able to compile a list of all documentation URLs from the Ruby library with this shell command:
ag --no-numbers "@see https://developer.github.com/v3" | sed -ne 's/.*\(http[^"]*\).*/\1/p' | sort -u
Based on the output of this script, we could create a TODO.md
in the project root using the task list syntax. The auditor could then just complete the ones it finds marked See <url>
in our *.go
files, perhaps entirely in bash.
@pengwynn The audit script is complete and functional. Just run go script/auditor.go
@dannysperling I've pulled in changes from your fork's doc-links
branch, so you might want to work with this (audit
) branch itself for any updates to documentation.
@dhruvsinghal I'm getting an error running it:
❯ go run auditor.go
panic: open auth_method.go: no such file or directory
@pengwynn It should work now.
Hmmm in the TODO.md, it seems like only the bigger categories are getting checked off.
For example the search is checked off: https://developer.github.com/v3/search
All the below aren't checked off: https://developer.github.com/v3/search/#search-code https://developer.github.com/v3/search/#search-issues https://developer.github.com/v3/search/#search-repositories https://developer.github.com/v3/search/#search-users
I know for a fact that all the above are implemented.
Shall we bring this back? @dhruvsinghal @pengwynn
@feiranchen The code documentation is incomplete actually: it should include "https://developer.github.com/v3/search/#search-code" explicitly. The script does not have natural language processing capabilities yet :)
Hmm, just found another example: https://github.com/octokit/go-octokit/blob/master/octokit/gists.go
The file is very well documented thanks to @dannysperling. Yet none of the sub-functions are marked in TODO.md. I just ran the auditor locally to be sure.
@feiranchen Fixed and merged.
@pengwynn Here's a very rough version of the API audit program. Some notes:
Here's the output of the script: