Skip to content

Commit b119a11

Browse files
committed
Add some lint tests
1 parent 36daf53 commit b119a11

161 files changed

Lines changed: 7909 additions & 7894 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ assignees: ''
3333

3434

3535
**Information:**
36-
- Operating System:
37-
- Celeste Version:
36+
- Operating System:
37+
- Celeste Version:
3838
- Everest Version:
3939

4040

.github/workflows/autobuild.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ jobs:
88
steps:
99
- uses: actions/checkout@v1
1010

11+
- name: Check for tabs
12+
run: |
13+
find "(" -name "*.cs" -or -name "*.lua" -or -name "*.jl" -or -name "*.xml" -or -name "*.yaml" -or -name "*.yml" -or -name "*.txt" -or -name "*.md" ")" -exec grep -Pl "\t" {} \; > matches.txt
14+
grep "" matches.txt && exit 1 || echo "No tab found!"
15+
16+
- name: Check for CRLF
17+
run: |
18+
find "(" -name "*.cs" -or -name "*.lua" -or -name "*.jl" -or -name "*.xml" -or -name "*.yaml" -or -name "*.yml" -or -name "*.txt" -or -name "*.md" ")" -exec grep -Plz "\r\n" {} \; > matches.txt
19+
grep "" matches.txt && exit 1 || echo "No CRLF found!"
20+
21+
- name: Check for trailing spaces
22+
run: |
23+
find "(" -name "*.cs" -or -name "*.lua" -or -name "*.jl" -or -name "*.xml" -or -name "*.yaml" -or -name "*.yml" -or -name "*.txt" -or -name "*.md" ")" -exec grep -Pl " $" {} \; > matches.txt
24+
grep "" matches.txt && exit 1 || echo "No trailing space found!"
25+
1126
- name: Setup .NET Core
1227
uses: actions/setup-dotnet@v1
1328
with:
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
module SpringCollab2020BlackholeCustomColors
2-
3-
using ..Ahorn, Maple
4-
5-
@mapdef Effect "SpringCollab2020/BlackholeCustomColors" BlackholeCustomColors(only::String="*", exclude::String="", colorsMild::String="6e3199,851f91,3026b0", colorsWild::String="ca4ca7,b14cca,ca4ca7",
6-
bgColorInner::String="000000", bgColorOuterMild::String="512a8b", bgColorOuterWild::String="bd2192", alpha::Number=1.0)
7-
8-
placements = BlackholeCustomColors
9-
10-
function Ahorn.canFgBg(effect::BlackholeCustomColors)
11-
return true, true
12-
end
13-
14-
end
1+
module SpringCollab2020BlackholeCustomColors
2+
3+
using ..Ahorn, Maple
4+
5+
@mapdef Effect "SpringCollab2020/BlackholeCustomColors" BlackholeCustomColors(only::String="*", exclude::String="", colorsMild::String="6e3199,851f91,3026b0", colorsWild::String="ca4ca7,b14cca,ca4ca7",
6+
bgColorInner::String="000000", bgColorOuterMild::String="512a8b", bgColorOuterWild::String="bd2192", alpha::Number=1.0)
7+
8+
placements = BlackholeCustomColors
9+
10+
function Ahorn.canFgBg(effect::BlackholeCustomColors)
11+
return true, true
12+
end
13+
14+
end

Ahorn/effects/customSnow.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
module SpringCollab2020CustomSnow
2-
3-
using ..Ahorn, Maple
4-
5-
@mapdef Effect "SpringCollab2020/CustomSnow" CustomSnow(only::String="*", exclude::String="", colors::String="FFFFFF,FFFFFF")
6-
7-
placements = CustomSnow
8-
9-
function Ahorn.canFgBg(effect::CustomSnow)
10-
return true, true
11-
end
12-
13-
end
1+
module SpringCollab2020CustomSnow
2+
3+
using ..Ahorn, Maple
4+
5+
@mapdef Effect "SpringCollab2020/CustomSnow" CustomSnow(only::String="*", exclude::String="", colors::String="FFFFFF,FFFFFF")
6+
7+
placements = CustomSnow
8+
9+
function Ahorn.canFgBg(effect::CustomSnow)
10+
return true, true
11+
end
12+
13+
end
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
module SpringCollab2020HeatWaveNoColorGrade
2-
3-
using ..Ahorn, Maple
4-
5-
@mapdef Effect "SpringCollab2020/HeatWaveNoColorGrade" HeatWaveNoColorGrade(only::String="*", exclude::String="")
6-
7-
placements = HeatWaveNoColorGrade
8-
9-
function Ahorn.canFgBg(effect::HeatWaveNoColorGrade)
10-
return true, true
11-
end
12-
13-
end
1+
module SpringCollab2020HeatWaveNoColorGrade
2+
3+
using ..Ahorn, Maple
4+
5+
@mapdef Effect "SpringCollab2020/HeatWaveNoColorGrade" HeatWaveNoColorGrade(only::String="*", exclude::String="")
6+
7+
placements = HeatWaveNoColorGrade
8+
9+
function Ahorn.canFgBg(effect::HeatWaveNoColorGrade)
10+
return true, true
11+
end
12+
13+
end

