-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
add luacheck to lint lua files #2205
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2205 +/- ##
=======================================
Coverage 36.85% 36.85%
=======================================
Files 70 70
Lines 4963 4963
=======================================
Hits 1829 1829
Misses 2855 2855
Partials 279 279 Continue to review full report at Codecov.
|
/assign @bowei |
rootfs/etc/nginx/lua/balancer.lua
Outdated
@@ -37,8 +37,8 @@ local function balance() | |||
|
|||
-- Round-Robin | |||
round_robin_lock:lock(backend_name .. ROUND_ROBIN_LOCK_KEY) | |||
local index = round_robin_state:get(backend_name) | |||
local index, endpoint = next(backend.endpoints, index) | |||
local shd_idx = round_robin_state:get(backend_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rather call this last_index
? That would be more descriptive IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
/approve |
@halfcrazy thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, halfcrazy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add script to verify if bindata is up to date. Add changes in kubernetes#2205 to bindata and reformat bindata file to the format that go-bindata generated.
Add script to verify if bindata is up to date. Add changes in #2205 to bindata and reformat bindata file to the format that go-bindata generated.
What this PR does / why we need it:
Add Lua lint tool luacheck as there are some lua codes for lua-nginx-module.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer: