Warning List
This is used to disable specific preset compiler warning numbers.
For example, in the following configuration, -2
disables the warning number 2 (Unused variable).
{
"warn-list": "-2",
}
You can use moonc build-package -warn-help
to see the list of preset compiler warning numbers.
$ moonc -v
v0.1.20240914+b541585d3
$ moonc build-package -warn-help
Available warnings:
1 Unused function.
2 Unused variable.
3 Unused type declaration.
4 Redundant case in a pattern matching (unused match case).
5 Unused function argument.
6 Unused constructor.
7 Unused module declaration.
8 Unused struct field.
10 Unused generic type variable.
11 Partial pattern matching.
12 Unreachable code.
13 Unresolved type variable.
14 Lowercase type name.
15 Unused mutability.
16 Parser inconsistency.
18 Useless loop expression.
19 Top-level declaration is not left aligned.
20 Invalid pragma
21 Some arguments of constructor are omitted in pattern.
22 Ambiguous block.
23 Useless try expression.
24 Useless error type.
26 Useless catch all.
A all warnings