Ahorn/entities/animatedJumpthruPlatform.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module SpringCollab2020AnimatedJumpthruPlatform
1+
module SpringCollab2020AnimatedJumpthruPlatform
22

33
using ..Ahorn, Maple
44

Ahorn/entities/attachedIceWall.jl

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
module SpringCollab2020AttachedIceWall
2-
3-
using ..Ahorn, Maple
4-
5-
@mapdef Entity "SpringCollab2020/AttachedIceWall" AttachedIceWall(x::Integer, y::Integer, height::Integer=8, left::Bool=false)
6-
7-
const placements = Ahorn.PlacementDict(
8-
"Attached Ice Wall (Right) (Spring Collab 2020)" => Ahorn.EntityPlacement(
9-
AttachedIceWall,
10-
"rectangle",
11-
Dict{String, Any}(
12-
"left" => true
13-
)
14-
),
15-
"Attached Ice Wall (Left) (Spring Collab 2020)" => Ahorn.EntityPlacement(
16-
AttachedIceWall,
17-
"rectangle",
18-
Dict{String, Any}(
19-
"left" => false
20-
)
21-
)
22-
)
23-
24-
Ahorn.minimumSize(entity::AttachedIceWall) = 0, 8
25-
Ahorn.resizable(entity::AttachedIceWall) = false, true
26-
27-
function Ahorn.selection(entity::AttachedIceWall)
28-
x, y = Ahorn.position(entity)
29-
height = Int(get(entity.data, "height", 8))
30-
31-
return Ahorn.Rectangle(x, y, 8, height)
32-
end
33-
34-
function Ahorn.render(ctx::Ahorn.Cairo.CairoContext, entity::AttachedIceWall, room::Maple.Room)
35-
left = get(entity.data, "left", false)
36-
37-
# Values need to be system specific integer
38-
x = Int(get(entity.data, "x", 0))
39-
y = Int(get(entity.data, "y", 0))
40-
41-
height = Int(get(entity.data, "height", 8))
42-
tileHeight = div(height, 8)
43-
44-
if left
45-
for i in 2:tileHeight - 1
46-
Ahorn.drawImage(ctx, "objects/wallBooster/iceMid00", 0, (i - 1) * 8)
47-
end
48-
49-
Ahorn.drawImage(ctx, "objects/wallBooster/iceTop00", 0, 0)
50-
Ahorn.drawImage(ctx, "objects/wallBooster/iceBottom00", 0, (tileHeight - 1) * 8)
51-
52-
else
53-
Ahorn.Cairo.save(ctx)
54-
Ahorn.scale(ctx, -1, 1)
55-
56-
for i in 2:tileHeight - 1
57-
Ahorn.drawImage(ctx, "objects/wallBooster/iceMid00", -8, (i - 1) * 8)
58-
end
59-
60-
Ahorn.drawImage(ctx, "objects/wallBooster/iceTop00", -8, 0)
61-
Ahorn.drawImage(ctx, "objects/wallBooster/iceBottom00", -8, (tileHeight - 1) * 8)
62-
63-
Ahorn.restore(ctx)
64-
end
65-
end
66-
67-
# Offset X position so it flips in place
68-
function Ahorn.flipped(entity::AttachedIceWall, horizontal::Bool)
69-
if horizontal
70-
entity.left = !entity.left
71-
entity.x += entity.left ? 8 : -8
72-
73-
return entity
74-
end
75-
end
76-
77-
end
1+
module SpringCollab2020AttachedIceWall
2+
3+
using ..Ahorn, Maple
4+
5+
@mapdef Entity "SpringCollab2020/AttachedIceWall" AttachedIceWall(x::Integer, y::Integer, height::Integer=8, left::Bool=false)
6+
7+
const placements = Ahorn.PlacementDict(
8+
"Attached Ice Wall (Right) (Spring Collab 2020)" => Ahorn.EntityPlacement(
9+
AttachedIceWall,
10+
"rectangle",
11+
Dict{String, Any}(
12+
"left" => true
13+
)
14+
),
15+
"Attached Ice Wall (Left) (Spring Collab 2020)" => Ahorn.EntityPlacement(
16+
AttachedIceWall,
17+
"rectangle",
18+
Dict{String, Any}(
19+
"left" => false
20+
)
21+
)
22+
)
23+
24+
Ahorn.minimumSize(entity::AttachedIceWall) = 0, 8
25+
Ahorn.resizable(entity::AttachedIceWall) = false, true
26+
27+
function Ahorn.selection(entity::AttachedIceWall)
28+
x, y = Ahorn.position(entity)
29+
height = Int(get(entity.data, "height", 8))
30+
31+
return Ahorn.Rectangle(x, y, 8, height)
32+
end
33+
34+
function Ahorn.render(ctx::Ahorn.Cairo.CairoContext, entity::AttachedIceWall, room::Maple.Room)
35+
left = get(entity.data, "left", false)
36+
37+
# Values need to be system specific integer
38+
x = Int(get(entity.data, "x", 0))
39+
y = Int(get(entity.data, "y", 0))
40+
41+
height = Int(get(entity.data, "height", 8))
42+
tileHeight = div(height, 8)
43+
44+
if left
45+
for i in 2:tileHeight - 1
46+
Ahorn.drawImage(ctx, "objects/wallBooster/iceMid00", 0, (i - 1) * 8)
47+
end
48+
49+
Ahorn.drawImage(ctx, "objects/wallBooster/iceTop00", 0, 0)
50+
Ahorn.drawImage(ctx, "objects/wallBooster/iceBottom00", 0, (tileHeight - 1) * 8)
51+
52+
else
53+
Ahorn.Cairo.save(ctx)
54+
Ahorn.scale(ctx, -1, 1)
55+
56+
for i in 2:tileHeight - 1
57+
Ahorn.drawImage(ctx, "objects/wallBooster/iceMid00", -8, (i - 1) * 8)
58+
end
59+
60+
Ahorn.drawImage(ctx, "objects/wallBooster/iceTop00", -8, 0)
61+
Ahorn.drawImage(ctx, "objects/wallBooster/iceBottom00", -8, (tileHeight - 1) * 8)
62+
63+
Ahorn.restore(ctx)
64+
end
65+
end
66+
67+
# Offset X position so it flips in place
68+
function Ahorn.flipped(entity::AttachedIceWall, horizontal::Bool)
69+
if horizontal
70+
entity.left = !entity.left
71+
entity.x += entity.left ? 8 : -8
72+
73+
return entity
74+
end
75+
end
76+
77+
end

