## DEBUGGER OPTIONS
### `-d`
-Launches the target program with the debugger attached to it
+Launches the target program with the debugger attached to it.
### `-c`
-Launches the target program with the interpreter, such as when the program fails, the debugging prompt is summoned
+Launches the target program with the interpreter, such as when the program fails, the debugging prompt is summoned.
### `--socket`
-Launches the target program with raw output on the network via sockets
+Launches the target program with raw output on the network via sockets.
### `--websocket`
-Launches the target program with output on the network via websockets
+Launches the target program with output on the network via websockets.
### `--port`
-Sets the debug port (Defaults to 22125) - Must be contained between 0 and 65535
+Sets the debug port (Defaults to 22125) - Must be contained between 0 and 65535.
## OTHER OPTIONS
### `--vm`
-Run the virtual machine instead of the naive interpreter (experimental)
+Run the virtual machine instead of the naive interpreter (experimental).
The virtual machine is currently under heavy development and, unless you are developing the vm, there is no reason to use this option yet.
# OPTIONS
### `--host`
-Sets the host to debug from, use IPV4 only. (Defaults to 127.0.0.1).
+Sets the host to debug from, use IPV4 only (Defaults to 127.0.0.1).
### `--port`
Sets the debug port (Defaults to 22125).
-Must be contained between 0 and 65535
+Must be contained between 0 and 65535.
# SEE ALSO
# OPTIONS
### `-d`, `--dir`
-output directory.
+Output directory.
Where the HTML files are generated.
Here, the `git rev-parse HEAD` is used to link to the current snapshot revision of the file.
-### `--no-attribute`
+### `--no-attributes`
Ignore the attributes.
Note: In Nit, attributes are private. Therefore, this option is only useful
when combined with `--private`.
### `--no-dot`
-do not generate graphs with graphviz.
+Do not generate graphs with graphviz.
### `--private`
-also generate private API.
+Also generate private API.
## CUSTOMIZATION
### `--sharedir`
-directory containing nitdoc assets.
+Directory containing nitdoc assets.
By default `$NIT_DIR/share/nitdoc/` is used.
### `--shareurl`
-use shareurl instead of copy shared files.
+Use shareurl instead of copy shared files.
By default, assets from the sharedir a copied into the output directory and referred with a relative path in the generated files.
With this option, the assets are not copied and the given URL of path is used in the generated files to locate assets.
### `--custom-title`
-custom title for homepage.
+Custom title for homepage.
### `--custom-footer-text`
-custom footer text.
+Custom footer text.
### `--custom-overview-text`
-custom intro text for homepage
+Custom intro text for homepage.
### `--custom-brand`
-custom link to external site
+Custom link to external site.
## SERVICES
### `--github-upstream`
-Git branch where edited commits will be pulled into (ex: user:repo:branch)
+Git branch where edited commits will be pulled into (ex: user:repo:branch).
### `--github-base-sha1`
-Git sha1 of base commit used to create pull request
+Git sha1 of base commit used to create pull request.
### `--github-gitdir`
-Git working directory used to resolve path name (ex: /home/me/myproject/)
+Git working directory used to resolve path name (ex: /home/me/myproject/).
### `--piwik-tracker`
-Piwik tracker URL (ex: `"nitlanguage.org/piwik/"`)
+Piwik tracker URL (ex: `nitlanguage.org/piwik/`).
### `--piwik-site-id`
-Piwik site ID
+Piwik site ID.
## TESTING
The generated HTML will only contains lines bellow the specified one.
### `--last-line`
-End the source file at this line (default: to the end)
+End the source file at this line (default: to the end).
The generated HTML will only contains lines above the specified one.
All `.nit` files found in the specified directory and subdirectories are considered.
### `-d`, `--depends`
-List dependencies of given modules
+List dependencies of given modules.
All imported modules are also considered.
## METRICS
### `--all`
-Compute all metrics
+Compute all metrics.
### `--mmodules`
-Compute metrics about mmodules
+Compute metrics about mmodules.
### `--mclasses`
-Compute metrics about mclasses
+Compute metrics about mclasses.
### `--mendel`
-Compute mendel metrics
+Compute mendel metrics.
### `--inheritance`
-Compute metrics about inheritance usage
+Compute metrics about inheritance usage.
### `--refinement`
-Compute metrics about refinement usage
+Compute metrics about refinement usage.
### `--self`
-Compute metrics about the usage of explicit and implicit self
+Compute metrics about the usage of explicit and implicit self.
### `--ast`
-Compute metrics about the usage of nodes and identifiers in the AST
+Compute metrics about the usage of nodes and identifiers in the AST.
### `--nullables`
-Compute metrics on nullables send
+Compute metrics on nullables send.
### `--static-types`
-Compute explicit static types metrics
+Compute explicit static types metrics.
### `--tables`
-Compute tables metrics
+Compute tables metrics.
### `--rta`
-Compute RTA metrics
+Compute RTA metrics.
### `--generate_hyperdoc`
-Generate Hyperdoc
+Generate Hyperdoc.
### `--poset`
-Complete metrics on posets
+Complete metrics on posets.
### `--detect-variance-constraints`
-Detects the definition-site variance constraints on formal parameters.
+Detect the definition-site variance constraints on formal parameters.
Infers the possible variance annotations of formal types in Nit programs by identifying the existing constraints on the usage of those formal type.
# OPTIONS
### `--dir`
-Working directory (default is '.nitpretty')
+Working directory (default is '.nitpretty').
### `-o`, `--output`
-Output name (default is pretty.nit)
+Output name (default is pretty.nit).
### `--diff`
-Show diff between source and output
+Show diff between source and output.
### `--meld`
-Show diff between source and output using meld
+Show diff between source and output using meld.
### `--check`
-Check format of Nit source files
+Check format of Nit source files.
This option creates a temporary pretty printed file then checks if the output
of the diff command on the source file and the pretty printed one is empty.
### `--break-strings`
-Break too long string literals
+Break too long string literals.
### `--inline-do`
-Force do keyword on the same line as the method signature
+Force do keyword on the same line as the method signature.
### `--skip-empty`
-Force formatting of empty lines
+Force formatting of empty lines.
By default empty lines are kept as they were typed in the file.
When enabling this option, `nitpretty` will decide where to break lines and
# OPTIONS
### `-o`, `--output`
-Output file (can also be 'stdout')
+Output file (can also be 'stdout').
### `--dir`
-Output directory
+Output directory.
### `-d`, `--depth`
Depth of the visit and generation <module, group, package>.
With the `--full` option, all imported modules (even those in standard) are also precessed.
### `-o`, `--output`
-Output name (default is 'nitunit.xml')
+Output name (default is 'nitunit.xml').
### `nitunit` produces a XML file comatible with JUnit.
### `--dir`
-Working directory (default is '.nitunit')
+Working directory (default is '.nitunit').
In order to execute the tests, nit files are generated then compiled and executed in the giver working directory.
Does not compile and run tests.
### `-p`, `--pattern`
-Only run test case with name that match pattern. Examples: `TestFoo`, `TestFoo*`, `TestFoo::test_foo`, `TestFoo::test_foo*`, `test_foo`, `test_foo*`
+Only run test case with name that match pattern.
+
+Examples: `TestFoo`, `TestFoo*`, `TestFoo::test_foo`, `TestFoo::test_foo*`, `test_foo`, `test_foo*`
### `-t`, `--target-file`
Specify test suite location.
## SUITE GENERATION
### `--gen-suite`
-Generate test suite skeleton for a module
+Generate test suite skeleton for a module.
### `-f`, `--force`
Force test generation even if file exists.
# OPTIONS
-### `-q`
-execute a query, display results in console then quit.
+### `-q`, `--query`
+Nitx query to perform.
+
+Execute a query, display results in the console, then quit.
### `--no-attributes`
Ignore the attributes.
redef class ToolContext
# Directory where the Nitdoc is rendered.
- var opt_dir = new OptionString("output directory", "-d", "--dir")
+ var opt_dir = new OptionString("Output directory", "-d", "--dir")
# Shortcut for `opt_dir.value` with default "doc".
var output_dir: String is lazy do return opt_dir.value or else "doc"
redef class ToolContext
# Do not generate documentation for attributes.
- var opt_no_attributes = new OptionBool("ignore the attributes", "--no-attributes")
+ var opt_no_attributes = new OptionBool("Ignore the attributes", "--no-attributes")
# Do not generate documentation for private properties.
- var opt_private = new OptionBool("also generate private API", "--private")
+ var opt_private = new OptionBool("Also generate private API", "--private")
redef init do
super
redef class ToolContext
# Do not generate `graphviz` diagrams.
- var opt_nodot = new OptionBool("do not generate graphes with graphviz", "--no-dot")
+ var opt_nodot = new OptionBool("Do not generate graphs with graphviz", "--no-dot")
redef init do
super
redef class ToolContext
# File pattern used to link documentation to source code.
- var opt_source = new OptionString("link for source (%f for filename, " +
+ var opt_source = new OptionString("Format to link source code (%f for filename, " +
"%l for first line, %L for last line)", "--source")
# Directory where the CSS and JS is stored.
- var opt_sharedir = new OptionString("directory containing nitdoc assets", "--sharedir")
+ var opt_sharedir = new OptionString("Directory containing nitdoc assets", "--sharedir")
# Use a shareurl instead of copy shared files.
#
# This is usefull if you don't want to store the Nitdoc templates with your
# documentation.
- var opt_shareurl = new OptionString("use shareurl instead of copy shared files", "--shareurl")
+ var opt_shareurl = new OptionString("Use shareurl instead of copy shared files", "--shareurl")
# Use a custom title for the homepage.
- var opt_custom_title = new OptionString("custom title for homepage", "--custom-title")
+ var opt_custom_title = new OptionString("Custom title for homepage", "--custom-title")
# Display a custom brand or logo in the documentation top menu.
- var opt_custom_brand = new OptionString("custom link to external site", "--custom-brand")
+ var opt_custom_brand = new OptionString("Custom link to external site", "--custom-brand")
# Display a custom introduction text before the packages overview.
- var opt_custom_intro = new OptionString("custom intro text for homepage", "--custom-overview-text")
+ var opt_custom_intro = new OptionString("Custom intro text for homepage", "--custom-overview-text")
# Display a custom footer on each documentation page.
#
# Generally used to display the documentation or product version.
- var opt_custom_footer = new OptionString("custom footer text", "--custom-footer-text")
+ var opt_custom_footer = new OptionString("Custom footer text", "--custom-footer-text")
# Piwik tracker URL.
#
# If you want to monitor your visitors.
- var opt_piwik_tracker = new OptionString("Piwik tracker URL (ex: nitlanguage.org/piwik/)", "--piwik-tracker")
+ var opt_piwik_tracker = new OptionString("Piwik tracker URL (ex: `nitlanguage.org/piwik/`)", "--piwik-tracker")
# Piwik tracker site id.
var opt_piwik_site_id = new OptionString("Piwik site ID", "--piwik-site-id")
redef class ToolContext
# --discover-call-trace
- var opt_discover_call_trace = new OptionBool("Trace calls of the first invocation of a method", "--discover-call-trace")
+ var opt_discover_call_trace = new OptionBool("Trace calls of the first invocation of methods", "--discover-call-trace")
redef init
do
# --rta
var opt_rta = new OptionBool("Compute RTA metrics", "--rta")
# --generate-csv
- var opt_csv = new OptionBool("Export metrics in CSV format", "--csv")
+ var opt_csv = new OptionBool("Also export metrics in CSV format", "--csv")
# --generate_hyperdoc
var opt_generate_hyperdoc = new OptionBool("Generate Hyperdoc", "--generate_hyperdoc")
# --poset
var toolcontext = new ToolContext
toolcontext.option_context.options_before_rest = true
toolcontext.tooldescription = "Usage: nit [OPTION]... <file.nit>...\nInterprets and debugs Nit programs."
-# Add an option "-o" to enable compatibilit with the tests.sh script
-var opt = new OptionString("compatibility (does noting)", "-o")
+# Add an option "-o" to enable compatibility with the tests.sh script
+var opt = new OptionString("Does nothing. Used for compatibility.", "-o")
+opt.hidden = true
toolcontext.option_context.add_option(opt)
var opt_eval = new OptionBool("Specifies the program from command-line", "-e")
var opt_loop = new OptionBool("Repeatedly run the program for each line in file-name arguments", "-n")
redef class ToolContext
var opt_host_address: OptionString = new OptionString("Sets the host to debug from, use IPV4 only (Defaults to 127.0.0.1)", "--host")
- var opt_debug_port: OptionInt = new OptionInt("Sets the debug port (Defaults to 22125) - Must be contained between 0 and 65535", 22125, "--port")
+ var opt_debug_port: OptionInt = new OptionInt("Sets the debug port (Defaults to 22125)", 22125, "--port")
redef init
do
toolcontext.keep_going = true
var opt_fragment = new OptionBool("Omit document header and footer", "-f", "--fragment")
-var opt_line_id_prefix = new OptionString("Prefix of the id of each line <span> element", "--line-id-prefix")
+var opt_line_id_prefix = new OptionString("Prefix of the id of each line `<span>` element", "--line-id-prefix")
var opt_first_line = new OptionInt("Start the source file at this line (default: 1)", 0, "--first-line")
var opt_last_line = new OptionInt("End the source file at this line (default: to the end)", 0, "--last-line")
var opt_dir = new OptionString("Output html files in a specific directory (required if more than one module)", "-d", "--dir")
var tc = new ToolContext
var opt_keep = new OptionBool("Ignore errors and files that are not a Nit source file", "-k", "--keep")
-var opt_recursive = new OptionBool("Process directories recussively", "-r", "--recursive")
+var opt_recursive = new OptionBool("Process directories recursively", "-r", "--recursive")
var opt_tree = new OptionBool("List source files in their groups and packages", "-t", "--tree")
-var opt_source = new OptionBool("List source files", "-s", "--source")
-var opt_package = new OptionBool("List packages paths (default)", "-P", "--package")
+var opt_source = new OptionBool("List source files in a flat list", "-s", "--source")
+var opt_package = new OptionBool("List packages in a flat list (default)", "-P", "--package")
var opt_depends = new OptionBool("List dependencies of given modules", "-d", "--depends")
-var opt_make = new OptionBool("List dependencies suitable for a rule in a Makefile. Alias for -d, -p and -s", "-M")
+var opt_make = new OptionBool("List dependencies suitable for a rule in a Makefile (alias for -d, -p and -s)", "-M")
var opt_paths = new OptionBool("List only path (instead of name + path)", "-p", "--path-only")
tc.option_context.add_option(opt_keep, opt_recursive, opt_tree, opt_source, opt_package, opt_depends, opt_paths, opt_make)
var opt_gen_unit = new OptionBool("Generate test suite skeleton for a module", "--gen-suite")
var opt_gen_force = new OptionBool("Force test generation even if file exists", "-f", "--force")
var opt_gen_private = new OptionBool("Also generate test case for private methods", "--private")
- var opt_gen_show = new OptionBool("Only display skeleton, do not write file", "--only-show")
+ var opt_gen_show = new OptionBool("Only display the skeleton, do not write any file", "--only-show")
end
redef class ToolContext
# -- target-file
- var opt_file = new OptionString("Specify test suite location.", "-t", "--target-file")
+ var opt_file = new OptionString("Specify test suite location", "-t", "--target-file")
# --pattern
- var opt_pattern = new OptionString("Only run test case with name that match pattern. Examples: 'TestFoo', 'TestFoo*', 'TestFoo::test_foo', 'TestFoo::test_foo*', 'test_foo', 'test_foo*'", "-p", "--pattern")
+ var opt_pattern = new OptionString("Only run test case with name that match pattern", "-p", "--pattern")
end
# Used to test nitunit test files.