-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02c9d65
commit d2e3e49
Showing
2 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 26 additions & 14 deletions
40
selene-lib/tests/lints/approx_constant/approx_constant.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,54 @@ | ||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:11:13 | ||
┌─ approx_constant.lua:12:13 | ||
│ | ||
11 │ local bad = 3.14 | ||
12 │ local bad = 3.14 | ||
│ ^^^^ | ||
|
||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:12:13 | ||
┌─ approx_constant.lua:13:13 | ||
│ | ||
12 │ local bad = 3.141 | ||
13 │ local bad = 3.141 | ||
│ ^^^^^ | ||
|
||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:13:13 | ||
┌─ approx_constant.lua:14:14 | ||
│ | ||
14 │ local bad = -3.141 | ||
│ ^^^^^ | ||
|
||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:15:13 | ||
│ | ||
13 │ local bad = 3.142 | ||
15 │ local bad = 3.142 | ||
│ ^^^^^ | ||
|
||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:14:13 | ||
┌─ approx_constant.lua:16:13 | ||
│ | ||
14 │ local bad = 3.1415 | ||
16 │ local bad = 3.1415 | ||
│ ^^^^^^ | ||
|
||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:15:13 | ||
┌─ approx_constant.lua:17:13 | ||
│ | ||
15 │ local bad = 3.14159265 | ||
17 │ local bad = 3.14159265 | ||
│ ^^^^^^^^^^ | ||
|
||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:17:13 | ||
┌─ approx_constant.lua:19:13 | ||
│ | ||
17 │ local bad = 3.14 + 1 | ||
19 │ local bad = 3.14 + 1 | ||
│ ^^^^ | ||
|
||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:18:15 | ||
┌─ approx_constant.lua:20:15 | ||
│ | ||
18 │ local bad = f(3.14 + 1) | ||
20 │ local bad = f(3.14 + 1) | ||
│ ^^^^ | ||
|
||
error[approx_constant]: `math.pi` is more precise | ||
┌─ approx_constant.lua:21:16 | ||
│ | ||
21 │ local bad = f(-3.14 + 1) | ||
│ ^^^^ | ||
|