Ahorn/entities/bubblePushField.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
module SpringCollab2020BubblePushField
1+
module SpringCollab2020BubblePushField
22

33
using ..Ahorn, Maple
44

55
@mapdef Entity "SpringCollab2020/bubblePushField" BubblePushField(x::Integer, y::Integer, width::Integer=Maple.defaultBlockWidth, height::Integer=Maple.defaultBlockHeight,
6-
strength::Number=1.0, upwardStrength::Number=1.0, direction::String="Right", water::Bool=true, flag::String="bubble_push_field", activationMode::String="Always")
6+
strength::Number=1.0, upwardStrength::Number=1.0, direction::String="Right", water::Bool=true, flag::String="bubble_push_field", activationMode::String="Always")
77

88
const placements = Ahorn.PlacementDict(
9-
"Bubble Column (Spring Collab 2020)" => Ahorn.EntityPlacement(
10-
BubblePushField,
11-
"rectangle"
12-
)
9+
"Bubble Column (Spring Collab 2020)" => Ahorn.EntityPlacement(
10+
BubblePushField,
11+
"rectangle"
12+
)
1313
)
1414

1515
Ahorn.editingOptions(entity::BubblePushField) = Dict{String,Any}(
16-
"direction" => ["Up", "Down", "Left", "Right"],
17-
"activationMode" => ["Always", "OnlyWhenFlagActive", "OnlyWhenFlagInactive"]
16+
"direction" => ["Up", "Down", "Left", "Right"],
17+
"activationMode" => ["Always", "OnlyWhenFlagActive", "OnlyWhenFlagInactive"]
1818
)
1919

2020
Ahorn.minimumSize(entity::BubblePushField) = 8, 8
@@ -23,13 +23,13 @@ Ahorn.resizable(entity::BubblePushField) = true, true
2323
Ahorn.selection(entity::BubblePushField) = Ahorn.getEntityRectangle(entity)
2424

2525
function Ahorn.render(ctx::Ahorn.Cairo.CairoContext, entity::BubblePushField, room::Maple.Room)
26-
x = Int(get(entity.data, "x", 0))
27-
y = Int(get(entity.data, "y", 0))
26+
x = Int(get(entity.data, "x", 0))
27+
y = Int(get(entity.data, "y", 0))
2828

29-
width = Int(get(entity.data, "width", 32))
30-
height = Int(get(entity.data, "height", 32))
29+
width = Int(get(entity.data, "width", 32))
30+
height = Int(get(entity.data, "height", 32))
3131

32-
Ahorn.drawRectangle(ctx, 0, 0, width, height, (0.7, 0.28, 0.0, 0.34), (1.0, 1.0, 1.0, 0.5))
32+
Ahorn.drawRectangle(ctx, 0, 0, width, height, (0.7, 0.28, 0.0, 0.34), (1.0, 1.0, 1.0, 0.5))
3333
end
3434

3535
end

0 commit comments

Comments
 (0)