You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`badgesDirectory`| Directory where the two maintainbility badges will be created (when enabled) |`['/generated']`|
67
+
|`enableFlow`| Enable Flow support |`false`|
68
+
|`extensions`| File extensions that should be analyzed. The default is always used, but you can add more extensions. You can use the `exclude[...]` options to exclude specific files. |`['.js', '.jsx', '.ts', '.tsx']`|
69
+
|`excludeFilenames`| Filename matches that should be excluded from static analysis (but still show in the data). The default is always used, but you can add more matches to be excluded. Note that the matching is exact. The exclude list is taken into consideration after the extension list. |`['.d.ts', '.min.js', '.bundle.js']`|
70
+
|`excludeDirectories`| Directory matches that should be excluded from static analysis (but still show in the data). Relative to the root. E.g. `['/fixtures', '/test']`|`['/dist', '/bin', '/build']`|
71
+
|`excludeExact`| Exact file matches that should be excluded from static analysis (but still show in the data). Relative to the root. E.g. `['/src/foo/bar.ts']`|`[]`|
72
+
|`skipDirectories`| Directories that should be excluded completely, i.e. not visible in the resulting data at all. The defaults will always be skipped. |`['/node_modules', '/flow-typed', '/coverage']`|
73
+
|`minimumThreshold`| Minimum acceptable maintainability score. If a file violates this score, the CLI will exit with code 1 (used to ensure a minimum level of maintainability in CI). It is recommended to set this to at least 30. |`10`|
74
+
|`cliOutputLimit`| Number of files to list in the CLI output (from worst scoring to best scoring). |`25`|
75
+
76
+
60
77
## Advanced usage
61
78
62
79
Analyze an entire directory:
@@ -107,21 +124,6 @@ Each analyzed file in your project ends up with:
107
124
-`dependencies` - a map of this file's dependecies
108
125
-`timesDependedOn` - number of times this file is imported by other files
109
126
-`complexityReport` - various detailed complexity metrics such as halstead metrics and cyclomatic complexity
110
-
111
-
## Options
112
-
113
-
To customise your analysis, use the following options, placed in a `codehawk.json` file in the root directory.
|`badgesDirectory`| Directory where the two maintainbility badges will be created (when enabled) |`['/generated']`|
118
-
|`enableFlow`| Enable Flow support |`false`|
119
-
|`extensions`| File extensions that should be analyzed. The default is always used, but you can add more extensions. You can use the `exclude[...]` options to exclude specific files. |`['.js', '.jsx', '.ts', '.tsx']`|
120
-
|`excludeFilenames`| Filename matches that should be excluded from static analysis (but still show in the data). The default is always used, but you can add more matches to be excluded. Note that the matching is exact. The exclude list is taken into consideration after the extension list. |`['.d.ts', '.min.js', '.bundle.js']`|
121
-
|`excludeDirectories`| Directory matches that should be excluded from static analysis (but still show in the data). Relative to the root. E.g. `['/fixtures', '/test']`|`['/dist', '/bin', '/build']`|
122
-
|`excludeExact`| Exact file matches that should be excluded from static analysis (but still show in the data). Relative to the root. E.g. `['/src/foo/bar.ts']`|`[]`|
123
-
|`skipDirectories`| Directories that should be excluded completely, i.e. not visible in the resulting data at all. The defaults will always be skipped. |`['/node_modules', '/flow-typed', '/coverage']`|
124
-
125
127
## Badges
126
128
127
129
By default, codehawk-cli generates 2 badges (in `generated/*.svg`) when called via the main CLI interface:
0 commit comments