Don't remove excess parentheses which are highlighting precedence#610
Merged
JohnnyMorganz merged 6 commits intomainfrom Oct 27, 2022
Merged
Don't remove excess parentheses which are highlighting precedence#610JohnnyMorganz merged 6 commits intomainfrom
JohnnyMorganz merged 6 commits intomainfrom
Conversation
Codecov ReportBase: 97.65% // Head: 97.65% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #610 +/- ##
=======================================
Coverage 97.65% 97.65%
=======================================
Files 14 14
Lines 5577 5585 +8
=======================================
+ Hits 5446 5454 +8
Misses 131 131
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Contributor
Repo Comparison Testdiff --git ORI/zombie-strike/src/hub/StarterGui/MainGui/App/GoldShop/Pages/Weapons.lua ALT/zombie-strike/src/hub/StarterGui/MainGui/App/GoldShop/Pages/Weapons.lua
index 40c9d39..9bb931f 100644
--- ORI/zombie-strike/src/hub/StarterGui/MainGui/App/GoldShop/Pages/Weapons.lua
+++ ALT/zombie-strike/src/hub/StarterGui/MainGui/App/GoldShop/Pages/Weapons.lua
@@ -107,7 +107,7 @@ local function WeaponCard(props)
Label = element,
- GoldIcon = not props.AlreadyBought and e("ImageLabel", {
+ GoldIcon = (not props.AlreadyBought) and e("ImageLabel", {
AnchorPoint = Vector2.new(1, 1),
BackgroundTransparency = 1,
Image = ImageCap,
diff --git ORI/zombie-strike/src/shared/ReplicatedStorage/ItemModules/Gun.lua ALT/zombie-strike/src/shared/ReplicatedStorage/ItemModules/Gun.lua
index 74ed4be..8b1a36c 100644
--- ORI/zombie-strike/src/shared/ReplicatedStorage/ItemModules/Gun.lua
+++ ALT/zombie-strike/src/shared/ReplicatedStorage/ItemModules/Gun.lua
@@ -240,7 +240,7 @@ function module.Create(_, item)
reloadTime = perk:ModifyReloadTime(reloadTime)
end
- if not reloading and itemModule.Equipped and ammo < config.Magazine then
+ if (not reloading) and itemModule.Equipped and ammo < config.Magazine then
reloading = true
rCancelled = false
diff --git ORI/luvit/deps/repl.lua ALT/luvit/deps/repl.lua
index 6a69144..d67eb34 100644
--- ORI/luvit/deps/repl.lua
+++ ALT/luvit/deps/repl.lua
@@ -176,7 +176,7 @@ return function(stdin, stdout, greeting)
local prop = sep ~= ":"
while type(scope) == "table" do
for key, value in pairs(scope) do
- if (prop or (type(value) == "function")) and (not prefix or (string.match(key, "^" .. prefix))) then
+ if (prop or (type(value) == "function")) and ((not prefix) or (string.match(key, "^" .. prefix))) then
matches[key] = true
end
end
diff --git ORI/lit/deps/semver.lua ALT/lit/deps/semver.lua
index 91c9e66..718c542 100644
--- ORI/lit/deps/semver.lua
+++ ALT/lit/deps/semver.lua
@@ -90,7 +90,7 @@ function match(version, iterator)
-- With an empty match, simply grab the newest version
for possible in iterator do
local d, e, f, y = parse(possible)
- if not a or (d > a) or (d == a and (e > b or (e == b and (f > c or (f == c and y > x))))) then
+ if (not a) or (d > a) or (d == a and (e > b or (e == b and (f > c or (f == c and y > x))))) then
a, b, c, x = d, e, f, y
end
end
@@ -107,7 +107,7 @@ function match(version, iterator)
if
d == g
and (e > h or (e == h and (f > i or (f == i and y >= z))))
- and (not a or e > b or (e == b and (f > c or (f == c and y > x))))
+ and ((not a) or e > b or (e == b and (f > c or (f == c and y > x))))
then
a, b, c, x = d, e, f, y
end
@@ -118,7 +118,12 @@ function match(version, iterator)
for possible in iterator do
local d, e, f, y = parse(possible)
-- Must be gte the minumum, but match major and minor versions.
- if d == g and e == h and (f > i or (f == i and y >= z)) and (not a or f > c or (f == c and y > x)) then
+ if
+ d == g
+ and e == h
+ and (f > i or (f == i and y >= z))
+ and ((not a) or f > c or (f == c and y > x))
+ then
a, b, c, x = d, e, f, y
end
end
@@ -127,7 +132,7 @@ function match(version, iterator)
for possible in iterator do
local d, e, f, y = parse(possible)
-- Must match major, minor, and patch, only allow build updates
- if d == g and e == h and f == i and y >= z and (not a or y > x) then
+ if d == g and e == h and f == i and y >= z and ((not a) or y > x) then
a, b, c, x = d, e, f, y
end
end
|
…xcess-parentheses-dont-remove
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #609