Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Oct 21, 2024
1 parent 1878680 commit 8161ba6
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 16 deletions.
10 changes: 5 additions & 5 deletions libs/sqf/tests/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ lint!(s07_select_parse_number, true);
lint!(s08_format_args, true);
lint!(s09_banned_command, true);
lint!(s11_if_not_else, true);
// analyze!(s12_invalid_args, false);
// analyze!(s13_undefined, false);
// analyze!(s14_unused, false);
// analyze!(s15_shadowed, false);
// analyze!(s16_not_private, false);
lint!(s12_invalid_args, false);
lint!(s13_undefined, false);
lint!(s14_unused, false);
lint!(s15_shadowed, false);
lint!(s16_not_private, false);
lint!(s17_var_all_caps, true);
lint!(s18_in_vehicle_check, true);
lint!(s20_bool_static_comparison, true);
Expand Down
2 changes: 1 addition & 1 deletion libs/sqf/tests/lints/project_tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if_not_else = true
enabled = true

[lints.sqf.not_private]
not_private = true
enabled = true

[lints.sqf.unused]
enabled = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
source: libs/sqf/tests/lints.rs
expression: "lint(stringify! (s12_invalid_args), false)"
---
help[L-S12]: Invalid Args - [B:setFuel]
[0m[36m┌─[0m source.sqf:3:18
[0m[36m┌─[0m s12_invalid_args.sqf:3:18
│
3 │ (vehicle player) setFuel true; // bad args: takes number 0-1
│ ^^^^^^^

Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
source: libs/sqf/tests/lints.rs
expression: "lint(stringify! (s13_undefined), false)"
---
help[L-S13]: Undefined Var - _neverDefined
[0m[36m┌─[0m source.sqf:1:17
[0m[36m┌─[0m s13_undefined.sqf:1:17
│
1 │ x = {systemChat _neverDefined;};
│ ^^^^^^^^^^^^^
│
= note: From Orphan Code - may not be a problem

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
source: libs/sqf/tests/lints.rs
expression: "lint(stringify! (s14_unused), false)"
---
help[L-S14]: Unused Var - _z
[0m[36m┌─[0m source.sqf:1:1
[0m[36m┌─[0m s14_unused.sqf:1:1
│
1 │ private _z = 5; // and never used
│ ^^^^^^^^^^^^^^

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
source: libs/sqf/tests/lints.rs
expression: "lint(stringify! (s15_shadowed), false)"
---
help[L-S15]: Shadowed Var - _z
[0m[36m┌─[0m source.sqf:2:1
[0m[36m┌─[0m s15_shadowed.sqf:2:1
│
2 │ private _z = 5;
│ ^^^^^^^^^^^^^^

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
source: libs/sqf/tests/lints.rs
expression: "lint(stringify! (s16_not_private), false)"
---
help[L-S16]: Not Private - _z
[0m[36m┌─[0m source.sqf:1:1
[0m[36m┌─[0m s16_not_private.sqf:1:1
│
1 │ _z = 6;
│ ^^^^^^

0 comments on commit 8161ba6

Please sign in to comment.