diff --git a/docsrc/cli.rst b/docsrc/cli.rst index 6b5fd30d..b69be95b 100644 --- a/docsrc/cli.rst +++ b/docsrc/cli.rst @@ -5,7 +5,7 @@ Command line interface * Given a file, ``luacheck`` will check it. * Given ``-``, ``luacheck`` will check stdin. -* Given a directory, ``luacheck`` will check all files with ``.lua`` extension within it. This feature requires `LuaFileSystem `_ (installed automatically if LuaRocks was used to install Luacheck). +* Given a directory, ``luacheck`` will check all files within it, selecting only files with ``.lua`` extension unless ``--include-files`` option is used. This feature requires `LuaFileSystem `_ (installed automatically if LuaRocks was used to install Luacheck). * Given a rockspec (a file with ``.rockspec`` extension), ``luacheck`` will check all files with ``.lua`` extension mentioned in the rockspec in ``build.install.lua``, ``build.install.bin`` and ``build.modules`` tables. The output of ``luacheck`` consists of separate reports for each checked file and ends with a summary:: diff --git a/docsrc/inline.rst b/docsrc/inline.rst index b974a109..7063bf4a 100644 --- a/docsrc/inline.rst +++ b/docsrc/inline.rst @@ -49,8 +49,7 @@ For fine-grained control over inline option visibility use ``luacheck: push`` an .. code-block:: lua :linenos: - -- luacheck: push - -- luacheck: ignore foo + -- luacheck: push ignore foo foo() -- No warning. -- luacheck: pop foo() -- Warning is emitted. diff --git a/docsrc/warnings.rst b/docsrc/warnings.rst index 3db713bb..cd8758f7 100644 --- a/docsrc/warnings.rst +++ b/docsrc/warnings.rst @@ -43,6 +43,7 @@ Code Description 532 Left-hand side of an assignment is too long. 541 An empty ``do`` ``end`` block. 542 An empty ``if`` branch. +551 An empty statement. ==== ============================================= Global variables @@ -140,3 +141,4 @@ The following control flow and data flow issues are detected: * Unused labels; * Unbalanced assignments; * Empty blocks. +* Empty statements (semicolons without preceding statements).