Last active
September 4, 2015 03:02
-
-
Save eksperimental/fa31a19559b770adca14 to your computer and use it in GitHub Desktop.
Check for references to exiting modules in the documentation, that is actually not being liked by ExDoc, in the documentation for the Elixir project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ./check_not_linked_exdoc.sh – http://git.io/check_not_linked_exdoc.sh | |
# | |
# Description: | |
# Check for references to exiting modules in the documentation, that is actually not being liked | |
# by ExDoc. | |
# | |
# Instructions | |
# Run from the root folder in the elixir project – https://github.com/elixir-lang/elixir/ | |
# | |
# Requirements: | |
# * bash | |
# * ag (aka the silver searcher) – https://github.com/ggreer/the_silver_searcher | |
# | |
# Author: | |
# eksperimental – https://github.com/eksperimental | |
for dir in lib/*; do | |
project=$(echo "${dir}" | sed -e 's@lib/@@') | |
modules="Elixir|"$(ag -g "Elixir." ${dir}/ebin/ | sed -e 's@^'${dir}'/ebin/Elixir\.@@' -e 's/\.beam$//' | paste -s -d"|") | |
ag '(?<!>)<code class="inline">('${modules}')[^<(]+(?<!\*)<' doc/${project} -C0 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment