1 ! Copyright (C) 2022 CapitalEx
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: assocs hashtables help.markup help.syntax io kernel
9 { "name" "a vocab name string" }
13 "Finds unusued imports in the given vocab name. Returing the result as a " { $link sequence } "."
16 { $example "USING: lint.vocabs prettyprint ;"
17 "\"lint.vocabs\" find-unused ."
22 HELP: find-unused-in-file
24 { "path" "a pathname string" }
28 "Finds unused imports in the given file. Returing the result as a " { $link sequence } "."
31 { $example "USING: lint.vocabs prettyprint ;"
32 "\"vocab:lint/vocabs/vocabs.factor\" find-unused-in-file ."
37 HELP: find-unused-in-string
43 "Finds unused imports in the given " { $link string } ". Returing the result as a " { $link sequence } "."
48 { "name" "a vocab name string" }
51 "Finds unused imports in given vocab and outputs it to the current " { $link output-stream } "."
54 { $example "USING: lint.vocabs ;"
55 "\"lint.vocabs\" find-unused."
56 "No unused vocabs found in lint.vocabs."
61 ARTICLE: "lint.vocabs" "The Unused Vocabulary Linter"
62 "The " { $vocab-link "lint.vocabs" } " vocabulary implements a set of words designed to find unused imports. "
63 "It attempts to ignore USE: and USING: that are a part of a string, postponed with either POSTPONE: or \\, and "
64 "contained inside a " { $link "regexp" } "."
66 "It can sometimes be easy to lose track of what vocabularies you've imported while iterating over ideas. So to "
67 "find any vocabularies you feel are unused, you can run:"
70 "USING: lint.vocabs ;"
71 "\"lint.vocabs\" find-unused."
72 "No unused vocabs found in lint.vocabs."