Skip to content

Commit

Permalink
chore(ci): fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Dec 5, 2023
1 parent be50bd1 commit b19fb52
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ And of course, any contribution are welcome!
To run tests in this git repo you need [**busted**](https://luarocks.org/modules/olivine-labs/busted) as well as some dependencies:

Prepare:

```sh
luarocks install busted
luarocks install luacov
Expand All @@ -54,6 +55,7 @@ luarocks install lualogging
```

Running the tests:

```sh
busted
```
Expand Down
10 changes: 5 additions & 5 deletions docs_topics/02-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ The dependencies differ slightly based on the environment you use, and the requi
* [**luasocket**](https://luarocks.org/modules/luasocket/luasocket) to establish TCP connections to the MQTT broker.
This is a listed dependency in the luamqtt rockspec, so it will automatically be installed if you use LuaRocks to
install luamqtt. To install it manually:
luarocks install luasocket
luarocks install luasocket

* [**copas**](https://github.com/keplerproject/copas) module for asynchoneous IO. Copas is an advanced co-routine
scheduler with far more features than the included `ioloop`. For anything more than a few devices, or for devices which
require network IO beyond mqtt alone, Copas is the better alternative. Copas is also pure-Lua, but has parallel network
IO (as opposed to sequential network IO in `ioloop`), and has features like; threads, timers, locks, semaphores, and
non-blocking clients for http(s), (s)ftp, and smtp.
luarocks install copas
luarocks install copas

* [**luasec**](https://github.com/brunoos/luasec) module for SSL/TLS based connections. This is optional and may be
skipped if you don't need secure network connections (e.g. broker is located in your local network). It's not listed
in package dependencies, please install it manually like this:
luarocks install luasec
luarocks install luasec

* [**LuaBitOp**](http://bitop.luajit.org/) library to perform bitwise operations, which is required only on
Lua 5.1. It's not listed in package dependencies, please install it manually like this:
luarocks install luabitop
luarocks install luabitop

* [**LuaLogging**](https://github.com/lunarmodules/lualogging/) to enable logging by the MQTT client. This is optional
but highly recommended for long running clients. This is a great debugging aid when developing your clients. Also when
using OpenResty as your runtime, you'll definitely want to use this, see
[openresty.lua](https://xhaskx.github.io/luamqtt/examples/openresty.lua.html) for an example.
It's not listed in package dependencies, please install it manually like this:
luarocks install lualogging
luarocks install lualogging
3 changes: 0 additions & 3 deletions docs_topics/05-connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ The main question is what event/io loop mechanism does your implementation have?

The main thing to look for when checking out the existing implementations is the network timeout settings,
and the returned `signals`.



2 changes: 1 addition & 1 deletion examples/openresty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ context.
In the timer we'll spawn a thread that will do the listening, and the
timer itself will go in an endless loop to do the keepalives.

**Caveats**
# Caveats

* Due to the socket limitation we cannot Publish anything from another
context. If you run into "bad request" errors on socket operations, you
Expand Down
4 changes: 2 additions & 2 deletions mqtt/protocol5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ local function parse_packet_unsuback(ptype, flags, input)
end

-- Parse PINGREQ packet, DOC: 3.12 PINGREQ – PING request
local function parse_packet_pingreq(ptype, flags, input_)
local function parse_packet_pingreq(ptype, flags, _)
-- DOC: 3.12.1 PINGREQ Fixed Header
if flags ~= 0 then -- Reserved
return false, packet_type[ptype]..": unexpected flags value: "..flags
Expand All @@ -1333,7 +1333,7 @@ local function parse_packet_pingreq(ptype, flags, input_)
end

-- Parse PINGRESP packet, DOC: 3.13 PINGRESP – PING response
local function parse_packet_pingresp(ptype, flags, input_)
local function parse_packet_pingresp(ptype, flags, _)
-- DOC: 3.13.1 PINGRESP Fixed Header
if flags ~= 0 then -- Reserved
return false, packet_type[ptype]..": unexpected flags value: "..flags
Expand Down

0 comments on commit b19fb52

Please sign in to comment.