|
6 | 6 |
|
7 | 7 | Find unused Objective-C imports.
|
8 | 8 |
|
| 9 | +# Table of Contents |
| 10 | + |
| 11 | +- [Usage](#usage) |
| 12 | + - [Get Help](#get-help) |
| 13 | + - [Find Unused Classes in the Current Directory](#find-unused-classes-in-the-current-directory) |
| 14 | + - [Find Unused Classes in any Path](#find-unused-classes-in-any-path) |
| 15 | + - [Skip Interface Builder (.xib) Files](#skip-interface-builder-xib-files) |
| 16 | + - [Ignore Local Imports](#ignore-local-imports) |
| 17 | + - [Ignore Global Imports](#ignore-global-imports) |
| 18 | + - [Ignore a Path](#ignore-a-path) |
| 19 | + - [Ignore Multiple Paths](#ignore-multiple-paths) |
| 20 | + - [Delete All Unused Class Files with Prompt](#delete-all-unused-class-files-with-prompt) |
| 21 | +- [Xcode Plugin](#xcode-plugin) |
| 22 | +- [Contributing](#contributing) |
| 23 | +- [Copyright and License](#copyright-and-license) |
| 24 | + |
9 | 25 | ## Usage
|
10 | 26 |
|
11 | 27 | ```
|
12 | 28 | gem install fui
|
13 | 29 | ```
|
14 | 30 |
|
15 |
| -#### Get Help |
| 31 | +### Get Help |
16 | 32 |
|
17 | 33 | ```
|
18 | 34 | fui help
|
19 | 35 | ```
|
20 | 36 |
|
21 |
| -#### Find Unused Classes in the Current Directory |
| 37 | +### Find Unused Classes in the Current Directory |
22 | 38 |
|
23 | 39 | ```
|
24 | 40 | fui find
|
25 | 41 | ```
|
26 | 42 |
|
27 | 43 | The `find` command lists all the files that contain unused imports and exits with the number of files found.
|
28 | 44 |
|
29 |
| -#### Find Unused Classes in a Path |
| 45 | +### Find Unused Classes in any Path |
30 | 46 |
|
31 | 47 | ```
|
32 | 48 | fui --path=~/source/project/Name find
|
33 | 49 | ```
|
34 | 50 |
|
35 |
| -#### Find Unused Classes in a Path Skipping Interface Builder (.xib) Files |
| 51 | +### Skip Interface Builder (.xib) Files |
36 | 52 |
|
37 | 53 | Running `fui` with `-x` (or `--ignore-xib-files`) will, for example, mark `Foo.h` as unused when `Foo.xib` holds a reference to the `Foo` class and no other references to Foo.h exist.
|
38 | 54 |
|
39 | 55 | ```
|
40 | 56 | fui -x --path=~/source/project/Name find
|
41 | 57 | ```
|
42 | 58 |
|
43 |
| -#### Find Unused Classes in a Path Ignoring Local (quotation syntax) Imports |
| 59 | +### Ignore Local Imports |
44 | 60 |
|
45 |
| -Running `fui` with `-l` (or `--ignore-local-imports`) will, for example, mark `Foo.h` as unused when `Bar.h` contains a local import of `Foo.h` (`#import Foo.h`) |
| 61 | +Running `fui` with `-l` (or `--ignore-local-imports`) will, for example, mark `Foo.h` as unused when `Bar.h` contains a local (quotation syntax) import of `Foo.h` (eg. `#import Foo.h`). |
46 | 62 |
|
47 | 63 | ```
|
48 | 64 | fui -l --path=~/source/project/Name find
|
49 | 65 | ```
|
50 | 66 |
|
51 |
| -#### Find Unused Classes in a Path Ignoring Global (bracket syntax) Imports |
| 67 | +### Ignore Global Imports |
52 | 68 |
|
53 |
| -Running `fui` with `-g` (or `--ignore-global-imports`) will, for example, mark `Foo.h` as unused when `Bar.h` contains a global import of `Foo.h` (`#import <Framework/Foo.h>`) |
| 69 | +Running `fui` with `-g` (or `--ignore-global-imports`) will, for example, mark `Foo.h` as unused when `Bar.h` contains a global (bracket syntax) import of `Foo.h` (eg. `#import <Framework/Foo.h>`). |
54 | 70 |
|
55 | 71 | ```
|
56 | 72 | fui -g --path=~/source/project/Name find
|
57 | 73 | ```
|
58 | 74 |
|
59 |
| -#### Find Unused Classes in a Path And Also Ignoring a Path |
| 75 | +### Ignore a Path |
60 | 76 |
|
61 |
| -Running `fui` with `-i` (or `--ignore-path`) will, for example, ignore a `Pods` folder when searching for headers or referencing files |
| 77 | +Running `fui` with `-i` (or `--ignore-path`) will, for example, ignore a `Pods` folder when searching for headers or referencing files. |
62 | 78 |
|
63 | 79 | ```
|
64 | 80 | fui --path=~/source/project/Name --ignore-path=Pods find
|
65 | 81 | ```
|
66 | 82 |
|
67 |
| -#### Find Unused Classes in a Path And Also Ignoring Multiple Paths |
| 83 | +### Ignore Multiple Paths |
68 | 84 |
|
69 |
| -Running `fui` with `-i` (or `--ignore-path`) can ignore multiple folders when searching for headers or referencing files |
| 85 | +Running `fui` with `-i` (or `--ignore-path`) can ignore multiple folders when searching for headers or referencing files. |
70 | 86 |
|
71 | 87 | ```
|
72 | 88 | fui --path=~/source/project/Name --ignore-path=Pods --ignore-path=Libraries find
|
73 | 89 | ```
|
74 | 90 |
|
75 |
| -#### Delete All Unused Class Files w/ Prompt |
| 91 | +### Delete All Unused Class Files with Prompt |
76 | 92 |
|
77 | 93 | ```
|
78 | 94 | fui --path=~/source/project/Name delete --perform --prompt
|
79 | 95 | ```
|
80 | 96 |
|
81 |
| -#### Xcode Plugin |
| 97 | +## Xcode Plugin |
82 | 98 |
|
83 | 99 | Use [xcfui](https://github.com/jcavar/xcfui) for integration with Xcode.
|
84 | 100 |
|
|
0 commit comments