port70
luacheck
port70 | luacheck | |
---|---|---|
3 | 14 | |
12 | 1,864 | |
- | - | |
2.6 | 0.0 | |
about 1 year ago | over 1 year ago | |
Lua | Lua | |
GNU General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
port70
-
A History of Lua
The first line tells luacheck that the variables `init` and `handler` are globals, and the second line tells it to ignore lines that contain just whitespace (a quirk the text editor I use uses to manage indenting levels).
[1] https://github.com/spc476/port70/blob/master/port70/handlers...
-
In defense of blocks for local scopes
The 'do' keyword introduces a new scope (and can be used anywhere to do so). I format it as the former to be more explicit about the CONF variable being defined by the following code block.
[1] https://github.com/spc476/port70/blob/master/port70.lua#L41
-
HTTP Status 418 – I'm a teapot
I added the 418 response code to my gopher server [1]. There was one web bot that constantly hit it and was clueless that it wasn't a web server. It finally got a clue.
[1] https://github.com/spc476/port70
luacheck
-
strict.lua
Not directly related, but luacheck can also help with this.
-
Lua is eye candy
Yeah. While you're at it, make a habit of running luacheck on your files as it helps catch a lot of these issues that can sneak in by mistake: https://github.com/mpeterv/luacheck
-
Help me reload my lua config! :)
Using something like https://github.com/mpeterv/luacheck might be helpful too. Will check all the files in a directory and will let you know which one might be problematic.
-
Lsp: Execute callback after server initialized
I'm trying to setup luacheck (via null-ls) to run alongside sumneko-lua (via nvim-lspconfig).
-
A History of Lua
Most of the time nothing is used. The thing is that iterating is so quick, that you find the problems really fast.
Although, I've been using luacheck https://github.com/mpeterv/luacheck. It is quite nice, but you have to write down the global variables by hand on the config file.
-
Writing a neovim plugin. Please send criticisms to make the code better
Check out luacheck. It can help spot typos or mistakes you've made and warn against anti-patterns. I'd honestly only look into setting it up locally because there's no benefit to putting it in a CI pipeline unless you have one for another reason IMO. This should be all the config you need:
- Modding Help - Error Diagnosis
-
GitHub Successors
Sadly the scenario that the successor feature is intended to alleviate has very much become reality. The creator of Luacheck (Peter Melnichenko) passed away a couple of years ago, and ever since then the GitHub repository has been in a state of limbo. Multiple unofficial forks have come and gone, but Peter's is still the first result on Google if you search "luacheck". It isn't even possible to change the README or pin an issue to get people's attention about the fork; to this day people are still posting issues to the old repo.
And Luacheck is "the" Lua static analysis tool that pretty much everyone uses, so it's a very significant issue.
https://github.com/mpeterv/luacheck/issues/198
-
Kind of define in lua
You are probably right, but luacheck is well aware of which global variables are built-in and it has special comments, such as -- no global or --ignore in case you very want to overwrite them.
-
Is it ok to name a function for example "function self:Example() end" or is it a big mistake? And how to find (directory) location of a function?
Calling your function self is as much bad practice as calling it print. Use luacheck to avoid such mistakes.
What are some alternatives?
LjTools - LuaJIT 2.0 bytecode parser, viewer, assembler and test VM. Lua 5.1 parser, IDE and debugger.
lua-language-server - A language server that offers Lua language support - programmed in Lua
lua-enumerable - A port of ruby's Enumerable module to Lua
StyLua - An opinionated Lua code formatter
nvim-oxi - :link: Rust bindings to all things Neovim
LuaFormatter - Code formatter for Lua
tl - The compiler for Teal, a typed dialect of Lua
luau - A fast, small, safe, gradually typed embeddable scripting language derived from Lua
Prosody IM - IMPORTANT: due to a drive failure, as of 13-Mar-2021, the Mercurial repository had to be re-mirrored, which changed every commit SHA. The old SHAs and trees are backed up in the vault branches. Please migrate to the new branches as soon as you can.
NvChad - Blazing fast Neovim config providing solid defaults and a beautiful UI, enhancing your neovim experience.
love - LÖVE is an awesome 2D game framework for Lua.