Skip to content

Commit

Permalink
Update CHANGELOG.md and docs
Browse files Browse the repository at this point in the history
Mention the more modern global config path on Windows
(%LOCALAPPDATA%), mention macOS path.
  • Loading branch information
mpeterv committed May 8, 2017
1 parent d701454 commit 829e886
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
9 changes: 4 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@

* If project-specific `.luacheckrc` is not found, `luacheck` will now use
config from some global location if it is present there. Default global
location is
`%USERPROFILE%\Local Settings\Application Data\Luacheck\.luacheckrc`
on Windows and `$XDG_CONFIG_HOME/luacheck/.luacheckrc` or
`~/.config/luacheck/.luacheckrc` on other systems.
This behaviour can be tweaked with `--default-config` and
location is `%LOCALAPPDATA%\Luacheck\.luacheckrc` on Windows,
`~/Library/Application Support/Luacheck/.luacheckrc` on OS X/macOS, and
`$XDG_CONFIG_HOME/luacheck/.luacheckrc` or `~/.config/luacheck/.luacheckrc`
on other systems. This behaviour can be tweaked with `--default-config` and
`--no-default-config` options (#102).
* New `--[no-]max-code-line-length`, `--[no-]max-string-line-length`,
`--[no-]max-comment-line-length` CLI options and corresponding
Expand Down
7 changes: 5 additions & 2 deletions docsrc/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ Option Meaning
``--no-config`` Do not look up custom configuration file.
``--default-config <config>`` Default path to custom configuration file, to be used if ``--[no-]config`` is not used and ``.luacheckrc`` is not found.

Default value for this option is ``%USERPROFILE%\Local Settings\Application Data\Luacheck\.luacheckrc`` on Windows
and ``$XDG_CONFIG_HOME/luacheck/.luacheckrc`` or ``~/.config/luacheck/.luacheckrc`` on other systems.
Default global location is:

* ``%LOCALAPPDATA%\Luacheck\.luacheckrc`` on Windows;
* ``~/Library/Application Support/Luacheck/.luacheckrc`` on OS X/macOS;
* ``$XDG_CONFIG_HOME/luacheck/.luacheckrc`` or ``~/.config/luacheck/.luacheckrc`` on other systems.
``--no-default-config`` Do not use fallback configuration file.
``--filename <filename>`` Use another filename in output, for selecting
configuration overrides and for file filtering.
Expand Down
4 changes: 2 additions & 2 deletions docsrc/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Configuration file
``luacheck`` tries to load configuration from ``.luacheckrc`` file in the current directory. If not found, it will look for it in the parent directory and so on, going up until it reaches file system root. Path to config can be set using ``--config`` option, in which case it will be used during recursive loading. Config loading can be disabled using ``--no-config`` flag.

If neither of ``--config``, ``--no-config``, and ``--no-default-config`` options are used, ``luacheck`` will attempt to load configuration from value of ``--default-config`` option,
or ``%USERPROFILE%\Local Settings\Application Data\Luacheck\.luacheckrc`` on Windows and ``$XDG_CONFIG_HOME/luacheck/.luacheckrc`` or ``~/.config/luacheck/.luacheckrc``
on other systems by default.
or ``%LOCALAPPDATA%\Luacheck\.luacheckrc`` on Windows, ``~/Library/Application Support/Luacheck/.luacheckrc`` on OS X/macOS, and ``$XDG_CONFIG_HOME/luacheck/.luacheckrc``
or ``~/.config/luacheck/.luacheckrc`` on other systems by default.

Config is simply a Lua script executed by ``luacheck``. It may set various options by assigning to globals or by returning a table with option names as keys.

Expand Down

0 comments on commit 829e886

Please sign in to comment.