You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add luacheck config and configuration for Travis CI (#2790)
* Move luacheck conf and fix Travis for all possible filenames
* Add lua script to help with luacheck config
* Add xargs approach for current luac.cross file checking
* Enable luacheck but do not break build
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+7
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,13 @@ Use the platform and tools you feel most comfortable with. There are no constrai
26
26
-[Full-fledged Linux environment](http://www.esp8266.com/wiki/doku.php?id=toolchain#how_to_setup_a_vm_to_host_your_toolchain), either physical or virtual.
27
27
-[Docker image](https://hub.docker.com/r/marcelstoer/nodemcu-build/) which allows running the build inside the container as if you were running a build script on your local machine.
28
28
29
+
## Writing Lua Code
30
+
A great resource about writing Lua for NodeMCU can be found in [Lua Developer FAQ](https://nodemcu.readthedocs.io/en/latest/lua-developer-faq/) - make sure to read it! When you're writing your Lua code and it's not working as it should you can test it with `luacheck` tool that can help you find various types of bugs. To install it you have to install [luarocks](https://luarocks.org/) and use command `sudo luarocks install luacheck` to install the tool. Now you're ready to go! By using this command (assuming you're in `nodemcu-firmware` directory):
31
+
32
+
`luacheck --config tools/luacheck_config.lua <your file to check>`
33
+
34
+
you can look for bugs and problems within the code!
35
+
29
36
## Writing Documentation
30
37
The NodeMCU documentation is maintained within the same repository as the code. The primary reason is to keep the two in sync more easily. It's thus trivial for the NodeMCU team to verify that a PR includes the necessary documentation. Furthermore, the documentation is merged automatically with the code if it moves from branch X to Y.
0 commit comments