Skip to content

Instantly share code, notes, and snippets.

@endo64
Created July 27, 2018 23:17
Show Gist options
  • Save endo64/4a2dcfdba84f75f687276bc13e379184 to your computer and use it in GitHub Desktop.
Save endo64/4a2dcfdba84f75f687276bc13e379184 to your computer and use it in GitHub Desktop.
Find functions with missing doc for their refinements
Red [
Title: "Find functions with missing doc for their refinements"
Date: 2018-07-28
Author: "Endo"
License: "MIT"
File: %Refinements.red
]
;find all natives, op, functions, actions that have refinement(s)
remove-each word words: words-of system/words [
any [
not any-function? attempt [get word]
not find spec-of get word refinement!
]
]
print [length? words "functions have refinements"]
output: []
foreach word words [
spec: find spec-of get word refinement!
result: parse spec [collect [some [quote /local | refinement! string! | keep refinement! | skip]]]
unless empty? result [
append output word
]
]
print [length? output "functions missing doc for their refinements"]
print mold new-line/all output yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment