Skip to content
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 4 commits into from Aug 21, 2022

Conversation

JohnnyMorganz
Copy link
Owner

Fixes #547

@codecov
Copy link

codecov bot commented Aug 21, 2022

Codecov Report

Merging #548 (5442cc2) into main (673643f) will increase coverage by 0.00%.
The diff coverage is 94.44%.

@@           Coverage Diff           @@
##             main     #548   +/-   ##
=======================================
  Coverage   97.79%   97.80%           
=======================================
  Files          14       14           
  Lines        5409     5420   +11     
=======================================
+ Hits         5290     5301   +11     
  Misses        119      119           
Impacted Files Coverage Δ
src/formatters/general.rs 96.72% <92.85%> (+0.06%) ⬆️
src/formatters/table.rs 98.70% <100.00%> (+<0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link
Contributor

Repo Comparison Test

diff --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

@JohnnyMorganz JohnnyMorganz merged commit 096bbeb into main Aug 21, 2022
@JohnnyMorganz JohnnyMorganz deleted the trailing-comma-format-comments branch August 21, 2022 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trailing comments not formatted when trailing comma added
1 participant