-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format comments added to new trailing comma #548
Merged
Merged
Conversation
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
Codecov Report
@@ Coverage Diff @@
## main #548 +/- ##
=======================================
Coverage 97.79% 97.80%
=======================================
Files 14 14
Lines 5409 5420 +11
=======================================
+ Hits 5290 5301 +11
Misses 119 119
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Repo Comparison Testdiff --git ORI/luvit/deps/http-codec.lua ALT/luvit/deps/http-codec.lua
index 82caa66..d98936d 100644
--- ORI/luvit/deps/http-codec.lua
+++ ALT/luvit/deps/http-codec.lua
@@ -90,7 +90,7 @@ local STATUS_CODES = {
[507] = "Insufficient Storage", -- RFC 4918
[509] = "Bandwidth Limit Exceeded",
[510] = "Not Extended", -- RFC 2774
- [511] = "Network Authentication Required", -- RFC 6585
+ [511] = "Network Authentication Required", -- RFC 6585
}
local function encoder()
diff --git ORI/luvit/examples/http-connect.lua ALT/luvit/examples/http-connect.lua
index 866bbae..3d76276 100644
--- ORI/luvit/examples/http-connect.lua
+++ ALT/luvit/examples/http-connect.lua
@@ -6,7 +6,7 @@ local options = {
path = "www.google.com:80", -- what to proxy to
method = "CONNECT",
headers = {
- { "host", "proxy" }, -- proxy vhost on host
+ { "host", "proxy" }, -- proxy vhost on host
},
}
diff --git ORI/luvit/tests/test-url.lua ALT/luvit/tests/test-url.lua
index 105e660..88a1867 100644
--- ORI/luvit/tests/test-url.lua
+++ ALT/luvit/tests/test-url.lua
@@ -86,7 +86,11 @@ local relativeTests = {
"https://u:p@h.com/p/a/t/h?s#hash2",
},
{ "http://example.com/b//c//d;p?q#blarg", "https://a/b/c/d", "https://a/b/c/d" },
- { "http://example.com/b//c//d;p?q#blarg", "http://u:p@h.com/p/a/t/h?s#hash2", "http://u:p@h.com/p/a/t/h?s#hash2" },
+ {
+ "http://example.com/b//c//d;p?q#blarg",
+ "http://u:p@h.com/p/a/t/h?s#hash2",
+ "http://u:p@h.com/p/a/t/h?s#hash2",
+ },
{ "/foo/bar/baz", "/../etc/passwd", "/etc/passwd" },
{ "http://localhost", "file://foo/Users", "file://foo/Users" },
-- from node
diff --git ORI/luvit/tests/test-ustring.lua ALT/luvit/tests/test-ustring.lua
index 2595b6f..20348c6 100644
--- ORI/luvit/tests/test-ustring.lua
+++ ALT/luvit/tests/test-ustring.lua
@@ -64,7 +64,7 @@ require("tap")(function(test)
"😘",
"😄",
"💎",
- "💛",-- Emoji
+ "💛", -- Emoji
}
assert(compareTable(u, e))
assert(tostring(u) == r) -- __tostring
diff --git ORI/lit/commands/serve.lua ALT/lit/commands/serve.lua
index 38e6078..e453aa3 100644
--- ORI/lit/commands/serve.lua
+++ ALT/lit/commands/serve.lua
@@ -37,11 +37,10 @@ return function()
end
end)
- app.use(require("weblit-auto-headers"))
-.route({ method = "GET", path = "/snapshots" }, require("snapshots")).route(
- { method = "GET", path = "/stats" },
- require("stats")
- )
+ app
+ .use(require("weblit-auto-headers"))
+ .route({ method = "GET", path = "/snapshots" }, require("snapshots"))
+ .route({ method = "GET", path = "/stats" }, require("stats"))
-- Handle websocket clients
app.websocket({
diff --git ORI/lit/deps/http-codec.lua ALT/lit/deps/http-codec.lua
index a728bdb..6bb2f4b 100644
--- ORI/lit/deps/http-codec.lua
+++ ALT/lit/deps/http-codec.lua
@@ -90,7 +90,7 @@ local STATUS_CODES = {
[507] = "Insufficient Storage", -- RFC 4918
[509] = "Bandwidth Limit Exceeded",
[510] = "Not Extended", -- RFC 2774
- [511] = "Network Authentication Required", -- RFC 6585
+ [511] = "Network Authentication Required", -- RFC 6585
}
local function encoder()
diff --git ORI/lit/deps/ssh-rsa.lua ALT/lit/deps/ssh-rsa.lua
index 17bc6bf..ac1f3ae 100644
--- ORI/lit/deps/ssh-rsa.lua
+++ ALT/lit/deps/ssh-rsa.lua
@@ -45,25 +45,27 @@ do
function dec(data)
data = string.gsub(data, "[^" .. chars .. "=]", "")
return (
- data:gsub(".", function(x)
- if x == "=" then
- return ""
- end
- local r, f = "", (chars:find(x) - 1)
- for i = 6, 1, -1 do
- r = r .. (f % 2 ^ i - f % 2 ^ (i - 1) > 0 and "1" or "0")
- end
- return r
- end):gsub("%d%d%d?%d?%d?%d?%d?%d?", function(x)
- if #x ~= 8 then
- return ""
- end
- local c = 0
- for i = 1, 8 do
- c = c + (x:sub(i, i) == "1" and 2 ^ (8 - i) or 0)
- end
- return string.char(c)
- end)
+ data
+ :gsub(".", function(x)
+ if x == "=" then
+ return ""
+ end
+ local r, f = "", (chars:find(x) - 1)
+ for i = 6, 1, -1 do
+ r = r .. (f % 2 ^ i - f % 2 ^ (i - 1) > 0 and "1" or "0")
+ end
+ return r
+ end)
+ :gsub("%d%d%d?%d?%d?%d?%d?%d?", function(x)
+ if #x ~= 8 then
+ return ""
+ end
+ local c = 0
+ for i = 1, 8 do
+ c = c + (x:sub(i, i) == "1" and 2 ^ (8 - i) or 0)
+ end
+ return string.char(c)
+ end)
)
end
end
|
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 #547