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

Don't expand call with nested comment #549

Merged
merged 5 commits into from Sep 4, 2022

Conversation

JohnnyMorganz
Copy link
Owner

@JohnnyMorganz JohnnyMorganz commented Aug 21, 2022

Fixes #543
Fixes #561

@codecov
Copy link

codecov bot commented Aug 21, 2022

Codecov Report

Merging #549 (a28ce69) into main (e4740f9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #549   +/-   ##
=======================================
  Coverage   97.80%   97.81%           
=======================================
  Files          14       14           
  Lines        5431     5436    +5     
=======================================
+ Hits         5312     5317    +5     
  Misses        119      119           
Impacted Files Coverage Δ
src/formatters/functions.rs 98.61% <100.00%> (+<0.01%) ⬆️
src/formatters/general.rs 96.74% <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

This comment was marked as outdated.

@JohnnyMorganz
Copy link
Owner Author

Potential negative impact from this change... Need to rethink

@JohnnyMorganz
Copy link
Owner Author

Closing this out as the change produces negative side effects. The original formatting is reasonable to remain, compared to the new formatting

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@JohnnyMorganz JohnnyMorganz reopened this Sep 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2022

Repo Comparison Test

diff --git ORI/luvit/deps/fs.lua ALT/luvit/deps/fs.lua
index d23b09e..cfc331f 100644
--- ORI/luvit/deps/fs.lua
+++ ALT/luvit/deps/fs.lua
@@ -423,18 +423,13 @@ end
 local function noop() end
 local function readFile(path, callback)
 	local fd, onStat, onRead, onChunk, pos, chunks
-	uv.fs_open(
-		path,
-		"r",
-		438, --[[ 0666 ]]
-		function(err, result)
-			if err then
-				return callback(err)
-			end
-			fd = result
-			uv.fs_fstat(fd, onStat)
+	uv.fs_open(path, "r", 438 --[[ 0666 ]], function(err, result)
+		if err then
+			return callback(err)
 		end
-	)
+		fd = result
+		uv.fs_fstat(fd, onStat)
+	end)
 	function onStat(err, stat)
 		if err then
 			return onRead(err)
@@ -472,11 +467,7 @@ function fs.readFile(path, callback)
 end
 function fs.readFileSync(path)
 	local fd, stat, chunk, err
-	fd, err = uv.fs_open(
-		path,
-		"r",
-		438 --[[ 0666 ]]
-	)
+	fd, err = uv.fs_open(path, "r", 438 --[[ 0666 ]])
 	if err then
 		return false, err
 	end
@@ -505,18 +496,13 @@ function fs.readFileSync(path)
 end
 local function writeFile(path, data, callback)
 	local fd, onWrite
-	uv.fs_open(
-		path,
-		"w",
-		438, --[[ 0666 ]]
-		function(err, result)
-			if err then
-				return callback(err)
-			end
-			fd = result
-			uv.fs_write(fd, data, 0, onWrite)
+	uv.fs_open(path, "w", 438 --[[ 0666 ]], function(err, result)
+		if err then
+			return callback(err)
 		end
-	)
+		fd = result
+		uv.fs_write(fd, data, 0, onWrite)
+	end)
 	function onWrite(err)
 		uv.fs_close(fd, noop)
 		return callback(err)
@@ -527,11 +513,7 @@ function fs.writeFile(path, data, callback)
 end
 function fs.writeFileSync(path, data)
 	local _, fd, err
-	fd, err = uv.fs_open(
-		path,
-		"w",
-		438 --[[ 0666 ]]
-	)
+	fd, err = uv.fs_open(path, "w", 438 --[[ 0666 ]])
 	if err then
 		return false, err
 	end
@@ -771,17 +753,12 @@ function fs.appendFile(filename, data, callback)
 		end
 		fs.write(fd, -1, data, onWrite)
 	end
-	fs.open(
-		filename,
-		"a",
-		438, --[[ 0666 ]]
-		function(err, fd)
-			if err then
-				return callback(err)
-			end
-			write(fd, -1, data, callback)
+	fs.open(filename, "a", 438 --[[ 0666 ]], function(err, fd)
+		if err then
+			return callback(err)
 		end
-	)
+		write(fd, -1, data, callback)
+	end)
 end
 function fs.appendFileSync(path, data)
 	local written
diff --git ORI/luvit/tests/test-fs-chmod.lua ALT/luvit/tests/test-fs-chmod.lua
index 9225f05..109d247 100644
--- ORI/luvit/tests/test-fs-chmod.lua
+++ ALT/luvit/tests/test-fs-chmod.lua
@@ -44,10 +44,7 @@ require("tap")(function(test)
 		local file2 = Path.join(__dirname, "fixtures", "a1.lua")
 
 		local function maskMode(mode, mask)
-			return bit.band(
-				mode,
-				mask or 511 --[[tonumber('0777',8)]]
-			)
+			return bit.band(mode, mask or 511 --[[tonumber('0777',8)]])
 		end
 
 		fs.chmod(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants