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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #549 +/- ##
=======================================
Coverage 97.80% 97.81%
=======================================
Files 14 14
Lines 5431 5436 +5
=======================================
+ Hits 5312 5317 +5
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. |
This comment was marked as outdated.
This comment was marked as outdated.
Potential negative impact from this change... Need to rethink |
Closing this out as the change produces negative side effects. The original formatting is reasonable to remain, compared to the new formatting |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
…ont-expand-call-multiline-comment
Repo Comparison Testdiff --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(
|
Fixes #543
Fixes #561