Skip to content

Commit

Permalink
Fix lua lint errors, move mac installation of luarocks
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Sep 9, 2024
1 parent 7095d9b commit d2fc451
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/lua.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ jobs:
with:
withLuaPath: "lua"

- run: sudo luarocks install luacov
if: ${{ !contains(matrix.os, 'windows') }}

- run: luarocks install luacov
if: ${{ contains(matrix.os, 'windows') }}

- run: make lu_test COV=true

Expand Down
6 changes: 3 additions & 3 deletions lua/src/p0001.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ return {
local answer = 0

for i = 3,999,3
do
do
answer = answer + i
end

for i = 5,999,5
do
do
answer = answer + i
end

for i = 15,999,15
do
do
answer = answer - i
end

Expand Down
4 changes: 2 additions & 2 deletions lua/src/p0002.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ return {
while b < 4000000
do
answer = answer + b
for j = 1,3,1

for _ = 1,3,1
do
a, b = b, a + b
end
Expand Down
2 changes: 1 addition & 1 deletion lua/src/p0017.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ return {
local answer = 0

for x = 1,1000,1
do
do
answer = answer + to_string_len(x)
end

Expand Down

0 comments on commit d2fc451

Please sign in to comment.