/
action.yml
194 lines (192 loc) · 6.71 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: "Lizard Runner"
description: "GitHub action to lint your python code with lizard"
branding:
icon: "wind"
color: "yellow"
inputs:
path:
description: "File or directory to run lizard on"
required: false
default: "./"
cli_output_file:
description: >
Specify the name of the file in which to save the cli output results.
required: false
default: "lizard_cli_output.txt"
timeout:
description: >
The time until the lizard process timeout.
Reduces the risk of consuming time without terminating when a command is invalid.
In general, there is no need to change from the default time, but for very large projects,
it should be set appropriately.
required: false
default: "600"
language:
description: >
Multiple languages are accepted by separating them by a space.(ex."python cpp java")
List the programming languages you want to analyze. if left empty, it'll
search for all languages it knows. `lizard -l cpp -l java`searches for
C++ and Java code. The available languages are: cpp, java, csharp,
javascript, python, objectivec, ttcn, ruby, php, swift, scala, GDScript,
go, lua, rust, typescript
required: false
default: ""
verbose:
description: "Output in verbose mode (long function name)"
required: false
default: "false"
CCN:
description: >
Threshold for cyclomatic complexity number warning.
The default value is 15.
Functions with CCN bigger than it will generate warning
required: false
default: "15"
input_file:
description: >
get a list of filenames from the given file
If None, this flag is not given to lizard. The default is set to None.
required: false
default: ""
output_file:
description: >
Output file. The output format is inferred from the file extension (e.g.
.html), unless it is explicitly specified (e.g. using --xml).
If None, this flag is not given to lizard. The default is set to None.
required: false
default: ""
length:
description: >
Threshold for maximum function length warning. The default value is 1000.
Functions length bigger than it will generate warning
required: false
default: "1000"
arguments:
description: >
Limit for number of parameters
required: false
default: "100"
warnings_only:
description: >
Show warnings only, using clang/gcc's warning format for printing
warnings. http://clang.llvm.org/docs/UsersManual.html#cmdoption-
fdiagnostics-format
required: false
default: "false"
warning_msvs:
description: >
Show warnings only, using Visual Studio's warning format for printing
warnings. https://msdn.microsoft.com/en-us/library/yxkt8b26.aspx
required: false
default: "false"
ignore_warnings:
description: >
If the number of warnings is equal or less than the number, the tool will
exit normally; otherwise, it will generate error. If the number is
negative, the tool exits normally regardless of the number of warnings.
Useful in makefile for legacy code.
If None, this flag is not given to lizard. The default is set to None.
required: false
default: "0"
exclude:
description: >
Exclude files that match the pattern. * matches everything, ? matches any
single character, "./folder/*" exclude everything in the folder
recursively. Multiple patterns can be specified. Don't forget to add ""
around the pattern.
If None, this flag is not given to lizard. The default is set to None.
required: false
default: ""
working_threads:
description: >
number of working threads. The default lizard value is 1. Using a bigger number
can fully utilize the CPU and often faster.
required: false
default: "4"
xml:
description: >
Generate XML in cppncss style instead of the tabular output. Useful to
generate report in Jenkins server
required: false
default: "false"
html:
description: "Output HTML report"
required: false
default: "false"
modified:
description: >
alculate modified cyclomatic complexity number , which count a
switch/case with multiple cases as one CCN.
required: false
default: "false"
extension:
description: >
User the extensions. The available extensions are: -Ecpre: it will ignore
code in the #else branch. -Ewordcount: count word frequencies and
generate tag cloud. -Eoutside: include the global code as one function.
-EIgnoreAssert: to ignore all code in assert. -ENS: count nested control
structures.
If None, this flag is not given to lizard. The default is set to None.
required: false
default: ""
sort:
description: >
Sort the warning with field. The field can be nloc,
cyclomatic_complexity, token_count, parameter_count, etc. Or an customized field.
If None, this flag is not given to lizard. The default is set to None.
required: false
default: ""
Threshold:
description: >
Set the limit for a field. The field can be nloc, cyclomatic_complexity,
token_count, parameter_count, etc. Or an customized file. Lizard will
report warning if a function exceed the limit
If None, this flag is not given to lizard. The default is set to None.
required: false
default: "nloc=1000000"
whitelist:
description: >
The path and file name to the whitelist file. It's './whitelizard.txt' by
default. Find more information in README.
required: false
default: "./whitelizard.txt"
optional_args:
description: >
optional_args unconditionally appends the given string to the end of the command.
This option is not recommended.
It is intended for limited use only when the given input variables alone
do not accomplish the intended purpose. (e.g., "--something_flag input")
required: false
default: ""
outputs:
result_output_path:
description: ""
cli_output_path:
description: ""
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.path }}
- ${{ inputs.cli_output_file }}
- ${{ inputs.timeout }}
- ${{ inputs.language }}
- ${{ inputs.verbose }}
- ${{ inputs.CCN }}
- ${{ inputs.input_file }}
- ${{ inputs.output_file }}
- ${{ inputs.length }}
- ${{ inputs.arguments }}
- ${{ inputs.warnings_only }}
- ${{ inputs.warning_msvs }}
- ${{ inputs.ignore_warnings }}
- ${{ inputs.exclude }}
- ${{ inputs.working_threads }}
- ${{ inputs.xml }}
- ${{ inputs.html }}
- ${{ inputs.modified }}
- ${{ inputs.extension }}
- ${{ inputs.sort }}
- ${{ inputs.Threshold }}
- ${{ inputs.whitelist }}
- ${{ inputs.optional_args }}