Conversation
tammela
reviewed
May 24, 2020
docs/HACKING.md
Outdated
| @@ -0,0 +1,192 @@ | |||
| CodeBase Workflow | |||
Contributor
There was a problem hiding this comment.
Suggested change
| CodeBase Workflow | |
| HACKING |
docs/HACKING.md
Outdated
| CodeBase Workflow | ||
| ======== | ||
|
|
||
| Report on the working of the code base. It contains the details of file execution and feature implementations in stages. |
Contributor
There was a problem hiding this comment.
Suggested change
| Report on the working of the code base. It contains the details of file execution and feature implementations in stages. | |
| This file contains the details of the program's execution in stages. |
docs/HACKING.md
Outdated
|
|
||
| Report on the working of the code base. It contains the details of file execution and feature implementations in stages. | ||
|
|
||
| ## First Stage: Command line execution |
Contributor
There was a problem hiding this comment.
Suggested change
| ## First Stage: Command line execution | |
| ## Arguments parsing and loading |
docs/HACKING.md
Outdated
|
|
||
| ## First Stage: Command line execution | ||
|
|
||
| * To format a file user use the command line: |
Contributor
There was a problem hiding this comment.
Suggested change
| * To format a file user use the command line: | |
| The user invokes the program as the following: |
docs/HACKING.md
Outdated
|
|
||
| * To format a file user use the command line: | ||
|
|
||
| * `lua-format {lua script} {options}` |
Contributor
There was a problem hiding this comment.
Suggested change
| * `lua-format {lua script} {options}` | |
| `lua-format [options] <scripts>` |
docs/HACKING.md
Outdated
|
|
||
| * Similarly, with rest option, In ‘config’ or ‘c’ option, `args::ValueFlag<string> cFile` | ||
|
|
||
| * This will read the argument and take the name value of the config file. |
Contributor
There was a problem hiding this comment.
Suggested change
| * This will read the argument and take the name value of the config file. |
docs/HACKING.md
Outdated
|
|
||
| * This will read the argument and take the name value of the config file. | ||
|
|
||
| * Now read the ConfiFileName by `args::get(cFile);` |
Contributor
There was a problem hiding this comment.
Suggested change
| * Now read the ConfiFileName by `args::get(cFile);` | |
| Now the program reads the configuration files. There are a couple of _known_ locations the program will check for configuration files, if **no** file is specified in the command line. | |
| In order of search: | |
| * Linux: `./.lua-format`, `$XDG_CONFIG_HOME/luaformatter/config.yaml`, `$HOME/.config/luaformatter/config.yaml` | |
| * Windows: `./.lua-format` | |
| * OSX: `./.lua-format` | |
docs/HACKING.md
Outdated
|
|
||
| * Now read the ConfiFileName by `args::get(cFile);` | ||
|
|
||
| * After that check whether to use default config or the configfile given by the user. |
Contributor
There was a problem hiding this comment.
Suggested change
| * After that check whether to use default config or the configfile given by the user. | |
| In case it doesn't find any suitable file it will fallback to the default values. | |
| The default values are hard coded in the program (`Config.cpp`) and are used as fallback whenever possible. For instance when fields are not specified in the user's configuration file. |
docs/HACKING.md
Outdated
|
|
||
| * After that check whether to use default config or the configfile given by the user. | ||
|
|
||
| * If the configfile name is empty then the default configuration will be enabled. |
Contributor
There was a problem hiding this comment.
Suggested change
| * If the configfile name is empty then the default configuration will be enabled. |
docs/HACKING.md
Outdated
|
|
||
| * If the configfile name is empty then the default configuration will be enabled. | ||
|
|
||
| * If the config file exists then all the configuration in the file is obtained and set the config value for the formatter. |
Contributor
There was a problem hiding this comment.
Suggested change
| * If the config file exists then all the configuration in the file is obtained and set the config value for the formatter. |
e1b64a1 to
3206636
Compare
5d65d04 to
bccbc58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It contains the report on how the codebase works to guide the other developers.