nitc :: ToolContext
nitc :: ToolContext :: _accept_no_arguments
Doesprocess_options
should accept an empty sequence of arguments.
nitc :: ToolContext :: _auto_super_init_phase
Phase that injectsuper
in constructors that need it.
nitc :: ToolContext :: _autocomplete_phase
Phase generating the files for the Vim pluginnitc :: ToolContext :: _cflags_phase
Phase to findcflags
, ldflags
and cppflags
nitc :: ToolContext :: _check_annotation_phase
Check for unknown annotation in each modulenitc :: ToolContext :: _contracts_phase
Parses contracts annotations.nitc :: ToolContext :: _default_phase
nitc :: ToolContext :: _detect_covariance_phase
Phase that intercepts static type tests then display statistics about covariancenitc :: ToolContext :: _detect_variance_constraints_phase
The DetectVarianceConstraints phasenitc :: ToolContext :: _div_by_zero_phase
Instantiate a new specific phasediv_by_zero_phase
nitc :: ToolContext :: _dummy
FIXME: there is conflict in linex in nitc, so use this trick to force invocationnitc :: ToolContext :: _explain_assert_phase
Phase modifying the AST to explain assets when they failnitc :: ToolContext :: _ffi_language_assignation_phase
Phase that assign aFFILanguage
to all AExternCodeBlock
nitc :: ToolContext :: _flow_phase
RunAPropdef::do_flow
on each propdef
nitc :: ToolContext :: _glsl_validation_phase
Shader code validation phasenitc :: ToolContext :: _inheritance_metrics_phase
Inheritance related metrics phasenitc :: ToolContext :: _keep_going
Does an error prevent the program to stop atcheck_errors
?
nitc :: ToolContext :: _literal_phase
Parses literal values in the whole AST and produces errors if needednitc :: ToolContext :: _local_var_init_phase
RunAPropdef::do_local_var_init
on each propdef
nitc :: ToolContext :: _log_directory
Directory where to generate log filesnitc :: ToolContext :: _log_info
Stream inlog_directory
where all info messages are written
nitc :: ToolContext :: _mclasses_metrics_phase
MClass related metrics phasenitc :: ToolContext :: _mendel_metrics_phase
Compute MENDEL metrics.nitc :: ToolContext :: _message_sorter
nitc :: ToolContext :: _mmodules_metrics_phase
MModules related metrics phasenitc :: ToolContext :: _mmodules_to_check
Modules to analyze, other modules will only get a shallow processing.nitc :: ToolContext :: _modelize_class_phase
RunAModule::build_classes
on each module
nitc :: ToolContext :: _modelize_property_phase
RunAClassdef::build_property
on the classdefs of each module
nitc :: ToolContext :: _nit_dir
The identified root directory of the Nit packagenitc :: ToolContext :: _no_warning_phase
The phase should be executed before any warning on the module is processed.nitc :: ToolContext :: _nullables_metrics_phase
Nullable types related metricsnitc :: ToolContext :: _opt_a
nitc :: ToolContext :: _opt_ant
Compile using ant instead of make (faster, but no error display)nitc :: ToolContext :: _opt_b
nitc :: ToolContext :: _opt_bash_completion
Option --bash-completionnitc :: ToolContext :: _opt_break_str
Break too long string literals.nitc :: ToolContext :: _opt_c
nitc :: ToolContext :: _opt_catalog
Compute and use the catalognitc :: ToolContext :: _opt_check
Check formatting instead of pretty printing.nitc :: ToolContext :: _opt_check_makefile
--check-makefilenitc :: ToolContext :: _opt_colo_dead_methods
--no-colo-dead-methodsnitc :: ToolContext :: _opt_colors_are_symbols
--colors-are-symbolsnitc :: ToolContext :: _opt_command
Used to shortcut the prompt and display directly the result in console.nitc :: ToolContext :: _opt_compile_dir
Where to output tmp filesnitc :: ToolContext :: _opt_custom_brand
Display a custom brand or logo in the documentation top menunitc :: ToolContext :: _opt_custom_intro
Display a custom introduction text before the packages overviewnitc :: ToolContext :: _opt_custom_title
Use a custom title for the homepagenitc :: ToolContext :: _opt_depth
Depth of the visit and generationnitc :: ToolContext :: _opt_detect_covariance
--detect-variance-constraintsnitc :: ToolContext :: _opt_detect_variance_constraints
--detect-variance-constraintsnitc :: ToolContext :: _opt_diff
Show diff between source and pretty printed code.nitc :: ToolContext :: _opt_dir
The working directory used to store temp files.nitc :: ToolContext :: _opt_dir
Directory where the Nitdoc is renderednitc :: ToolContext :: _opt_direct_call_monomorph
--direct-call-monomorphnitc :: ToolContext :: _opt_direct_call_monomorph0
--direct-call-monomorph0nitc :: ToolContext :: _opt_disable_phase
--disable-phasenitc :: ToolContext :: _opt_discover_call_trace
--discover-call-tracenitc :: ToolContext :: _opt_full_contract
Option --full-contractnitc :: ToolContext :: _opt_full_name
nitc :: ToolContext :: _opt_gen_force
nitc :: ToolContext :: _opt_gen_private
nitc :: ToolContext :: _opt_gen_show
nitc :: ToolContext :: _opt_gen_unit
nitc :: ToolContext :: _opt_generate_hyperdoc
--generate_hyperdocnitc :: ToolContext :: _opt_group_c_files
--group-c-filesnitc :: ToolContext :: _opt_host
Host name to bind on (will overwrite the config one).nitc :: ToolContext :: _opt_ignore_visibility
Option --ignore-visibilitynitc :: ToolContext :: _opt_inline_coloring_numbers
--inline-coloring-numbersnitc :: ToolContext :: _opt_inline_do
Forcedo
on the same line as the method signature.
nitc :: ToolContext :: _opt_inline_some_methods
--inline-some-methodsnitc :: ToolContext :: _opt_invocation_metrics
--invocation-metricsnitc :: ToolContext :: _opt_isset_checks_metrics
--isset-checks-metricsnitc :: ToolContext :: _opt_long_method_threshold
--move-genericsnitc :: ToolContext :: _opt_long_params_threshold
--long-method-thresholdnitc :: ToolContext :: _opt_meld
Show diff between source and pretty printed code using meld.nitc :: ToolContext :: _opt_move_generics
--move-genericsnitc :: ToolContext :: _opt_name
nitc :: ToolContext :: _opt_name_prefix
nitc :: ToolContext :: _opt_no_abstract_implementation
--no-abstract-implementationnitc :: ToolContext :: _opt_no_attributes
Do not generate documentation for attributesnitc :: ToolContext :: _opt_no_check_assert
--no-check-assertnitc :: ToolContext :: _opt_no_check_attr_isset
--no-check-attr-issetnitc :: ToolContext :: _opt_no_check_autocast
--no-check-autocastnitc :: ToolContext :: _opt_no_check_covariance
--no-check-covariancenitc :: ToolContext :: _opt_no_check_erasure_cast
--no-check-erasure-castnitc :: ToolContext :: _opt_no_check_null
--no-check-nullnitc :: ToolContext :: _opt_no_contract
Option --no-contractnitc :: ToolContext :: _opt_no_gcc_directive
--no-gcc-directivesnitc :: ToolContext :: _opt_no_inline_intern
--no-inline-internnitc :: ToolContext :: _opt_no_shortcut_equate
--no-shortcut-equatenitc :: ToolContext :: _opt_no_shortcut_range
--no-shortcut-rangenitc :: ToolContext :: _opt_no_stacktrace
--no-stacktracenitc :: ToolContext :: _opt_no_tag_primitives
--no-tag-primitivesnitc :: ToolContext :: _opt_no_union_attribute
--no-union-attributenitc :: ToolContext :: _opt_nocode
Do not include highlighted codenitc :: ToolContext :: _opt_nodot
Do not generate dot/graphviz diagramsnitc :: ToolContext :: _opt_only_metamodel
Option --only-metamodelnitc :: ToolContext :: _opt_output
Where to output the generated binarynitc :: ToolContext :: _opt_output
Output pretty printed code with this filename.nitc :: ToolContext :: _opt_output
Where do we put a single result?nitc :: ToolContext :: _opt_output
Where do we put a single result?nitc :: ToolContext :: _opt_piwik_site_id
Piwik tracker site idnitc :: ToolContext :: _opt_piwik_tracker
Piwik tracker URLnitc :: ToolContext :: _opt_port
Port number to bind on (will overwrite the config one).nitc :: ToolContext :: _opt_private
Do not generate documentation for private propertiesnitc :: ToolContext :: _opt_query
nitc :: ToolContext :: _opt_set_dummy_tool
Option --set-dummy-toolnitc :: ToolContext :: _opt_skip_dead_methods
--skip-dead-methodsnitc :: ToolContext :: _opt_skip_empty
Force formatting on empty lines.nitc :: ToolContext :: _opt_source
File pattern used to link documentation to source code.nitc :: ToolContext :: _opt_stop_on_first_error
Option --stop-on-first-errornitc :: ToolContext :: _opt_substitute_monomorph
--substitute-monomorphnitc :: ToolContext :: _opt_tables_metrics
--tables-metricsnitc :: ToolContext :: _opt_trampoline_call
--trampoline-callnitc :: ToolContext :: _opt_typing_test_metrics
--typing-test-metricsnitc :: ToolContext :: _opt_vim_autocomplete
Shall we generate the files for the Vim plugin?nitc :: ToolContext :: _option_context
Global OptionContextnitc :: ToolContext :: _output_dir
Output directory for metrics files.nitc :: ToolContext :: _parallelization_phase
Transforms a function annotated with "threaded"nitc :: ToolContext :: _parse_annotations_phase
Parse the annotations on modules, classdefs and propdefsnitc :: ToolContext :: _phased_modules
Set of already analyzed modules.nitc :: ToolContext :: _phases_list
The list of registered phases in the application order.nitc :: ToolContext :: _pkgconfig_is_available
Is the external programpkg-config
available?
nitc :: ToolContext :: _pkgconfig_phase
Detects thepkgconfig
annotation on the module declaration only
nitc :: ToolContext :: _platform_phase
Detects theplatform
annotation to set a mobile target platform
nitc :: ToolContext :: _readme_metrics_phase
README related metrics phasenitc :: ToolContext :: _regex_phase
Phase checking for errors in regexnitc :: ToolContext :: _restful_phase
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: _rta_metrics_phase
RTA related metrics phasenitc :: ToolContext :: _scope_phase
RunAPropdef::do_scope
on each propdef.
nitc :: ToolContext :: _semantize_is_lazy
Isphase_process_npropdef
not called automatically by run_phases
?
nitc :: ToolContext :: _serialization_phase_post_model
The second phase of the serializationnitc :: ToolContext :: _serialization_phase_pre_model
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: _serialization_phase_rename
Apply the annotationserialize_as
nitc :: ToolContext :: _simple_misc_analysis_phase
ExecuteAModule::do_simple_misc_analysis
on each module.
nitc :: ToolContext :: _todo_nmodules
List of module to process according torun_phases
nitc :: ToolContext :: _tooldescription
Name, usage and synopsis of the tool.nitc :: ToolContext :: _transform_phase
nitc :: ToolContext :: _typing_phase
nitc :: ToolContext :: _ulimit_file
The maximum size (in KB) of files written by a command executed troughsafe_exec
nitc :: ToolContext :: _ulimit_usertime
The maximum amount of cpu time (in seconds) for a command executed troughsafe_exec
nitc :: ToolContext :: _umlphase
Phase that generates UML diagrams from model entities.nitc :: ToolContext :: _warning_blacklist
List of tags per source-file whose warnings are not displayed.nitc :: ToolContext :: accept_no_arguments
Doesprocess_options
should accept an empty sequence of arguments.
nitc :: ToolContext :: accept_no_arguments=
Doesprocess_options
should accept an empty sequence of arguments.
nitc :: ToolContext :: ast_metrics_phase
nitc :: ToolContext :: auto_super_init_phase
Phase that injectsuper
in constructors that need it.
nitc :: ToolContext :: auto_super_init_phase=
Phase that injectsuper
in constructors that need it.
nitc :: ToolContext :: autocomplete_phase
Phase generating the files for the Vim pluginnitc :: ToolContext :: autocomplete_phase=
Phase generating the files for the Vim pluginnitc :: ToolContext :: cflags_phase
Phase to findcflags
, ldflags
and cppflags
nitc :: ToolContext :: cflags_phase=
Phase to findcflags
, ldflags
and cppflags
nitc :: ToolContext :: check_annotation_phase
Check for unknown annotation in each modulenitc :: ToolContext :: check_annotation_phase=
Check for unknown annotation in each modulenitc :: ToolContext :: check_nit_dir
nitc :: ToolContext :: check_pkgconfig_packages
Check if thepackages
are known by the external program pkg-config
nitc :: ToolContext :: clear_progress_bar
Clear the line ifhas_progress_bar
(no-op else)
nitc :: ToolContext :: contracts_phase=
Parses contracts annotations.nitc :: ToolContext :: default_phase
nitc :: ToolContext :: default_phase=
nitc :: ToolContext :: defaultinit
nitc :: ToolContext :: deriving_phase=
Main phase ofderiving
nitc :: ToolContext :: detect_covariance_phase
Phase that intercepts static type tests then display statistics about covariancenitc :: ToolContext :: detect_covariance_phase=
Phase that intercepts static type tests then display statistics about covariancenitc :: ToolContext :: detect_variance_constraints_phase
The DetectVarianceConstraints phasenitc :: ToolContext :: detect_variance_constraints_phase=
The DetectVarianceConstraints phasenitc :: ToolContext :: div_by_zero_phase
Instantiate a new specific phasediv_by_zero_phase
nitc :: ToolContext :: div_by_zero_phase=
Instantiate a new specific phasediv_by_zero_phase
nitc :: ToolContext :: dummy
FIXME: there is conflict in linex in nitc, so use this trick to force invocationnitc :: ToolContext :: dummy=
FIXME: there is conflict in linex in nitc, so use this trick to force invocationnitc :: ToolContext :: exec_and_check
 Executes a program while checking if it's available and if the execution ended correctlynitc :: ToolContext :: explain_assert_phase
Phase modifying the AST to explain assets when they failnitc :: ToolContext :: explain_assert_phase=
Phase modifying the AST to explain assets when they failnitc :: ToolContext :: fatal_error
Add an error, show errors and quitnitc :: ToolContext :: ffi_language_assignation_phase
Phase that assign aFFILanguage
to all AExternCodeBlock
nitc :: ToolContext :: ffi_language_assignation_phase=
Phase that assign aFFILanguage
to all AExternCodeBlock
nitc :: ToolContext :: flow_phase=
RunAPropdef::do_flow
on each propdef
nitc :: ToolContext :: glsl_validation_phase
Shader code validation phasenitc :: ToolContext :: glsl_validation_phase=
Shader code validation phasenitc :: ToolContext :: inheritance_metrics_phase
Inheritance related metrics phasenitc :: ToolContext :: inheritance_metrics_phase=
Inheritance related metrics phasenitc :: ToolContext :: interactive_parse
Parse the input of the user as somethingnitc :: ToolContext :: is_warning_blacklisted
Is the source-file ofl
associated with tag
in warning_blacklist
?
nitc :: ToolContext :: keep_going
Does an error prevent the program to stop atcheck_errors
?
nitc :: ToolContext :: keep_going=
Does an error prevent the program to stop atcheck_errors
?
nitc :: ToolContext :: literal_phase
Parses literal values in the whole AST and produces errors if needednitc :: ToolContext :: literal_phase=
Parses literal values in the whole AST and produces errors if needednitc :: ToolContext :: local_var_init_phase
RunAPropdef::do_local_var_init
on each propdef
nitc :: ToolContext :: local_var_init_phase=
RunAPropdef::do_local_var_init
on each propdef
nitc :: ToolContext :: localize_phase=
Main phase oflanguage
nitc :: ToolContext :: log_directory
Directory where to generate log filesnitc :: ToolContext :: log_directory=
Directory where to generate log filesnitc :: ToolContext :: log_info
Stream inlog_directory
where all info messages are written
nitc :: ToolContext :: log_info=
Stream inlog_directory
where all info messages are written
nitc :: ToolContext :: make_main_module
Combine module to make a single one if required.nitc :: ToolContext :: mclasses_metrics_phase
MClass related metrics phasenitc :: ToolContext :: mclasses_metrics_phase=
MClass related metrics phasenitc :: ToolContext :: mendel_metrics_phase=
Compute MENDEL metrics.nitc :: ToolContext :: message_sorter
nitc :: ToolContext :: message_sorter=
nitc :: ToolContext :: mmodules_metrics_phase
MModules related metrics phasenitc :: ToolContext :: mmodules_metrics_phase=
MModules related metrics phasenitc :: ToolContext :: mmodules_to_check
Modules to analyze, other modules will only get a shallow processing.nitc :: ToolContext :: mmodules_to_check=
Modules to analyze, other modules will only get a shallow processing.nitc :: ToolContext :: modelbuilder
The modelbuilder 1-to-1 associated with the toolcontextnitc :: ToolContext :: modelbuilder_real
nitc :: ToolContext :: modelize_class_phase
RunAModule::build_classes
on each module
nitc :: ToolContext :: modelize_class_phase=
RunAModule::build_classes
on each module
nitc :: ToolContext :: modelize_property_phase
RunAClassdef::build_property
on the classdefs of each module
nitc :: ToolContext :: modelize_property_phase=
RunAClassdef::build_property
on the classdefs of each module
nitc :: ToolContext :: nit_dir
The identified root directory of the Nit packagenitc :: ToolContext :: nit_dir=
The identified root directory of the Nit packagenitc :: ToolContext :: nitpackage_phase=
nitpackage phasenitc :: ToolContext :: no_warning_phase
The phase should be executed before any warning on the module is processed.nitc :: ToolContext :: no_warning_phase=
The phase should be executed before any warning on the module is processed.nitc :: ToolContext :: nullables_metrics_phase
Nullable types related metricsnitc :: ToolContext :: nullables_metrics_phase=
Nullable types related metricsnitc :: ToolContext :: opt_a
nitc :: ToolContext :: opt_a=
nitc :: ToolContext :: opt_analysis=
Analysis to applynitc :: ToolContext :: opt_ant
Compile using ant instead of make (faster, but no error display)nitc :: ToolContext :: opt_ant=
Compile using ant instead of make (faster, but no error display)nitc :: ToolContext :: opt_b
nitc :: ToolContext :: opt_b=
nitc :: ToolContext :: opt_bash_completion
Option --bash-completionnitc :: ToolContext :: opt_bash_completion=
Option --bash-completionnitc :: ToolContext :: opt_break_str=
Break too long string literals.nitc :: ToolContext :: opt_c
nitc :: ToolContext :: opt_c=
nitc :: ToolContext :: opt_catalog=
Compute and use the catalognitc :: ToolContext :: opt_check
Check formatting instead of pretty printing.nitc :: ToolContext :: opt_check=
Check formatting instead of pretty printing.nitc :: ToolContext :: opt_check_ini=
--check-ininitc :: ToolContext :: opt_check_makefile=
--check-makefilenitc :: ToolContext :: opt_check_man=
--check-mannitc :: ToolContext :: opt_check_readme=
--check-readmenitc :: ToolContext :: opt_colo_dead_methods
--no-colo-dead-methodsnitc :: ToolContext :: opt_colo_dead_methods=
--no-colo-dead-methodsnitc :: ToolContext :: opt_colors_are_symbols
--colors-are-symbolsnitc :: ToolContext :: opt_colors_are_symbols=
--colors-are-symbolsnitc :: ToolContext :: opt_command
Used to shortcut the prompt and display directly the result in console.nitc :: ToolContext :: opt_command=
Used to shortcut the prompt and display directly the result in console.nitc :: ToolContext :: opt_compile_dir=
--compile-dirnitc :: ToolContext :: opt_compile_dir=
--compile-dirnitc :: ToolContext :: opt_compile_dir=
Where to output tmp filesnitc :: ToolContext :: opt_config=
Path to app config file.nitc :: ToolContext :: opt_custom_brand
Display a custom brand or logo in the documentation top menunitc :: ToolContext :: opt_custom_brand=
Display a custom brand or logo in the documentation top menunitc :: ToolContext :: opt_custom_intro
Display a custom introduction text before the packages overviewnitc :: ToolContext :: opt_custom_intro=
Display a custom introduction text before the packages overviewnitc :: ToolContext :: opt_custom_title
Use a custom title for the homepagenitc :: ToolContext :: opt_custom_title=
Use a custom title for the homepagenitc :: ToolContext :: opt_depth=
Depth of the visit and generationnitc :: ToolContext :: opt_detect_covariance
--detect-variance-constraintsnitc :: ToolContext :: opt_detect_covariance=
--detect-variance-constraintsnitc :: ToolContext :: opt_detect_variance_constraints
--detect-variance-constraintsnitc :: ToolContext :: opt_detect_variance_constraints=
--detect-variance-constraintsnitc :: ToolContext :: opt_diff
Show diff between source and pretty printed code.nitc :: ToolContext :: opt_diff=
Show diff between source and pretty printed code.nitc :: ToolContext :: opt_dir
The working directory used to store temp files.nitc :: ToolContext :: opt_dir=
Where do we put the result?nitc :: ToolContext :: opt_dir=
Where do we put the result?nitc :: ToolContext :: opt_dir=
The working directory used to store temp files.nitc :: ToolContext :: opt_dir=
Directory where the Nitdoc is renderednitc :: ToolContext :: opt_direct_call_monomorph
--direct-call-monomorphnitc :: ToolContext :: opt_direct_call_monomorph0
--direct-call-monomorph0nitc :: ToolContext :: opt_direct_call_monomorph0=
--direct-call-monomorph0nitc :: ToolContext :: opt_direct_call_monomorph=
--direct-call-monomorphnitc :: ToolContext :: opt_disable_phase=
--disable-phasenitc :: ToolContext :: opt_discover_call_trace
--discover-call-tracenitc :: ToolContext :: opt_discover_call_trace=
--discover-call-tracenitc :: ToolContext :: opt_feature_envy=
--feature-envynitc :: ToolContext :: opt_full_contract=
Option --full-contractnitc :: ToolContext :: opt_full_name
nitc :: ToolContext :: opt_full_name=
nitc :: ToolContext :: opt_gen_force
nitc :: ToolContext :: opt_gen_force=
nitc :: ToolContext :: opt_gen_makefile=
--gen-makefilenitc :: ToolContext :: opt_gen_private
nitc :: ToolContext :: opt_gen_private=
nitc :: ToolContext :: opt_gen_show
nitc :: ToolContext :: opt_gen_show=
nitc :: ToolContext :: opt_gen_unit
nitc :: ToolContext :: opt_gen_unit=
nitc :: ToolContext :: opt_generate_hyperdoc
--generate_hyperdocnitc :: ToolContext :: opt_generate_hyperdoc=
--generate_hyperdocnitc :: ToolContext :: opt_global=
option --globalnitc :: ToolContext :: opt_group_c_files=
--group-c-filesnitc :: ToolContext :: opt_guard_call=
--guard-callnitc :: ToolContext :: opt_hardening=
--hardeningnitc :: ToolContext :: opt_host
Host name to bind on (will overwrite the config one).nitc :: ToolContext :: opt_host=
Host name to bind on (will overwrite the config one).nitc :: ToolContext :: opt_ignore_visibility
Option --ignore-visibilitynitc :: ToolContext :: opt_ignore_visibility=
Option --ignore-visibilitynitc :: ToolContext :: opt_inheritance=
--inheritancenitc :: ToolContext :: opt_inline_coloring_numbers
--inline-coloring-numbersnitc :: ToolContext :: opt_inline_coloring_numbers=
--inline-coloring-numbersnitc :: ToolContext :: opt_inline_do
Forcedo
on the same line as the method signature.
nitc :: ToolContext :: opt_inline_do=
Forcedo
on the same line as the method signature.
nitc :: ToolContext :: opt_inline_some_methods
--inline-some-methodsnitc :: ToolContext :: opt_inline_some_methods=
--inline-some-methodsnitc :: ToolContext :: opt_invocation_metrics
--invocation-metricsnitc :: ToolContext :: opt_invocation_metrics=
--invocation-metricsnitc :: ToolContext :: opt_isset_checks_metrics
--isset-checks-metricsnitc :: ToolContext :: opt_isset_checks_metrics=
--isset-checks-metricsnitc :: ToolContext :: opt_keep_going=
Option --keep-goingnitc :: ToolContext :: opt_large_class=
--large-classnitc :: ToolContext :: opt_line_width=
--line-widthnitc :: ToolContext :: opt_link_boost=
--link-boostnitc :: ToolContext :: opt_log_dir=
Option --log-dirnitc :: ToolContext :: opt_long_method=
--long-methodsnitc :: ToolContext :: opt_long_method_threshold
--move-genericsnitc :: ToolContext :: opt_long_method_threshold=
--move-genericsnitc :: ToolContext :: opt_long_params=
--long-paramsnitc :: ToolContext :: opt_long_params_threshold
--long-method-thresholdnitc :: ToolContext :: opt_long_params_threshold=
--long-method-thresholdnitc :: ToolContext :: opt_make_flags=
--make-flagsnitc :: ToolContext :: opt_max_c_lines=
--max-c-linesnitc :: ToolContext :: opt_mclasses=
--mclasssesnitc :: ToolContext :: opt_meld
Show diff between source and pretty printed code using meld.nitc :: ToolContext :: opt_meld=
Show diff between source and pretty printed code using meld.nitc :: ToolContext :: opt_mmodules=
--mmodulesnitc :: ToolContext :: opt_move_generics=
--move-genericsnitc :: ToolContext :: opt_name
nitc :: ToolContext :: opt_name=
nitc :: ToolContext :: opt_name_prefix
nitc :: ToolContext :: opt_name_prefix=
nitc :: ToolContext :: opt_nit_dir=
Option --nit-dirnitc :: ToolContext :: opt_no_abstract_implementation
--no-abstract-implementationnitc :: ToolContext :: opt_no_abstract_implementation=
--no-abstract-implementationnitc :: ToolContext :: opt_no_attribute=
--no-attributenitc :: ToolContext :: opt_no_attributes
Do not generate documentation for attributesnitc :: ToolContext :: opt_no_attributes=
Do not generate documentation for attributesnitc :: ToolContext :: opt_no_check_all=
--no-check-allnitc :: ToolContext :: opt_no_check_assert=
--no-check-assertnitc :: ToolContext :: opt_no_check_attr_isset
--no-check-attr-issetnitc :: ToolContext :: opt_no_check_attr_isset=
--no-check-attr-issetnitc :: ToolContext :: opt_no_check_autocast
--no-check-autocastnitc :: ToolContext :: opt_no_check_autocast=
--no-check-autocastnitc :: ToolContext :: opt_no_check_covariance
--no-check-covariancenitc :: ToolContext :: opt_no_check_covariance=
--no-check-covariancenitc :: ToolContext :: opt_no_check_erasure_cast
--no-check-erasure-castnitc :: ToolContext :: opt_no_check_erasure_cast=
--no-check-erasure-castnitc :: ToolContext :: opt_no_check_null=
--no-check-nullnitc :: ToolContext :: opt_no_color=
Option --no-colornitc :: ToolContext :: opt_no_contract=
Option --no-contractnitc :: ToolContext :: opt_no_empty_doc=
--no-empty-docnitc :: ToolContext :: opt_no_fictive=
--no-fictivenitc :: ToolContext :: opt_no_gcc_directive
--no-gcc-directivesnitc :: ToolContext :: opt_no_gcc_directive=
--no-gcc-directivesnitc :: ToolContext :: opt_no_inline=
--no-inlinenitc :: ToolContext :: opt_no_inline_intern=
--no-inline-internnitc :: ToolContext :: opt_no_private=
--no-privatenitc :: ToolContext :: opt_no_shortcut_equate
--no-shortcut-equatenitc :: ToolContext :: opt_no_shortcut_equate=
--no-shortcut-equatenitc :: ToolContext :: opt_no_shortcut_range
--no-shortcut-rangenitc :: ToolContext :: opt_no_shortcut_range=
--no-shortcut-rangenitc :: ToolContext :: opt_no_stacktrace=
--no-stacktracenitc :: ToolContext :: opt_no_tag_primitives
--no-tag-primitivesnitc :: ToolContext :: opt_no_tag_primitives=
--no-tag-primitivesnitc :: ToolContext :: opt_no_time=
opt --no-timenitc :: ToolContext :: opt_no_union_attribute
--no-union-attributenitc :: ToolContext :: opt_no_union_attribute=
--no-union-attributenitc :: ToolContext :: opt_nocode=
Do not include highlighted codenitc :: ToolContext :: opt_nocolors=
--no-colorsnitc :: ToolContext :: opt_nocolors=
--long-params-thresholdnitc :: ToolContext :: opt_nodot=
Do not generate dot/graphviz diagramsnitc :: ToolContext :: opt_norender=
Disable HTML renderingnitc :: ToolContext :: opt_nullables=
--nullablesnitc :: ToolContext :: opt_only_metamodel
Option --only-metamodelnitc :: ToolContext :: opt_only_metamodel=
Option --only-metamodelnitc :: ToolContext :: opt_only_parse=
Option --only-parsenitc :: ToolContext :: opt_output
Output pretty printed code with this filename.nitc :: ToolContext :: opt_output=
Where to output the generated binarynitc :: ToolContext :: opt_output=
Where do we put a single result?nitc :: ToolContext :: opt_output=
Where do we put a single result?nitc :: ToolContext :: opt_output=
Output pretty printed code with this filename.nitc :: ToolContext :: opt_piwik_site_id=
Piwik tracker site idnitc :: ToolContext :: opt_piwik_tracker=
Piwik tracker URLnitc :: ToolContext :: opt_port
Port number to bind on (will overwrite the config one).nitc :: ToolContext :: opt_port=
Port number to bind on (will overwrite the config one).nitc :: ToolContext :: opt_privacy=
Generate private?nitc :: ToolContext :: opt_private
Do not generate documentation for private propertiesnitc :: ToolContext :: opt_private=
Do not generate documentation for private propertiesnitc :: ToolContext :: opt_query
nitc :: ToolContext :: opt_query=
nitc :: ToolContext :: opt_refinement=
--genericitynitc :: ToolContext :: opt_semi_global=
--semi-globalnitc :: ToolContext :: opt_separate=
--separatenitc :: ToolContext :: opt_set_dummy_tool
Option --set-dummy-toolnitc :: ToolContext :: opt_set_dummy_tool=
Option --set-dummy-toolnitc :: ToolContext :: opt_skip_dead_methods
--skip-dead-methodsnitc :: ToolContext :: opt_skip_dead_methods=
--skip-dead-methodsnitc :: ToolContext :: opt_skip_empty
Force formatting on empty lines.nitc :: ToolContext :: opt_skip_empty=
Force formatting on empty lines.nitc :: ToolContext :: opt_source
File pattern used to link documentation to source code.nitc :: ToolContext :: opt_source=
File pattern used to link documentation to source code.nitc :: ToolContext :: opt_static_types=
--static-typesnitc :: ToolContext :: opt_stop_on_first_error
Option --stop-on-first-errornitc :: ToolContext :: opt_stop_on_first_error=
Option --stop-on-first-errornitc :: ToolContext :: opt_stub_man=
Option --stub-mannitc :: ToolContext :: opt_substitute_monomorph
--substitute-monomorphnitc :: ToolContext :: opt_substitute_monomorph=
--substitute-monomorphnitc :: ToolContext :: opt_tables_metrics=
--tables-metricsnitc :: ToolContext :: opt_trace_memory=
--trace-memorynitc :: ToolContext :: opt_trampoline_call=
--trampoline-callnitc :: ToolContext :: opt_type_poset=
--type-posetnitc :: ToolContext :: opt_typing_test_metrics
--typing-test-metricsnitc :: ToolContext :: opt_typing_test_metrics=
--typing-test-metricsnitc :: ToolContext :: opt_verbose=
Option --verbosenitc :: ToolContext :: opt_version=
Option --versionnitc :: ToolContext :: opt_vim_autocomplete
Shall we generate the files for the Vim plugin?nitc :: ToolContext :: opt_vim_autocomplete=
Shall we generate the files for the Vim plugin?nitc :: ToolContext :: opt_warning=
Option --warningnitc :: ToolContext :: option_context=
Global OptionContextnitc :: ToolContext :: output_dir=
Output directory for metrics files.nitc :: ToolContext :: parallelization_phase
Transforms a function annotated with "threaded"nitc :: ToolContext :: parallelization_phase=
Transforms a function annotated with "threaded"nitc :: ToolContext :: parse_annotations_phase
Parse the annotations on modules, classdefs and propdefsnitc :: ToolContext :: parse_annotations_phase=
Parse the annotations on modules, classdefs and propdefsnitc :: ToolContext :: parse_classdef
Parse a full classdef given as a stringnitc :: ToolContext :: parse_expr
Parse a full expression given as a stringnitc :: ToolContext :: parse_module
Parse a full module given as a stringnitc :: ToolContext :: parse_propdef
Parse a full propdef given as a stringnitc :: ToolContext :: parse_something
Try to parse thestring
as something
nitc :: ToolContext :: parse_stmts
Parse a full statement block given as a stringnitc :: ToolContext :: parse_superclass
Parse a super class declarationnitc :: ToolContext :: phase_process_npropdef
Process the givenphase
on the npropdef
nitc :: ToolContext :: phased_modules
Set of already analyzed modules.nitc :: ToolContext :: phased_modules=
Set of already analyzed modules.nitc :: ToolContext :: phases_list
The list of registered phases in the application order.nitc :: ToolContext :: phases_list=
The list of registered phases in the application order.nitc :: ToolContext :: pkgconfig_is_available
Is the external programpkg-config
available?
nitc :: ToolContext :: pkgconfig_is_available=
Is the external programpkg-config
available?
nitc :: ToolContext :: pkgconfig_phase
Detects thepkgconfig
annotation on the module declaration only
nitc :: ToolContext :: pkgconfig_phase=
Detects thepkgconfig
annotation on the module declaration only
nitc :: ToolContext :: platform_from_name
Get platform compilation settings from itsname
nitc :: ToolContext :: platform_phase
Detects theplatform
annotation to set a mobile target platform
nitc :: ToolContext :: platform_phase=
Detects theplatform
annotation to set a mobile target platform
nitc :: ToolContext :: process_options
Parse and process the options given on the command linenitc :: ToolContext :: quit
Output all current stacked messages, total and exit the programnitc :: ToolContext :: readme_metrics_phase
README related metrics phasenitc :: ToolContext :: readme_metrics_phase=
README related metrics phasenitc :: ToolContext :: regex_phase=
Phase checking for errors in regexnitc :: ToolContext :: restful_phase
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: restful_phase=
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: rta_metrics_phase=
RTA related metrics phasenitc :: ToolContext :: run_global_phases
Runprocess_mainmodule
on all phases
nitc :: ToolContext :: run_phases
Run all registered phases on a set of modulesnitc :: ToolContext :: run_phases_on_npropdef
Run the phase on the given npropdef.nitc :: ToolContext :: scope_phase=
RunAPropdef::do_scope
on each propdef.
nitc :: ToolContext :: semantize_is_lazy
Isphase_process_npropdef
not called automatically by run_phases
?
nitc :: ToolContext :: semantize_is_lazy=
Isphase_process_npropdef
not called automatically by run_phases
?
nitc :: ToolContext :: serialization_phase_post_model
The second phase of the serializationnitc :: ToolContext :: serialization_phase_post_model=
The second phase of the serializationnitc :: ToolContext :: serialization_phase_pre_model
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: serialization_phase_pre_model=
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: serialization_phase_rename
Apply the annotationserialize_as
nitc :: ToolContext :: serialization_phase_rename=
Apply the annotationserialize_as
nitc :: ToolContext :: set_testing_path
Set theNIT_TESTING_PATH
environment variable with path
.
nitc :: ToolContext :: show_unit_status
Show a single-line status to use as a progression.nitc :: ToolContext :: simple_misc_analysis_phase
ExecuteAModule::do_simple_misc_analysis
on each module.
nitc :: ToolContext :: simple_misc_analysis_phase=
ExecuteAModule::do_simple_misc_analysis
on each module.
nitc :: ToolContext :: todo_nmodules
List of module to process according torun_phases
nitc :: ToolContext :: todo_nmodules=
List of module to process according torun_phases
nitc :: ToolContext :: tooldescription
Name, usage and synopsis of the tool.nitc :: ToolContext :: tooldescription=
Name, usage and synopsis of the tool.nitc :: ToolContext :: toolname
Get the name of the tool or "DUMMY_TOOL" id--set-dummy-tool
is set.
nitc :: ToolContext :: transform_phase
nitc :: ToolContext :: transform_phase=
nitc :: ToolContext :: typing_phase
nitc :: ToolContext :: typing_phase=
nitc :: ToolContext :: ulimit_file
The maximum size (in KB) of files written by a command executed troughsafe_exec
nitc :: ToolContext :: ulimit_file=
The maximum size (in KB) of files written by a command executed troughsafe_exec
nitc :: ToolContext :: ulimit_usertime
The maximum amount of cpu time (in seconds) for a command executed troughsafe_exec
nitc :: ToolContext :: ulimit_usertime=
The maximum amount of cpu time (in seconds) for a command executed troughsafe_exec
nitc :: ToolContext :: umlphase
Phase that generates UML diagrams from model entities.nitc :: ToolContext :: umlphase=
Phase that generates UML diagrams from model entities.nitc :: ToolContext :: verbose_level=
Verbose levelnitc :: ToolContext :: version
Get the currentnit_version
or "DUMMY_VERSION" if --set-dummy-tool
is set.
nitc :: ToolContext :: warning_blacklist
List of tags per source-file whose warnings are not displayed.nitc :: ToolContext :: warning_blacklist=
List of tags per source-file whose warnings are not displayed.nitc :: ToolContext :: warning_count=
Number of warningsnitc $ ToolContext :: SELF
Type of this instance, automatically specialized in every classnitc :: phase $ ToolContext :: init
nitc :: test_toolcontext $ ToolContext :: init
nitc $ ToolContext :: init
nitc :: mixin $ ToolContext :: init
nitc :: loader $ ToolContext :: init
nitc :: modelbuilder $ ToolContext :: init
nitc :: nitweb $ ToolContext :: init
nitc :: nitx $ ToolContext :: init
nitc :: metrics_base $ ToolContext :: init
nitc :: nitdoc $ ToolContext :: init
nitc :: nitsmell_toolcontext $ ToolContext :: init
nitc :: vim_autocomplete $ ToolContext :: init
nitc :: transform $ ToolContext :: init
nitc :: naive_interpreter $ ToolContext :: init
nitc :: nitrestful $ ToolContext :: init
nitc :: nitsaf $ ToolContext :: init
nitc :: nitserial $ ToolContext :: init
nitc :: java_compiler $ ToolContext :: init
nitc :: abstract_compiler $ ToolContext :: init
nitc :: on_demand_compiler $ ToolContext :: init
nitc :: nituml $ ToolContext :: init
nitc :: global_compiler $ ToolContext :: init
nitc :: memory_logger $ ToolContext :: init
nitc :: nitpackage $ ToolContext :: init
nitc :: separate_compiler $ ToolContext :: init
nitc :: test_model_index $ ToolContext :: init
nitc :: nitsmells $ ToolContext :: init
nitc :: separate_erasure_compiler $ ToolContext :: init
nitc :: mixin $ ToolContext :: make_main_module
Combine module to make a single one if required.nitc :: nitpick $ ToolContext :: phase_process_npropdef
Process the givenphase
on the npropdef
nitc :: ios $ ToolContext :: platform_from_name
Get platform compilation settings from itsname
nitc :: emscripten $ ToolContext :: platform_from_name
Get platform compilation settings from itsname
nitc :: android $ ToolContext :: platform_from_name
Get platform compilation settings from itsname
nitc :: abstract_compiler $ ToolContext :: process_options
Parse and process the options given on the command linenitc :: nith $ ToolContext :: process_options
Parse and process the options given on the command linenitc :: separate_compiler $ ToolContext :: process_options
Parse and process the options given on the command linenitc :: nitc $ ToolContext :: process_options
Parse and process the options given on the command linenitc :: metrics_base $ ToolContext :: process_options
Parse and process the options given on the command linenitc :: separate_erasure_compiler $ ToolContext :: process_options
Parse and process the options given on the command linenitc :: phase $ ToolContext :: process_options
Parse and process the options given on the command linenitc :: ToolContext :: _accept_no_arguments
Doesprocess_options
should accept an empty sequence of arguments.
nitc :: ToolContext :: _auto_super_init_phase
Phase that injectsuper
in constructors that need it.
nitc :: ToolContext :: _autocomplete_phase
Phase generating the files for the Vim pluginnitc :: ToolContext :: _cflags_phase
Phase to findcflags
, ldflags
and cppflags
nitc :: ToolContext :: _check_annotation_phase
Check for unknown annotation in each modulenitc :: ToolContext :: _contracts_phase
Parses contracts annotations.nitc :: ToolContext :: _default_phase
nitc :: ToolContext :: _detect_covariance_phase
Phase that intercepts static type tests then display statistics about covariancenitc :: ToolContext :: _detect_variance_constraints_phase
The DetectVarianceConstraints phasenitc :: ToolContext :: _div_by_zero_phase
Instantiate a new specific phasediv_by_zero_phase
nitc :: ToolContext :: _dummy
FIXME: there is conflict in linex in nitc, so use this trick to force invocationnitc :: ToolContext :: _explain_assert_phase
Phase modifying the AST to explain assets when they failnitc :: ToolContext :: _ffi_language_assignation_phase
Phase that assign aFFILanguage
to all AExternCodeBlock
nitc :: ToolContext :: _flow_phase
RunAPropdef::do_flow
on each propdef
nitc :: ToolContext :: _glsl_validation_phase
Shader code validation phasenitc :: ToolContext :: _inheritance_metrics_phase
Inheritance related metrics phasenitc :: ToolContext :: _keep_going
Does an error prevent the program to stop atcheck_errors
?
nitc :: ToolContext :: _literal_phase
Parses literal values in the whole AST and produces errors if needednitc :: ToolContext :: _local_var_init_phase
RunAPropdef::do_local_var_init
on each propdef
nitc :: ToolContext :: _log_directory
Directory where to generate log filesnitc :: ToolContext :: _log_info
Stream inlog_directory
where all info messages are written
nitc :: ToolContext :: _mclasses_metrics_phase
MClass related metrics phasenitc :: ToolContext :: _mendel_metrics_phase
Compute MENDEL metrics.nitc :: ToolContext :: _message_sorter
nitc :: ToolContext :: _mmodules_metrics_phase
MModules related metrics phasenitc :: ToolContext :: _mmodules_to_check
Modules to analyze, other modules will only get a shallow processing.nitc :: ToolContext :: _modelize_class_phase
RunAModule::build_classes
on each module
nitc :: ToolContext :: _modelize_property_phase
RunAClassdef::build_property
on the classdefs of each module
nitc :: ToolContext :: _nit_dir
The identified root directory of the Nit packagenitc :: ToolContext :: _no_warning_phase
The phase should be executed before any warning on the module is processed.nitc :: ToolContext :: _nullables_metrics_phase
Nullable types related metricsnitc :: ToolContext :: _opt_a
nitc :: ToolContext :: _opt_ant
Compile using ant instead of make (faster, but no error display)nitc :: ToolContext :: _opt_b
nitc :: ToolContext :: _opt_bash_completion
Option --bash-completionnitc :: ToolContext :: _opt_break_str
Break too long string literals.nitc :: ToolContext :: _opt_c
nitc :: ToolContext :: _opt_catalog
Compute and use the catalognitc :: ToolContext :: _opt_check
Check formatting instead of pretty printing.nitc :: ToolContext :: _opt_check_makefile
--check-makefilenitc :: ToolContext :: _opt_colo_dead_methods
--no-colo-dead-methodsnitc :: ToolContext :: _opt_colors_are_symbols
--colors-are-symbolsnitc :: ToolContext :: _opt_command
Used to shortcut the prompt and display directly the result in console.nitc :: ToolContext :: _opt_compile_dir
Where to output tmp filesnitc :: ToolContext :: _opt_custom_brand
Display a custom brand or logo in the documentation top menunitc :: ToolContext :: _opt_custom_intro
Display a custom introduction text before the packages overviewnitc :: ToolContext :: _opt_custom_title
Use a custom title for the homepagenitc :: ToolContext :: _opt_depth
Depth of the visit and generationnitc :: ToolContext :: _opt_detect_covariance
--detect-variance-constraintsnitc :: ToolContext :: _opt_detect_variance_constraints
--detect-variance-constraintsnitc :: ToolContext :: _opt_diff
Show diff between source and pretty printed code.nitc :: ToolContext :: _opt_dir
The working directory used to store temp files.nitc :: ToolContext :: _opt_dir
Directory where the Nitdoc is renderednitc :: ToolContext :: _opt_direct_call_monomorph
--direct-call-monomorphnitc :: ToolContext :: _opt_direct_call_monomorph0
--direct-call-monomorph0nitc :: ToolContext :: _opt_disable_phase
--disable-phasenitc :: ToolContext :: _opt_discover_call_trace
--discover-call-tracenitc :: ToolContext :: _opt_full_contract
Option --full-contractnitc :: ToolContext :: _opt_full_name
nitc :: ToolContext :: _opt_gen_force
nitc :: ToolContext :: _opt_gen_private
nitc :: ToolContext :: _opt_gen_show
nitc :: ToolContext :: _opt_gen_unit
nitc :: ToolContext :: _opt_generate_hyperdoc
--generate_hyperdocnitc :: ToolContext :: _opt_group_c_files
--group-c-filesnitc :: ToolContext :: _opt_host
Host name to bind on (will overwrite the config one).nitc :: ToolContext :: _opt_ignore_visibility
Option --ignore-visibilitynitc :: ToolContext :: _opt_inline_coloring_numbers
--inline-coloring-numbersnitc :: ToolContext :: _opt_inline_do
Forcedo
on the same line as the method signature.
nitc :: ToolContext :: _opt_inline_some_methods
--inline-some-methodsnitc :: ToolContext :: _opt_invocation_metrics
--invocation-metricsnitc :: ToolContext :: _opt_isset_checks_metrics
--isset-checks-metricsnitc :: ToolContext :: _opt_long_method_threshold
--move-genericsnitc :: ToolContext :: _opt_long_params_threshold
--long-method-thresholdnitc :: ToolContext :: _opt_meld
Show diff between source and pretty printed code using meld.nitc :: ToolContext :: _opt_move_generics
--move-genericsnitc :: ToolContext :: _opt_name
nitc :: ToolContext :: _opt_name_prefix
nitc :: ToolContext :: _opt_no_abstract_implementation
--no-abstract-implementationnitc :: ToolContext :: _opt_no_attributes
Do not generate documentation for attributesnitc :: ToolContext :: _opt_no_check_assert
--no-check-assertnitc :: ToolContext :: _opt_no_check_attr_isset
--no-check-attr-issetnitc :: ToolContext :: _opt_no_check_autocast
--no-check-autocastnitc :: ToolContext :: _opt_no_check_covariance
--no-check-covariancenitc :: ToolContext :: _opt_no_check_erasure_cast
--no-check-erasure-castnitc :: ToolContext :: _opt_no_check_null
--no-check-nullnitc :: ToolContext :: _opt_no_contract
Option --no-contractnitc :: ToolContext :: _opt_no_gcc_directive
--no-gcc-directivesnitc :: ToolContext :: _opt_no_inline_intern
--no-inline-internnitc :: ToolContext :: _opt_no_shortcut_equate
--no-shortcut-equatenitc :: ToolContext :: _opt_no_shortcut_range
--no-shortcut-rangenitc :: ToolContext :: _opt_no_stacktrace
--no-stacktracenitc :: ToolContext :: _opt_no_tag_primitives
--no-tag-primitivesnitc :: ToolContext :: _opt_no_union_attribute
--no-union-attributenitc :: ToolContext :: _opt_nocode
Do not include highlighted codenitc :: ToolContext :: _opt_nodot
Do not generate dot/graphviz diagramsnitc :: ToolContext :: _opt_only_metamodel
Option --only-metamodelnitc :: ToolContext :: _opt_output
Where do we put a single result?nitc :: ToolContext :: _opt_output
Where do we put a single result?nitc :: ToolContext :: _opt_output
Output pretty printed code with this filename.nitc :: ToolContext :: _opt_output
Where to output the generated binarynitc :: ToolContext :: _opt_piwik_site_id
Piwik tracker site idnitc :: ToolContext :: _opt_piwik_tracker
Piwik tracker URLnitc :: ToolContext :: _opt_port
Port number to bind on (will overwrite the config one).nitc :: ToolContext :: _opt_private
Do not generate documentation for private propertiesnitc :: ToolContext :: _opt_query
nitc :: ToolContext :: _opt_set_dummy_tool
Option --set-dummy-toolnitc :: ToolContext :: _opt_skip_dead_methods
--skip-dead-methodsnitc :: ToolContext :: _opt_skip_empty
Force formatting on empty lines.nitc :: ToolContext :: _opt_source
File pattern used to link documentation to source code.nitc :: ToolContext :: _opt_stop_on_first_error
Option --stop-on-first-errornitc :: ToolContext :: _opt_substitute_monomorph
--substitute-monomorphnitc :: ToolContext :: _opt_tables_metrics
--tables-metricsnitc :: ToolContext :: _opt_trampoline_call
--trampoline-callnitc :: ToolContext :: _opt_typing_test_metrics
--typing-test-metricsnitc :: ToolContext :: _opt_vim_autocomplete
Shall we generate the files for the Vim plugin?nitc :: ToolContext :: _option_context
Global OptionContextnitc :: ToolContext :: _output_dir
Output directory for metrics files.nitc :: ToolContext :: _parallelization_phase
Transforms a function annotated with "threaded"nitc :: ToolContext :: _parse_annotations_phase
Parse the annotations on modules, classdefs and propdefsnitc :: ToolContext :: _phased_modules
Set of already analyzed modules.nitc :: ToolContext :: _phases_list
The list of registered phases in the application order.nitc :: ToolContext :: _pkgconfig_is_available
Is the external programpkg-config
available?
nitc :: ToolContext :: _pkgconfig_phase
Detects thepkgconfig
annotation on the module declaration only
nitc :: ToolContext :: _platform_phase
Detects theplatform
annotation to set a mobile target platform
nitc :: ToolContext :: _readme_metrics_phase
README related metrics phasenitc :: ToolContext :: _regex_phase
Phase checking for errors in regexnitc :: ToolContext :: _restful_phase
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: _rta_metrics_phase
RTA related metrics phasenitc :: ToolContext :: _scope_phase
RunAPropdef::do_scope
on each propdef.
nitc :: ToolContext :: _semantize_is_lazy
Isphase_process_npropdef
not called automatically by run_phases
?
nitc :: ToolContext :: _serialization_phase_post_model
The second phase of the serializationnitc :: ToolContext :: _serialization_phase_pre_model
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: _serialization_phase_rename
Apply the annotationserialize_as
nitc :: ToolContext :: _simple_misc_analysis_phase
ExecuteAModule::do_simple_misc_analysis
on each module.
nitc :: ToolContext :: _todo_nmodules
List of module to process according torun_phases
nitc :: ToolContext :: _tooldescription
Name, usage and synopsis of the tool.nitc :: ToolContext :: _transform_phase
nitc :: ToolContext :: _typing_phase
nitc :: ToolContext :: _ulimit_file
The maximum size (in KB) of files written by a command executed troughsafe_exec
nitc :: ToolContext :: _ulimit_usertime
The maximum amount of cpu time (in seconds) for a command executed troughsafe_exec
nitc :: ToolContext :: _umlphase
Phase that generates UML diagrams from model entities.nitc :: ToolContext :: _warning_blacklist
List of tags per source-file whose warnings are not displayed.nitc :: ToolContext :: accept_no_arguments
Doesprocess_options
should accept an empty sequence of arguments.
nitc :: ToolContext :: accept_no_arguments=
Doesprocess_options
should accept an empty sequence of arguments.
nitc :: ToolContext :: ast_metrics_phase
nitc :: ToolContext :: auto_super_init_phase
Phase that injectsuper
in constructors that need it.
nitc :: ToolContext :: auto_super_init_phase=
Phase that injectsuper
in constructors that need it.
nitc :: ToolContext :: autocomplete_phase
Phase generating the files for the Vim pluginnitc :: ToolContext :: autocomplete_phase=
Phase generating the files for the Vim pluginnitc :: ToolContext :: cflags_phase
Phase to findcflags
, ldflags
and cppflags
nitc :: ToolContext :: cflags_phase=
Phase to findcflags
, ldflags
and cppflags
nitc :: ToolContext :: check_annotation_phase
Check for unknown annotation in each modulenitc :: ToolContext :: check_annotation_phase=
Check for unknown annotation in each modulenitc :: ToolContext :: check_nit_dir
nitc :: ToolContext :: check_pkgconfig_packages
Check if thepackages
are known by the external program pkg-config
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: ToolContext :: clear_progress_bar
Clear the line ifhas_progress_bar
(no-op else)
nitc :: ToolContext :: contracts_phase=
Parses contracts annotations.nitc :: ToolContext :: default_phase
nitc :: ToolContext :: default_phase=
nitc :: ToolContext :: defaultinit
core :: Object :: defaultinit
nitc :: ToolContext :: deriving_phase=
Main phase ofderiving
nitc :: ToolContext :: detect_covariance_phase
Phase that intercepts static type tests then display statistics about covariancenitc :: ToolContext :: detect_covariance_phase=
Phase that intercepts static type tests then display statistics about covariancenitc :: ToolContext :: detect_variance_constraints_phase
The DetectVarianceConstraints phasenitc :: ToolContext :: detect_variance_constraints_phase=
The DetectVarianceConstraints phasenitc :: ToolContext :: div_by_zero_phase
Instantiate a new specific phasediv_by_zero_phase
nitc :: ToolContext :: div_by_zero_phase=
Instantiate a new specific phasediv_by_zero_phase
nitc :: ToolContext :: dummy
FIXME: there is conflict in linex in nitc, so use this trick to force invocationnitc :: ToolContext :: dummy=
FIXME: there is conflict in linex in nitc, so use this trick to force invocationnitc :: ToolContext :: exec_and_check
 Executes a program while checking if it's available and if the execution ended correctlynitc :: ToolContext :: explain_assert_phase
Phase modifying the AST to explain assets when they failnitc :: ToolContext :: explain_assert_phase=
Phase modifying the AST to explain assets when they failnitc :: ToolContext :: fatal_error
Add an error, show errors and quitnitc :: ToolContext :: ffi_language_assignation_phase
Phase that assign aFFILanguage
to all AExternCodeBlock
nitc :: ToolContext :: ffi_language_assignation_phase=
Phase that assign aFFILanguage
to all AExternCodeBlock
nitc :: ToolContext :: flow_phase=
RunAPropdef::do_flow
on each propdef
nitc :: ToolContext :: glsl_validation_phase
Shader code validation phasenitc :: ToolContext :: glsl_validation_phase=
Shader code validation phasenitc :: ToolContext :: inheritance_metrics_phase
Inheritance related metrics phasenitc :: ToolContext :: inheritance_metrics_phase=
Inheritance related metrics phasenitc :: ToolContext :: interactive_parse
Parse the input of the user as somethingcore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: ToolContext :: is_warning_blacklisted
Is the source-file ofl
associated with tag
in warning_blacklist
?
nitc :: ToolContext :: keep_going
Does an error prevent the program to stop atcheck_errors
?
nitc :: ToolContext :: keep_going=
Does an error prevent the program to stop atcheck_errors
?
nitc :: ToolContext :: literal_phase
Parses literal values in the whole AST and produces errors if needednitc :: ToolContext :: literal_phase=
Parses literal values in the whole AST and produces errors if needednitc :: ToolContext :: local_var_init_phase
RunAPropdef::do_local_var_init
on each propdef
nitc :: ToolContext :: local_var_init_phase=
RunAPropdef::do_local_var_init
on each propdef
nitc :: ToolContext :: localize_phase=
Main phase oflanguage
nitc :: ToolContext :: log_directory
Directory where to generate log filesnitc :: ToolContext :: log_directory=
Directory where to generate log filesnitc :: ToolContext :: log_info
Stream inlog_directory
where all info messages are written
nitc :: ToolContext :: log_info=
Stream inlog_directory
where all info messages are written
nitc :: ToolContext :: make_main_module
Combine module to make a single one if required.nitc :: ToolContext :: mclasses_metrics_phase
MClass related metrics phasenitc :: ToolContext :: mclasses_metrics_phase=
MClass related metrics phasenitc :: ToolContext :: mendel_metrics_phase=
Compute MENDEL metrics.nitc :: ToolContext :: message_sorter
nitc :: ToolContext :: message_sorter=
nitc :: ToolContext :: mmodules_metrics_phase
MModules related metrics phasenitc :: ToolContext :: mmodules_metrics_phase=
MModules related metrics phasenitc :: ToolContext :: mmodules_to_check
Modules to analyze, other modules will only get a shallow processing.nitc :: ToolContext :: mmodules_to_check=
Modules to analyze, other modules will only get a shallow processing.nitc :: ToolContext :: modelbuilder
The modelbuilder 1-to-1 associated with the toolcontextnitc :: ToolContext :: modelbuilder_real
nitc :: ToolContext :: modelize_class_phase
RunAModule::build_classes
on each module
nitc :: ToolContext :: modelize_class_phase=
RunAModule::build_classes
on each module
nitc :: ToolContext :: modelize_property_phase
RunAClassdef::build_property
on the classdefs of each module
nitc :: ToolContext :: modelize_property_phase=
RunAClassdef::build_property
on the classdefs of each module
core :: Object :: native_class_name
The class name of the object in CString format.nitc :: ToolContext :: nit_dir
The identified root directory of the Nit packagenitc :: ToolContext :: nit_dir=
The identified root directory of the Nit packagenitc :: ToolContext :: nitpackage_phase=
nitpackage phasenitc :: ToolContext :: no_warning_phase
The phase should be executed before any warning on the module is processed.nitc :: ToolContext :: no_warning_phase=
The phase should be executed before any warning on the module is processed.nitc :: ToolContext :: nullables_metrics_phase
Nullable types related metricsnitc :: ToolContext :: nullables_metrics_phase=
Nullable types related metricsnitc :: ToolContext :: opt_a
nitc :: ToolContext :: opt_a=
nitc :: ToolContext :: opt_analysis=
Analysis to applynitc :: ToolContext :: opt_ant
Compile using ant instead of make (faster, but no error display)nitc :: ToolContext :: opt_ant=
Compile using ant instead of make (faster, but no error display)nitc :: ToolContext :: opt_b
nitc :: ToolContext :: opt_b=
nitc :: ToolContext :: opt_bash_completion
Option --bash-completionnitc :: ToolContext :: opt_bash_completion=
Option --bash-completionnitc :: ToolContext :: opt_break_str=
Break too long string literals.nitc :: ToolContext :: opt_c
nitc :: ToolContext :: opt_c=
nitc :: ToolContext :: opt_catalog=
Compute and use the catalognitc :: ToolContext :: opt_check
Check formatting instead of pretty printing.nitc :: ToolContext :: opt_check=
Check formatting instead of pretty printing.nitc :: ToolContext :: opt_check_ini=
--check-ininitc :: ToolContext :: opt_check_makefile=
--check-makefilenitc :: ToolContext :: opt_check_man=
--check-mannitc :: ToolContext :: opt_check_readme=
--check-readmenitc :: ToolContext :: opt_colo_dead_methods
--no-colo-dead-methodsnitc :: ToolContext :: opt_colo_dead_methods=
--no-colo-dead-methodsnitc :: ToolContext :: opt_colors_are_symbols
--colors-are-symbolsnitc :: ToolContext :: opt_colors_are_symbols=
--colors-are-symbolsnitc :: ToolContext :: opt_command
Used to shortcut the prompt and display directly the result in console.nitc :: ToolContext :: opt_command=
Used to shortcut the prompt and display directly the result in console.nitc :: ToolContext :: opt_compile_dir=
--compile-dirnitc :: ToolContext :: opt_compile_dir=
Where to output tmp filesnitc :: ToolContext :: opt_compile_dir=
--compile-dirnitc :: ToolContext :: opt_config=
Path to app config file.nitc :: ToolContext :: opt_custom_brand
Display a custom brand or logo in the documentation top menunitc :: ToolContext :: opt_custom_brand=
Display a custom brand or logo in the documentation top menunitc :: ToolContext :: opt_custom_intro
Display a custom introduction text before the packages overviewnitc :: ToolContext :: opt_custom_intro=
Display a custom introduction text before the packages overviewnitc :: ToolContext :: opt_custom_title
Use a custom title for the homepagenitc :: ToolContext :: opt_custom_title=
Use a custom title for the homepagenitc :: ToolContext :: opt_depth=
Depth of the visit and generationnitc :: ToolContext :: opt_detect_covariance
--detect-variance-constraintsnitc :: ToolContext :: opt_detect_covariance=
--detect-variance-constraintsnitc :: ToolContext :: opt_detect_variance_constraints
--detect-variance-constraintsnitc :: ToolContext :: opt_detect_variance_constraints=
--detect-variance-constraintsnitc :: ToolContext :: opt_diff
Show diff between source and pretty printed code.nitc :: ToolContext :: opt_diff=
Show diff between source and pretty printed code.nitc :: ToolContext :: opt_dir
The working directory used to store temp files.nitc :: ToolContext :: opt_dir=
Directory where the Nitdoc is renderednitc :: ToolContext :: opt_dir=
Where do we put the result?nitc :: ToolContext :: opt_dir=
Where do we put the result?nitc :: ToolContext :: opt_dir=
The working directory used to store temp files.nitc :: ToolContext :: opt_direct_call_monomorph
--direct-call-monomorphnitc :: ToolContext :: opt_direct_call_monomorph0
--direct-call-monomorph0nitc :: ToolContext :: opt_direct_call_monomorph0=
--direct-call-monomorph0nitc :: ToolContext :: opt_direct_call_monomorph=
--direct-call-monomorphnitc :: ToolContext :: opt_disable_phase=
--disable-phasenitc :: ToolContext :: opt_discover_call_trace
--discover-call-tracenitc :: ToolContext :: opt_discover_call_trace=
--discover-call-tracenitc :: ToolContext :: opt_feature_envy=
--feature-envynitc :: ToolContext :: opt_full_contract=
Option --full-contractnitc :: ToolContext :: opt_full_name
nitc :: ToolContext :: opt_full_name=
nitc :: ToolContext :: opt_gen_force
nitc :: ToolContext :: opt_gen_force=
nitc :: ToolContext :: opt_gen_makefile=
--gen-makefilenitc :: ToolContext :: opt_gen_private
nitc :: ToolContext :: opt_gen_private=
nitc :: ToolContext :: opt_gen_show
nitc :: ToolContext :: opt_gen_show=
nitc :: ToolContext :: opt_gen_unit
nitc :: ToolContext :: opt_gen_unit=
nitc :: ToolContext :: opt_generate_hyperdoc
--generate_hyperdocnitc :: ToolContext :: opt_generate_hyperdoc=
--generate_hyperdocnitc :: ToolContext :: opt_global=
option --globalnitc :: ToolContext :: opt_group_c_files=
--group-c-filesnitc :: ToolContext :: opt_guard_call=
--guard-callnitc :: ToolContext :: opt_hardening=
--hardeningnitc :: ToolContext :: opt_host
Host name to bind on (will overwrite the config one).nitc :: ToolContext :: opt_host=
Host name to bind on (will overwrite the config one).nitc :: ToolContext :: opt_ignore_visibility
Option --ignore-visibilitynitc :: ToolContext :: opt_ignore_visibility=
Option --ignore-visibilitynitc :: ToolContext :: opt_inheritance=
--inheritancenitc :: ToolContext :: opt_inline_coloring_numbers
--inline-coloring-numbersnitc :: ToolContext :: opt_inline_coloring_numbers=
--inline-coloring-numbersnitc :: ToolContext :: opt_inline_do
Forcedo
on the same line as the method signature.
nitc :: ToolContext :: opt_inline_do=
Forcedo
on the same line as the method signature.
nitc :: ToolContext :: opt_inline_some_methods
--inline-some-methodsnitc :: ToolContext :: opt_inline_some_methods=
--inline-some-methodsnitc :: ToolContext :: opt_invocation_metrics
--invocation-metricsnitc :: ToolContext :: opt_invocation_metrics=
--invocation-metricsnitc :: ToolContext :: opt_isset_checks_metrics
--isset-checks-metricsnitc :: ToolContext :: opt_isset_checks_metrics=
--isset-checks-metricsnitc :: ToolContext :: opt_keep_going=
Option --keep-goingnitc :: ToolContext :: opt_large_class=
--large-classnitc :: ToolContext :: opt_line_width=
--line-widthnitc :: ToolContext :: opt_link_boost=
--link-boostnitc :: ToolContext :: opt_log_dir=
Option --log-dirnitc :: ToolContext :: opt_long_method=
--long-methodsnitc :: ToolContext :: opt_long_method_threshold
--move-genericsnitc :: ToolContext :: opt_long_method_threshold=
--move-genericsnitc :: ToolContext :: opt_long_params=
--long-paramsnitc :: ToolContext :: opt_long_params_threshold
--long-method-thresholdnitc :: ToolContext :: opt_long_params_threshold=
--long-method-thresholdnitc :: ToolContext :: opt_make_flags=
--make-flagsnitc :: ToolContext :: opt_max_c_lines=
--max-c-linesnitc :: ToolContext :: opt_mclasses=
--mclasssesnitc :: ToolContext :: opt_meld
Show diff between source and pretty printed code using meld.nitc :: ToolContext :: opt_meld=
Show diff between source and pretty printed code using meld.nitc :: ToolContext :: opt_mmodules=
--mmodulesnitc :: ToolContext :: opt_move_generics=
--move-genericsnitc :: ToolContext :: opt_name
nitc :: ToolContext :: opt_name=
nitc :: ToolContext :: opt_name_prefix
nitc :: ToolContext :: opt_name_prefix=
nitc :: ToolContext :: opt_nit_dir=
Option --nit-dirnitc :: ToolContext :: opt_no_abstract_implementation
--no-abstract-implementationnitc :: ToolContext :: opt_no_abstract_implementation=
--no-abstract-implementationnitc :: ToolContext :: opt_no_attribute=
--no-attributenitc :: ToolContext :: opt_no_attributes
Do not generate documentation for attributesnitc :: ToolContext :: opt_no_attributes=
Do not generate documentation for attributesnitc :: ToolContext :: opt_no_check_all=
--no-check-allnitc :: ToolContext :: opt_no_check_assert=
--no-check-assertnitc :: ToolContext :: opt_no_check_attr_isset
--no-check-attr-issetnitc :: ToolContext :: opt_no_check_attr_isset=
--no-check-attr-issetnitc :: ToolContext :: opt_no_check_autocast
--no-check-autocastnitc :: ToolContext :: opt_no_check_autocast=
--no-check-autocastnitc :: ToolContext :: opt_no_check_covariance
--no-check-covariancenitc :: ToolContext :: opt_no_check_covariance=
--no-check-covariancenitc :: ToolContext :: opt_no_check_erasure_cast
--no-check-erasure-castnitc :: ToolContext :: opt_no_check_erasure_cast=
--no-check-erasure-castnitc :: ToolContext :: opt_no_check_null=
--no-check-nullnitc :: ToolContext :: opt_no_color=
Option --no-colornitc :: ToolContext :: opt_no_contract=
Option --no-contractnitc :: ToolContext :: opt_no_empty_doc=
--no-empty-docnitc :: ToolContext :: opt_no_fictive=
--no-fictivenitc :: ToolContext :: opt_no_gcc_directive
--no-gcc-directivesnitc :: ToolContext :: opt_no_gcc_directive=
--no-gcc-directivesnitc :: ToolContext :: opt_no_inline=
--no-inlinenitc :: ToolContext :: opt_no_inline_intern=
--no-inline-internnitc :: ToolContext :: opt_no_private=
--no-privatenitc :: ToolContext :: opt_no_shortcut_equate
--no-shortcut-equatenitc :: ToolContext :: opt_no_shortcut_equate=
--no-shortcut-equatenitc :: ToolContext :: opt_no_shortcut_range
--no-shortcut-rangenitc :: ToolContext :: opt_no_shortcut_range=
--no-shortcut-rangenitc :: ToolContext :: opt_no_stacktrace=
--no-stacktracenitc :: ToolContext :: opt_no_tag_primitives
--no-tag-primitivesnitc :: ToolContext :: opt_no_tag_primitives=
--no-tag-primitivesnitc :: ToolContext :: opt_no_time=
opt --no-timenitc :: ToolContext :: opt_no_union_attribute
--no-union-attributenitc :: ToolContext :: opt_no_union_attribute=
--no-union-attributenitc :: ToolContext :: opt_nocode=
Do not include highlighted codenitc :: ToolContext :: opt_nocolors=
--long-params-thresholdnitc :: ToolContext :: opt_nocolors=
--no-colorsnitc :: ToolContext :: opt_nodot=
Do not generate dot/graphviz diagramsnitc :: ToolContext :: opt_norender=
Disable HTML renderingnitc :: ToolContext :: opt_nullables=
--nullablesnitc :: ToolContext :: opt_only_metamodel
Option --only-metamodelnitc :: ToolContext :: opt_only_metamodel=
Option --only-metamodelnitc :: ToolContext :: opt_only_parse=
Option --only-parsenitc :: ToolContext :: opt_output
Output pretty printed code with this filename.nitc :: ToolContext :: opt_output=
Output pretty printed code with this filename.nitc :: ToolContext :: opt_output=
Where do we put a single result?nitc :: ToolContext :: opt_output=
Where do we put a single result?nitc :: ToolContext :: opt_output=
Where to output the generated binarynitc :: ToolContext :: opt_piwik_site_id=
Piwik tracker site idnitc :: ToolContext :: opt_piwik_tracker=
Piwik tracker URLnitc :: ToolContext :: opt_port
Port number to bind on (will overwrite the config one).nitc :: ToolContext :: opt_port=
Port number to bind on (will overwrite the config one).nitc :: ToolContext :: opt_privacy=
Generate private?nitc :: ToolContext :: opt_private
Do not generate documentation for private propertiesnitc :: ToolContext :: opt_private=
Do not generate documentation for private propertiesnitc :: ToolContext :: opt_query
nitc :: ToolContext :: opt_query=
nitc :: ToolContext :: opt_refinement=
--genericitynitc :: ToolContext :: opt_semi_global=
--semi-globalnitc :: ToolContext :: opt_separate=
--separatenitc :: ToolContext :: opt_set_dummy_tool
Option --set-dummy-toolnitc :: ToolContext :: opt_set_dummy_tool=
Option --set-dummy-toolnitc :: ToolContext :: opt_skip_dead_methods
--skip-dead-methodsnitc :: ToolContext :: opt_skip_dead_methods=
--skip-dead-methodsnitc :: ToolContext :: opt_skip_empty
Force formatting on empty lines.nitc :: ToolContext :: opt_skip_empty=
Force formatting on empty lines.nitc :: ToolContext :: opt_source
File pattern used to link documentation to source code.nitc :: ToolContext :: opt_source=
File pattern used to link documentation to source code.nitc :: ToolContext :: opt_static_types=
--static-typesnitc :: ToolContext :: opt_stop_on_first_error
Option --stop-on-first-errornitc :: ToolContext :: opt_stop_on_first_error=
Option --stop-on-first-errornitc :: ToolContext :: opt_stub_man=
Option --stub-mannitc :: ToolContext :: opt_substitute_monomorph
--substitute-monomorphnitc :: ToolContext :: opt_substitute_monomorph=
--substitute-monomorphnitc :: ToolContext :: opt_tables_metrics=
--tables-metricsnitc :: ToolContext :: opt_trace_memory=
--trace-memorynitc :: ToolContext :: opt_trampoline_call=
--trampoline-callnitc :: ToolContext :: opt_type_poset=
--type-posetnitc :: ToolContext :: opt_typing_test_metrics
--typing-test-metricsnitc :: ToolContext :: opt_typing_test_metrics=
--typing-test-metricsnitc :: ToolContext :: opt_verbose=
Option --verbosenitc :: ToolContext :: opt_version=
Option --versionnitc :: ToolContext :: opt_vim_autocomplete
Shall we generate the files for the Vim plugin?nitc :: ToolContext :: opt_vim_autocomplete=
Shall we generate the files for the Vim plugin?nitc :: ToolContext :: opt_warning=
Option --warningnitc :: ToolContext :: option_context=
Global OptionContextcore :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: ToolContext :: output_dir=
Output directory for metrics files.nitc :: ToolContext :: parallelization_phase
Transforms a function annotated with "threaded"nitc :: ToolContext :: parallelization_phase=
Transforms a function annotated with "threaded"nitc :: ToolContext :: parse_annotations_phase
Parse the annotations on modules, classdefs and propdefsnitc :: ToolContext :: parse_annotations_phase=
Parse the annotations on modules, classdefs and propdefsnitc :: ToolContext :: parse_classdef
Parse a full classdef given as a stringnitc :: ToolContext :: parse_expr
Parse a full expression given as a stringnitc :: ToolContext :: parse_module
Parse a full module given as a stringnitc :: ToolContext :: parse_propdef
Parse a full propdef given as a stringnitc :: ToolContext :: parse_something
Try to parse thestring
as something
nitc :: ToolContext :: parse_stmts
Parse a full statement block given as a stringnitc :: ToolContext :: parse_superclass
Parse a super class declarationnitc :: ToolContext :: phase_process_npropdef
Process the givenphase
on the npropdef
nitc :: ToolContext :: phased_modules
Set of already analyzed modules.nitc :: ToolContext :: phased_modules=
Set of already analyzed modules.nitc :: ToolContext :: phases_list
The list of registered phases in the application order.nitc :: ToolContext :: phases_list=
The list of registered phases in the application order.nitc :: ToolContext :: pkgconfig_is_available
Is the external programpkg-config
available?
nitc :: ToolContext :: pkgconfig_is_available=
Is the external programpkg-config
available?
nitc :: ToolContext :: pkgconfig_phase
Detects thepkgconfig
annotation on the module declaration only
nitc :: ToolContext :: pkgconfig_phase=
Detects thepkgconfig
annotation on the module declaration only
nitc :: ToolContext :: platform_from_name
Get platform compilation settings from itsname
nitc :: ToolContext :: platform_phase
Detects theplatform
annotation to set a mobile target platform
nitc :: ToolContext :: platform_phase=
Detects theplatform
annotation to set a mobile target platform
nitc :: ToolContext :: process_options
Parse and process the options given on the command linenitc :: ToolContext :: quit
Output all current stacked messages, total and exit the programnitc :: ToolContext :: readme_metrics_phase
README related metrics phasenitc :: ToolContext :: readme_metrics_phase=
README related metrics phasenitc :: ToolContext :: regex_phase=
Phase checking for errors in regexnitc :: ToolContext :: restful_phase
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: restful_phase=
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: rta_metrics_phase=
RTA related metrics phasenitc :: ToolContext :: run_global_phases
Runprocess_mainmodule
on all phases
nitc :: ToolContext :: run_phases
Run all registered phases on a set of modulesnitc :: ToolContext :: run_phases_on_npropdef
Run the phase on the given npropdef.nitc :: ToolContext :: scope_phase=
RunAPropdef::do_scope
on each propdef.
nitc :: ToolContext :: semantize_is_lazy
Isphase_process_npropdef
not called automatically by run_phases
?
nitc :: ToolContext :: semantize_is_lazy=
Isphase_process_npropdef
not called automatically by run_phases
?
nitc :: ToolContext :: serialization_phase_post_model
The second phase of the serializationnitc :: ToolContext :: serialization_phase_post_model=
The second phase of the serializationnitc :: ToolContext :: serialization_phase_pre_model
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: serialization_phase_pre_model=
Generate serialization and deserialization methods onauto_serializable
annotated classes.
nitc :: ToolContext :: serialization_phase_rename
Apply the annotationserialize_as
nitc :: ToolContext :: serialization_phase_rename=
Apply the annotationserialize_as
nitc :: ToolContext :: set_testing_path
Set theNIT_TESTING_PATH
environment variable with path
.
nitc :: ToolContext :: show_unit_status
Show a single-line status to use as a progression.nitc :: ToolContext :: simple_misc_analysis_phase
ExecuteAModule::do_simple_misc_analysis
on each module.
nitc :: ToolContext :: simple_misc_analysis_phase=
ExecuteAModule::do_simple_misc_analysis
on each module.
nitc :: ToolContext :: todo_nmodules
List of module to process according torun_phases
nitc :: ToolContext :: todo_nmodules=
List of module to process according torun_phases
nitc :: ToolContext :: tooldescription
Name, usage and synopsis of the tool.nitc :: ToolContext :: tooldescription=
Name, usage and synopsis of the tool.nitc :: ToolContext :: toolname
Get the name of the tool or "DUMMY_TOOL" id--set-dummy-tool
is set.
nitc :: ToolContext :: transform_phase
nitc :: ToolContext :: transform_phase=
nitc :: ToolContext :: typing_phase
nitc :: ToolContext :: typing_phase=
nitc :: ToolContext :: ulimit_file
The maximum size (in KB) of files written by a command executed troughsafe_exec
nitc :: ToolContext :: ulimit_file=
The maximum size (in KB) of files written by a command executed troughsafe_exec
nitc :: ToolContext :: ulimit_usertime
The maximum amount of cpu time (in seconds) for a command executed troughsafe_exec
nitc :: ToolContext :: ulimit_usertime=
The maximum amount of cpu time (in seconds) for a command executed troughsafe_exec
nitc :: ToolContext :: umlphase
Phase that generates UML diagrams from model entities.nitc :: ToolContext :: umlphase=
Phase that generates UML diagrams from model entities.nitc :: ToolContext :: verbose_level=
Verbose levelnitc :: ToolContext :: version
Get the currentnit_version
or "DUMMY_VERSION" if --set-dummy-tool
is set.
nitc :: ToolContext :: warning_blacklist
List of tags per source-file whose warnings are not displayed.nitc :: ToolContext :: warning_blacklist=
List of tags per source-file whose warnings are not displayed.nitc :: ToolContext :: warning_count=
Number of warnings
# Global context for tools
class ToolContext
# Number of errors
var error_count: Int = 0 is writable
# Number of warnings
var warning_count: Int = 0
# Directory where to generate log files
var log_directory: String = "logs"
# Stream in `log_directory` where all info messages are written
var log_info: nullable Writer = null
# Messages
private var messages = new Array[Message]
private var message_sorter: Comparator = default_comparator
# Does an error prevent the program to stop at `check_errors`?
#
# Default to false.
# Set this value to `true` if you need to keep the program going in case of error.
var keep_going = false is writable
# List of tags per source-file whose warnings are not displayed.
#
# Initially empty, it is up to the toll to fill it.
# The tag "all" means all warnings and advices.
var warning_blacklist = new MultiHashMap[SourceFile, String]
# Is the source-file of `l` associated with `tag` in `warning_blacklist`?
#
# currently returns `false` if `l` is null or does not have a source-file.
fun is_warning_blacklisted(l: nullable Location, tag: String): Bool
do
if l == null then return false
var f = l.file
if f == null then return false
var tags = warning_blacklist.get_or_null(f)
if tags == null then return false
return tags.has("all") or tags.has(tag)
end
# Output all current stacked messages, total and exit the program
#
# If there is no error, exit with 0, else exit with 1.
fun quit
do
check_errors
errors_info
if error_count > 0 then exit(1) else exit(0)
end
# Output all current stacked messages
#
# Return true if no errors occurred.
#
# If some errors occurred, the behavior depends on the value of `keep_going`.
# If `keep_going` is false, then the total error informations is displayed and the program exits.
# Else, false is returned.
fun check_errors: Bool
do
if messages.length > 0 then
message_sorter.sort(messages)
for m in messages do
if opt_no_color.value then
sys.stderr.write("{m}\n")
else
sys.stderr.write("{m.to_color_string}\n")
end
end
messages.clear
end
if error_count > 0 then
if not keep_going then
errors_info
exit(1)
end
return false
end
return true
end
# Display total error informations
fun errors_info
do
if error_count == 0 and warning_count == 0 then return
if opt_no_color.value then return
sys.stderr.write "Errors: {error_count}. Warnings: {warning_count}.\n"
end
# Display an error
#
# Return the message (to add information)
fun error(l: nullable Location, s: String): Message
do
var m = new Message(l, null, s, 2)
if messages.has(m) then return m
if l != null then l.add_message m
if opt_warn.value <= -1 then return m
messages.add m
error_count = error_count + 1
if opt_stop_on_first_error.value then check_errors
return m
end
# Add an error, show errors and quit
#
# Because the program will quit, nothing is returned.
fun fatal_error(l: nullable Location, s: String)
do
error(l,s)
check_errors
end
# Display a first-level warning.
#
# First-level warnings are warnings that SHOULD be corrected,
# and COULD usually be immediately corrected.
#
# * There is a simple correction
# * There is no reason to let the code this way (no reasonable @supresswarning-like annotation)
# * They always are real issues (no false positive)
#
# First-level warnings are displayed by default (except if option `-q` is given).
#
# Return the message (to add information) or null if the warning is disabled
fun warning(l: nullable Location, tag: String, text: String): nullable Message
do
if is_warning_blacklisted(l, tag) then return null
var m = new Message(l, tag, text, 1)
if messages.has(m) then return null
if l != null then l.add_message m
if opt_warning.value.has("no-{tag}") then return null
if not opt_warning.value.has(tag) and opt_warn.value <= 0 then return null
messages.add m
warning_count = warning_count + 1
if opt_stop_on_first_error.value then check_errors
return m
end
# Display a second-level warning.
#
# Second-level warnings are warnings that should require investigation,
# but cannot always be immediately corrected.
#
# * The correction could be complex. e.g. require a refactorisation or an API change.
# * The correction cannot be done. e.g. Code that use a deprecated API for some compatibility reason.
# * There is not a real issue (false positive). Note that this should be unlikely.
# * Transitional: While a real warning, it fires a lot in current code, so a transition is needed
# in order to fix them before promoting the advice to a warning.
#
# In order to prevent warning inflation Ă la Java, second-level warnings are not displayed by
# default and require an additional option `-W`.
#
# Return the message (to add information) or null if the warning is disabled
fun advice(l: nullable Location, tag: String, text: String): nullable Message
do
if is_warning_blacklisted(l, tag) then return null
var m = new Message(l, tag, text, 0)
if messages.has(m) then return null
if l != null then l.add_message m
if opt_warning.value.has("no-{tag}") then return null
if not opt_warning.value.has(tag) and opt_warn.value <= 1 then return null
messages.add m
warning_count = warning_count + 1
if opt_stop_on_first_error.value then check_errors
return m
end
# Display an info
fun info(s: String, level: Int)
do
if level <= verbose_level then
print "{s}"
end
if log_info != null then
log_info.write s
log_info.write "\n"
end
end
#Â Executes a program while checking if it's available and if the execution ended correctly
#
# Stops execution and prints errors if the program isn't available or didn't end correctly
fun exec_and_check(args: Array[String], error: String)
do
info("+ {args.join(" ")}", 2)
var prog = args.first
args.remove_at 0
# Is the wanted program available?
var proc_which = new ProcessReader.from_a("which", [prog])
proc_which.wait
var res = proc_which.status
if res != 0 then
print_error "{error}: executable \"{prog}\" not found"
exit 1
end
# Execute the wanted program
var proc = new Process.from_a(prog, args)
proc.wait
res = proc.status
if res != 0 then
print_error "{error}: execution of \"{prog} {args.join(" ")}\" failed"
exit 1
end
end
# Global OptionContext
var option_context = new OptionContext
# Option --warn
var opt_warn = new OptionCount("Show additional warnings (advices)", "-W", "--warn")
# Option --warning
var opt_warning = new OptionArray("Show/hide a specific warning", "-w", "--warning")
# Option --quiet
var opt_quiet = new OptionBool("Do not show warnings", "-q", "--quiet")
# Option --log
var opt_log = new OptionBool("Generate various log files", "--log")
# Option --log-dir
var opt_log_dir = new OptionString("Directory where to generate log files", "--log-dir")
# Option --nit-dir
var opt_nit_dir = new OptionString("Base directory of the Nit installation", "--nit-dir")
# Option --help
var opt_help = new OptionBool("Show Help (This screen)", "-h", "-?", "--help")
# Option --version
var opt_version = new OptionBool("Show version and exit", "--version")
# Option --set-dummy-tool
var opt_set_dummy_tool = new OptionBool("Set toolname and version to DUMMY. Useful for testing", "--set-dummy-tool")
# Option --verbose
var opt_verbose = new OptionCount("Additional messages from the tool", "-v", "--verbose")
# Option --stop-on-first-error
var opt_stop_on_first_error = new OptionBool("Just display the first encountered error then stop", "--stop-on-first-error")
# Option --keep-going
var opt_keep_going = new OptionBool("Continue after errors, whatever the consequences", "--keep-going")
# Option --no-color
var opt_no_color = new OptionBool("Do not use color to display errors and warnings", "--no-color")
# Option --bash-completion
var opt_bash_completion = new OptionBool("Generate bash_completion file for this program", "--bash-completion")
# Option --stub-man
var opt_stub_man = new OptionBool("Generate a stub manpage in pandoc markdown format", "--stub-man")
# Option --no-contract
var opt_no_contract = new OptionBool("Disable the contracts usage", "--no-contract")
# Option --full-contract
var opt_full_contract = new OptionBool("Enable all contracts usage", "--full-contract")
# Verbose level
var verbose_level: Int = 0
init
do
option_context.add_option(opt_warn, opt_warning, opt_quiet, opt_stop_on_first_error, opt_keep_going, opt_no_color, opt_log, opt_log_dir, opt_nit_dir, opt_help, opt_version, opt_set_dummy_tool, opt_verbose, opt_bash_completion, opt_stub_man, opt_no_contract, opt_full_contract)
# Hide some internal options
opt_stub_man.hidden = true
opt_bash_completion.hidden = true
opt_set_dummy_tool.hidden = true
end
# Name, usage and synopsis of the tool.
# It is mainly used in `usage`.
# Should be correctly set by the client before calling `process_options`
# A multi-line string is recommmended.
#
# eg. `"Usage: tool [OPTION]... [FILE]...\nDo some things."`
var tooldescription: String = "Usage: [OPTION]... [ARG]..." is writable
# Does `process_options` should accept an empty sequence of arguments.
# ie. nothing except options.
# Is `false` by default.
#
# If required, if should be set by the client before calling `process_options`
var accept_no_arguments = false is writable
# print the full usage of the tool.
# Is called by `process_option` on `--help`.
# It also could be called by the client.
fun usage
do
print tooldescription
option_context.usage
end
# Parse and process the options given on the command line
fun process_options(args: Sequence[String])
do
self.opt_warn.value = 1
# init options
option_context.parse(args)
if opt_help.value then
usage
exit 0
end
if opt_version.value then
print version
exit 0
end
if opt_bash_completion.value then
var bash_completion = new BashCompletion(self)
bash_completion.write_to(sys.stdout)
exit 0
end
if opt_stub_man.value then
print """
# NAME
{{{tooldescription.split("\n")[1]}}}
# SYNOPSYS
# OPTIONS
"""
for o in option_context.options do
var first = true
printn "### "
for n in o.names do
if first then first = false else printn ", "
printn "`{n}`"
end
print ""
print "{o.helptext}."
print ""
end
print """
# SEE ALSO
The Nit language documentation and the source code of its tools and libraries may be downloaded from <http://nitlanguage.org>"""
exit 0
end
var errors = option_context.errors
if not errors.is_empty then
for e in errors do print "Error: {e}"
print tooldescription
print "Use --help for help"
exit 1
end
nit_dir = locate_nit_dir
if option_context.rest.is_empty and not accept_no_arguments then
print tooldescription
print "Use --help for help"
exit 1
end
# Set verbose level
verbose_level = opt_verbose.value
if opt_keep_going.value then keep_going = true
if self.opt_quiet.value then self.opt_warn.value = 0
if opt_log_dir.value != null then log_directory = opt_log_dir.value.as(not null)
if opt_log.value then
# Make sure the output directory exists
log_directory.mkdir
# Redirect the verbose messages
log_info = (log_directory/"info.txt").to_path.open_wo
end
end
# Get the current `nit_version` or "DUMMY_VERSION" if `--set-dummy-tool` is set.
fun version: String do
if opt_set_dummy_tool.value then
return "DUMMY_VERSION"
end
return nit_version
end
# Get the name of the tool or "DUMMY_TOOL" id `--set-dummy-tool` is set.
fun toolname: String do
if opt_set_dummy_tool.value then
return "DUMMY_TOOL"
end
return sys.program_name.basename
end
# The identified root directory of the Nit package
#
# It is assignable but is automatically set by `process_options` with `locate_nit_dir`.
var nit_dir: nullable String = null is writable
# Guess a possible nit_dir.
#
# It uses, in order:
#
# * the option `opt_nit_dir`
# * the environment variable `NIT_DIR`
# * the runpath of the program from argv[0]
# * the runpath of the process from /proc
# * the search in PATH
#
# If there is errors (e.g. the indicated path is invalid) or if no
# path is found, then an error is displayed and the program exits.
#
# The result is returned without being assigned to `nit_dir`.
# This function is automatically called by `process_options`
fun locate_nit_dir: String
do
# the option has precedence
var res = opt_nit_dir.value
if res != null then
if not check_nit_dir(res) then
fatal_error(null, "Fatal Error: the value of --nit-dir does not seem to be a valid base Nit directory: {res}.")
end
return res
end
# then the environ variable has precedence
res = "NIT_DIR".environ
if not res.is_empty then
if not check_nit_dir(res) then
fatal_error(null, "Fatal Error: the value of NIT_DIR does not seem to be a valid base Nit directory: {res}.")
end
return res
end
# find the runpath of the program from argv[0]
res = "{sys.program_name.dirname}/.."
if check_nit_dir(res) then return res.simplify_path
# find the runpath of the process from /proc
var exe = "/proc/self/exe"
if exe.file_exists then
res = exe.realpath
res = res.dirname.join_path("..")
if check_nit_dir(res) then return res.simplify_path
end
# search in the PATH
var path_sep = if is_windows then ";" else ":"
var ps = "PATH".environ.split(path_sep)
for p in ps do
res = p/".."
if check_nit_dir(res) then return res.simplify_path
end
fatal_error(null, "Fatal Error: cannot locate a valid base Nit directory. It is quite unexpected. Try to set the environment variable `NIT_DIR` or to use the `--nit-dir` option.")
abort
end
private fun check_nit_dir(res: String): Bool
do
return res.file_exists and "{res}/src/nit.nit".file_exists
end
end
src/toolcontext.nit:143,1--634,3
redef class ToolContext
var opt_a = new OptionBool("option a, do nothing", "-a", "--option-a")
var opt_b = new OptionString("option b, do nothing", "-b", "--option-b")
var opt_c = new OptionBool("option c, do nothing", "-c")
redef init do
super
option_context.add_option(opt_a, opt_b, opt_c)
end
end
src/test_toolcontext.nit:20,1--29,3
redef class ToolContext
# Parse a full module given as a string
# Fatal error if the `string` is not a syntactically correct module
fun parse_module(string: String): AModule
do
var source = new SourceFile.from_string("", string)
var lexer = new Lexer(source)
var parser = new Parser(lexer)
var tree = parser.parse
var eof = tree.n_eof
if eof isa AError then
self.fatal_error(null, "Fatal Error: {eof.message}.")
abort
end
return tree.n_base.as(not null)
end
# Parse a full classdef given as a string
# Fatal error if the `string` is not a syntactically correct class definition
fun parse_classdef(string: String): AClassdef
do
var nmodule = parse_module(string)
var nclassdefs = nmodule.n_classdefs
if nclassdefs.length != 1 then
self.fatal_error(null, "Fatal Error: not a classdef.")
abort
end
return nclassdefs.first
end
# Parse a full propdef given as a string
# Fatal error if the `string` is not a syntactically correct property definition
fun parse_propdef(string: String): APropdef
do
var mod_string = "class Dummy\n{string}\nend"
var nclassdef = parse_classdef(mod_string)
var npropdefs = nclassdef.n_propdefs
if npropdefs.length != 1 then
self.fatal_error(null, "Fatal Error: not a propdef.")
abort
end
return npropdefs.first
end
# Parse a full statement block given as a string
# Fatal error if the `string` is not a syntactically correct statement block
fun parse_stmts(string: String): AExpr
do
var mod_string = "do\n{string}\nend"
var nmodule = parse_module(mod_string)
var nblock = nmodule.n_classdefs.first.n_propdefs.first.as(AMethPropdef).n_block.as(ABlockExpr).n_expr.first.as(ADoExpr).n_block.as(not null)
return nblock
end
# Parse a full expression given as a string
# Fatal error if the `string` is not a syntactically correct expression
fun parse_expr(string: String): AExpr
do
var mod_string = "var dummy = \n{string}"
var nmodule = parse_module(mod_string)
var nexpr = nmodule.n_classdefs.first.n_propdefs.first.as(AMethPropdef).n_block.as(ABlockExpr).n_expr.first.as(AVardeclExpr).n_expr.as(not null)
return nexpr
end
# Parse a super class declaration
# Fatal error if the `string` is not a syntactically correct super class declaration
fun parse_superclass(string: String): APropdef
do
var mod_string = "class Dummy\nsuper {string}\nend"
var nclassdef = parse_classdef(mod_string).as(AStdClassdef)
var nsuperclasses = nclassdef.n_propdefs
if nsuperclasses.length != 1 then
self.fatal_error(null, "Fatal Error: not a super class declaration.")
abort
end
return nsuperclasses.first
end
# Try to parse the `string` as something
#
# Returns the first possible syntacticaly correct type among:
#
# - a type `AType`
# - a single `Token`
# - an expression `AExpr`
# - a block of statements `ABlockExpr`
# - a full module `AModule`
# - a `AError` if nothing else matches
#
# var tc = new ToolContext
# assert tc.parse_something("foo") isa TId
# assert tc.parse_something("foo[bar]") isa AExpr
# assert tc.parse_something("Foo[Bar]") isa AType
# assert tc.parse_something("foo\nbar") isa ABlockExpr
# assert tc.parse_something("fun foo do bar\nfoo") isa AModule
# assert tc.parse_something("fun fun") isa AParserError
# assert tc.parse_something("?%^&") isa ALexerError
fun parse_something(string: String): ANode
do
var source = new SourceFile.from_string("", string)
var error
var tree
var eof
var lexer
lexer = new InjectedLexer(source)
lexer.injected_before.add new TKwvar
lexer.injected_before.add new TId
lexer.injected_before.add new TColumn
lexer.injected_before.add new TClassid
lexer.injected_before.add new TObra
lexer.injected_after.add new TCbra
tree = (new Parser(lexer)).parse
eof = tree.n_eof
if not eof isa AError then
var ntype = tree.n_base.n_classdefs.first.n_propdefs.first.as(AMethPropdef).n_block.as(ABlockExpr).n_expr.first.as(AVardeclExpr).n_type.n_types.first
ntype.parent = null
return ntype
end
error = eof
lexer = new Lexer(source)
var first = lexer.next
if first isa EOF then return first
var second = lexer.next
if second isa EOF and not second isa AError then
first.parent = null
return first
end
lexer = new InjectedLexer(source)
lexer.injected_before.add new TKwvar
lexer.injected_before.add new TId
lexer.injected_before.add new TAssign
lexer.injected_before.add new TOpar
lexer.injected_after.add new TCpar
tree = (new Parser(lexer)).parse
eof = tree.n_eof
if not eof isa AError then
var nexpr = tree.n_base.n_classdefs.first.n_propdefs.first.as(AMethPropdef).n_block.as(ABlockExpr).n_expr.first.as(AVardeclExpr).n_expr.as(AParExpr).n_expr
nexpr.parent = null
return nexpr
end
if eof.location > error.location then error = eof
lexer = new InjectedLexer(source)
lexer.injected_before.add new TKwdo
lexer.injected_before.add new TEol
lexer.injected_after.add new TEol
lexer.injected_after.add new TKwend
tree = (new Parser(lexer)).parse
eof = tree.n_eof
if not eof isa AError then
var nblock = tree.n_base.n_classdefs.first.n_propdefs.first.as(AMethPropdef).n_block.as(ABlockExpr).n_expr.first.as(ADoExpr).n_block.as(ABlockExpr)
nblock.n_kwend = null # drop injected token
nblock.parent = null
return nblock
end
if eof.location > error.location then error = eof
lexer = new Lexer(source)
tree = (new Parser(lexer)).parse
eof = tree.n_eof
if not eof isa AError then
return tree.n_base.as(not null)
end
if eof.location > error.location then error = eof
return error
end
# Parse the input of the user as something
fun interactive_parse(prompt: String): ANode
do
var oldtext = ""
loop
printn prompt
printn " "
var s = sys.stdin.read_line
if s == "" then continue
if s.chars.first == ':' then
var res = new TString
res.text = s
return res
end
var text = oldtext + s + "\n"
oldtext = ""
var n = parse_something(text)
if n isa AParserError and n.token isa EOF then
# Unexpected end of file, thus continuing
if oldtext == "" then prompt = "." * prompt.length
oldtext = text
continue
end
return n
end
end
end
src/parser_util.nit:21,1--223,3
redef class ToolContext
# The various registered phases to performs
# The order in the poset is the dependence of phases
#
# While you can directly modify the poset (nodes and edges),
# it is often simpler to use the constructor in `Phase`
var phases = new POSet[Phase]
# --disable-phase
var opt_disable_phase = new OptionArray("Disable a specific phase; use `list` to get the list (debug)", "--disable-phase")
# --sloppy
var opt_sloppy = new OptionBool("Force lazy semantic analysis of the source-code (debug)", "--sloppy")
redef init
do
super
option_context.add_option(opt_disable_phase, opt_sloppy)
end
redef fun process_options(args)
do
super
for v in opt_disable_phase.value do
if v == "list" then
for p in phases_list do
var deps = p.in_hierarchy.direct_greaters
if deps.is_empty then
print p
else
print "{p} (dep: {deps.join(", ")})"
end
end
exit 0
end
var found = false
for p in phases do
if v != p.to_s then continue
found = true
p.disabled = true
end
if not found then fatal_error(null, "Error: no phase named `{v}`. Use `list` to list all phases.")
end
if opt_sloppy.value then semantize_is_lazy = true
end
# The list of registered phases in the application order.
var phases_list: Sequence[Phase] is lazy do
var phases = self.phases.to_a
self.phases.sort(phases)
return phases
end
# Is `phase_process_npropdef` not called automatically by `run_phases`?
#
# When set to true, it is the responsibility of the tools
#
# Is false by default.
var semantize_is_lazy = false is writable
# Set of already analyzed modules.
private var phased_modules = new HashSet[AModule]
# List of module to process according to `run_phases`
#
# This allow some new modules to be found and added while analysing the code.
var todo_nmodules: Sequence[AModule]
# Run all registered phases on a set of modules
fun run_phases(nmodules: Collection[AModule])
do
var time0 = get_time
self.info("*** SEMANTIC ANALYSIS ***", 1)
#phases.show_dot
var phases = phases_list
for phase in phases do
self.info(" registered phases: {phase}", 2)
end
var todo_nmodules = nmodules.to_a
self.todo_nmodules = todo_nmodules
while not todo_nmodules.is_empty do
var nmodule = todo_nmodules.shift
if phased_modules.has(nmodule) then continue
phased_modules.add nmodule
self.info("Semantic analysis module {nmodule.location.file.filename}", 2)
var vannot = new AnnotationPhaseVisitor
vannot.enter_visit(nmodule)
for phase in phases do
if phase.disabled then continue
assert phase.toolcontext == self
var errcount = self.error_count
phase.process_nmodule(nmodule)
if errcount != self.error_count then
self.check_errors
end
errcount = self.error_count
for nclassdef in nmodule.n_classdefs do
assert phase.toolcontext == self
phase.process_nclassdef(nclassdef)
if not semantize_is_lazy then for npropdef in nclassdef.n_propdefs do
assert phase.toolcontext == self
phase_process_npropdef(phase, npropdef)
end
end
if errcount != self.error_count then
self.check_errors
end
for na in vannot.annotations do
var p = na.parent
if p isa AAnnotations then p = p.parent
assert p != null
phase.process_annotated_node(p, na)
end
if errcount != self.error_count then
self.check_errors
end
phase.process_nmodule_after(nmodule)
end
self.check_errors
end
var time1 = get_time
self.info("*** END SEMANTIC ANALYSIS: {time1-time0} ***", 2)
self.check_errors
end
# Process the given `phase` on the `npropdef`
# Called by `run_phases`
protected fun phase_process_npropdef(phase: Phase, npropdef: APropdef)
do
phase.process_npropdef(npropdef)
end
# Run the phase on the given npropdef.
# Does nothing if `semantize_is_lazy` is false.
fun run_phases_on_npropdef(npropdef: APropdef)
do
if not semantize_is_lazy then return
if npropdef.is_phased then return
npropdef.is_phased = true
#self.info("Semantic analysis of property {npropdef.location.file.filename}", 0)
var phases = phases_list
for phase in phases do
if phase.disabled then continue
assert phase.toolcontext == self
phase_process_npropdef(phase, npropdef)
self.check_errors
end
end
end
src/phase.nit:22,1--185,3
redef class ToolContext
# The modelbuilder 1-to-1 associated with the toolcontext
fun modelbuilder: ModelBuilder do return modelbuilder_real.as(not null)
private var modelbuilder_real: nullable ModelBuilder = null
end
src/modelbuilder_base.nit:33,1--40,3
redef class ToolContext
# Execute `AModule::do_simple_misc_analysis` on each module.
var simple_misc_analysis_phase: Phase = new SimpleMiscAnalysisPhase(self, null)
end
src/frontend/simple_misc_analysis.nit:26,1--29,3
redef class ToolContext
# Parses literal values in the whole AST and produces errors if needed
var literal_phase: Phase = new LiteralPhase(self, null)
end
src/literal.nit:22,1--25,3
redef class ToolContext
# Option --path
var opt_path = new OptionArray("Add an additional include path (may be used more than once)", "-I", "--path")
# Option --only-metamodel
var opt_only_metamodel = new OptionBool("Stop after meta-model processing", "--only-metamodel")
# Option --only-parse
var opt_only_parse = new OptionBool("Only proceed to parse files", "--only-parse")
redef init
do
super
option_context.add_option(opt_path, opt_only_parse, opt_only_metamodel)
end
end
src/loader.nit:44,1--59,3
redef class ToolContext
# Shader code validation phase
var glsl_validation_phase: Phase = new GLSLValidationPhase(self, [literal_phase])
end
src/frontend/glsl_validation.nit:25,1--28,3
redef class ToolContext
# Option --ignore-visibility
var opt_ignore_visibility = new OptionBool("Do not check, and produce errors, on visibility issues", "--ignore-visibility")
redef init
do
super
option_context.add_option(opt_ignore_visibility)
end
# Combine module to make a single one if required.
fun make_main_module(mmodules: Array[MModule]): MModule
do
assert not mmodules.is_empty
var mainmodule
# We need a main module, so we build it by importing all modules
mainmodule = new MModule(modelbuilder.model, null, mmodules.first.name + "-m", new Location(mmodules.first.location.file, 0, 0, 0, 0))
mainmodule.is_fictive = true
mainmodule.first_real_mmodule = mmodules.first.first_real_mmodule
mainmodule.set_imported_mmodules(mmodules)
modelbuilder.apply_conditional_importations(mainmodule)
if mainmodule.in_importation.direct_greaters.length == 1 and mainmodule.in_importation.direct_greaters.first == mmodules.first then
# Drop the fictive module if not needed
mainmodule = mmodules.first
else
# Or else run phases on it
modelbuilder.run_phases
end
return mainmodule
end
# Run `process_mainmodule` on all phases
fun run_global_phases(mmodules: Array[MModule])
do
if not mmodules.is_empty then
var mainmodule = make_main_module(mmodules)
for phase in phases_list do
if phase.disabled then continue
phase.process_mainmodule(mainmodule, mmodules)
end
end
check_errors
errors_info
end
end
src/modelbuilder.nit:26,1--71,3
redef class ToolContext
var default_phase = new DefaultPhase(self, null)
end
src/test_phase.nit:25,1--27,3
redef class ToolContext
# --mixin
var opt_mixins = new OptionArray("Additional module to mix-in", "-m", "--mixin")
# --define
var opt_defines = new OptionArray("Define a specific property", "-D", "--define")
redef init
do
super
option_context.add_option(opt_mixins, opt_defines)
end
redef fun make_main_module(mmodules)
do
var mixins = opt_mixins.value
if not mixins.is_empty then
mmodules.add_all modelbuilder.parse(opt_mixins.value)
modelbuilder.run_phases
end
var mainmodule = super
var defines = opt_defines.value
if not defines.is_empty then
var location = mainmodule.location
var model = mainmodule.model
# Create a fictive module if needed
if mainmodule == mmodules.first then
mainmodule = new MModule(model, null, mainmodule.name + "-d", location)
mainmodule.set_imported_mmodules(mmodules)
mainmodule.is_fictive = true
mainmodule.first_real_mmodule = mmodules.first
end
var recv = mainmodule.sys_type
assert recv != null
var mclassdef = new MClassDef(mainmodule, recv, location)
mclassdef.add_in_hierarchy
for define in defines do
var spl = define.split_once_on('=')
var name = spl.first
var val = null
if spl.length > 1 then val = spl[1]
var prop = mainmodule.try_get_primitive_method(name, recv.mclass)
if prop == null then
error(null, "Error: --define: no top-level function `{name}`.")
continue
end
var ret = prop.intro.msignature.return_mtype
var v
if ret == null then
error(null, "Error: --define: method `{prop}` is not a function.")
continue
else if ret.to_s == "Bool" then
if val == null or val == "true" then
v = true
else if val == "false" then
v = false
else
error(null, "Error: --define: method `{prop}` needs a Bool.")
continue
end
else if ret.to_s == "Int" then
if val != null and val.is_numeric then
v = val.to_i
else
error(null, "Error: --define: method `{prop}` needs a Int.")
continue
end
else if ret.to_s == "String" then
if val != null then
v = val
else
error(null, "Error: --define: method `{prop}` needs a String.")
continue
end
else
error(null, "Error: --define: method `{prop}` returns an unsupported type `{ret}`.")
continue
end
var pd = new MMethodDef(mclassdef, prop, location)
pd.msignature = prop.intro.msignature
pd.constant_value = v
end
check_errors
end
return mainmodule
end
end
src/mixin.nit:22,1--113,3
redef class ToolContext
# Run `AModule::build_classes` on each module
var modelize_class_phase: Phase = new ModelizeClassPhase(self, null)
end
src/modelize/modelize_class.nit:22,1--25,3
redef class ToolContext
# Run `APropdef::do_scope` on each propdef.
var scope_phase: Phase = new ScopePhase(self, null)
end
src/semantize/scope.nit:23,1--26,3
redef class ToolContext
# --all
var opt_all = new OptionBool("Compute all metrics", "--all")
# --mmodules
var opt_mmodules = new OptionBool("Compute metrics about mmodules", "--mmodules")
# --mclassses
var opt_mclasses = new OptionBool("Compute metrics about mclasses", "--mclasses")
# --mendel
var opt_mendel = new OptionBool("Compute mendel metrics", "--mendel")
# --inheritance
var opt_inheritance = new OptionBool("Compute metrics about inheritance usage", "--inheritance")
# --genericity
var opt_refinement = new OptionBool("Compute metrics about refinement usage", "--refinement")
# --self
var opt_self = new OptionBool("Compute metrics about the usage of explicit and implicit self", "--self")
# --ast
var opt_ast = new OptionBool("Compute metrics about the usage of nodes and identifiers in the AST", "--ast")
# --nullables
var opt_nullables = new OptionBool("Compute metrics on nullables send", "--nullables")
# --static-types
var opt_static_types = new OptionBool("Compute explicit static types metrics", "--static-types")
# --tables
var opt_tables = new OptionBool("Compute tables metrics", "--tables")
# --rta
var opt_rta = new OptionBool("Compute RTA metrics", "--rta")
# --readme
var opt_readme = new OptionBool("Compute ReadMe metrics", "--readme")
# --generate-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 opt_poset = new OptionBool("Complete metrics on posets", "--poset")
# --no-colors
var opt_nocolors = new OptionBool("Disable colors in console outputs", "--no-colors")
# --dir
var opt_dir = new OptionString("Directory where some statistics files are generated", "-d", "--dir")
# Output directory for metrics files.
var output_dir: String = "."
redef init
do
super
self.option_context.add_option(opt_all)
self.option_context.add_option(opt_mmodules)
self.option_context.add_option(opt_mclasses)
self.option_context.add_option(opt_mendel)
self.option_context.add_option(opt_inheritance)
self.option_context.add_option(opt_refinement)
self.option_context.add_option(opt_self)
self.option_context.add_option(opt_ast)
self.option_context.add_option(opt_nullables)
self.option_context.add_option(opt_static_types)
self.option_context.add_option(opt_tables)
self.option_context.add_option(opt_rta)
self.option_context.add_option(opt_readme)
self.option_context.add_option(opt_csv)
self.option_context.add_option(opt_generate_hyperdoc)
self.option_context.add_option(opt_poset)
self.option_context.add_option(opt_dir)
self.option_context.add_option(opt_nocolors)
end
redef fun process_options(args)
do
super
var val = self.opt_dir.value
if val != null then
val = val.simplify_path
val.mkdir
self.output_dir = val
end
end
# Format and colorize a string heading of level 1 for console output.
#
# Default style is yellow and bold.
fun format_h1(str: String): String do
if opt_nocolors.value then return str
return str.yellow.bold
end
# Format and colorize a string heading of level 2 for console output.
#
# Default style is white and bold.
fun format_h2(str: String): String do
if opt_nocolors.value then return str
return str.bold
end
# Format and colorize a string heading of level 3 for console output.
#
# Default style is white and nobold.
fun format_h3(str: String): String do
if opt_nocolors.value then return str
return str
end
# Format and colorize a string heading of level 4 for console output.
#
# Default style is green.
fun format_h4(str: String): String do
if opt_nocolors.value then return str
return str.green
end
# Format and colorize a string heading of level 5 for console output.
#
# Default style is light gray.
fun format_p(str: String): String do
if opt_nocolors.value then return str
return str.light_gray
end
end
src/metrics/metrics_base.nit:26,1--143,3
redef class ToolContext
# --all
var opt_all = new OptionBool("Print all code smells for top 10 class", "--all")
# --get-all
var opt_get_all = new OptionBool("Print all code smells for all class", "--get-all")
# --feature-envy
var opt_feature_envy = new OptionBool("Print feature envy", "--feature-envy")
# --large-class
var opt_large_class = new OptionBool("Print large class", "--large-class")
# --long-methods
var opt_long_method = new OptionBool("Print long method", "--long-methods")
# --no-abstract-implementation
var opt_no_abstract_implementation = new OptionBool("Print the no implemented abstract method", "--no-abstract-implementation")
# --long-params
var opt_long_params = new OptionBool("Print long parameters", "--long-params")
# --move-generics
var opt_move_generics = new OptionBool("Print the move proposition for generic class", "--move-generics")
# --move-generics
var opt_long_method_threshold = new OptionInt("Select long method threshold", 0 ,"--long-method-threshold")
# --long-method-threshold
var opt_long_params_threshold = new OptionInt("Select long method parameters threshold", 0 ,"--long-params-threshold")
# --long-params-threshold
var opt_nocolors = new OptionBool("Disable colors in console outputs", "--no-colors")
redef init
do
super
self.option_context.add_option(opt_all)
self.option_context.add_option(opt_large_class)
self.option_context.add_option(opt_get_all)
self.option_context.add_option(opt_feature_envy)
self.option_context.add_option(opt_long_method)
self.option_context.add_option(opt_no_abstract_implementation)
self.option_context.add_option(opt_long_params)
self.option_context.add_option(opt_long_method_threshold)
self.option_context.add_option(opt_long_params_threshold)
self.option_context.add_option(opt_move_generics)
self.option_context.add_option(opt_nocolors)
end
# Format and colorize a string heading of level 1 for console output.
#
# Default style is yellow and bold.
fun format_h1(str: String): String do
if opt_nocolors.value then return str
return str.yellow.bold
end
# Format and colorize a string heading of level 2 for console output.
#
# Default style is white and bold.
fun format_h2(str: String): String do
if opt_nocolors.value then return str
return str.bold
end
# Format and colorize a string heading of level 3 for console output.
#
# Default style is white and nobold.
fun format_h3(str: String): String do
if opt_nocolors.value then return str
return str
end
# Format and colorize a string heading of level 4 for console output.
#
# Default style is green.
fun format_h4(str: String): String do
if opt_nocolors.value then return str
return str.green
end
# Format and colorize a string heading of level 5 for console output.
#
# Default style is light gray.
fun format_p(str: String): String do
if opt_nocolors.value then return str
return str.light_gray
end
end
src/metrics/nitsmell_toolcontext.nit:23,1--103,3
redef class ToolContext
# The working directory used to store temp files.
var opt_dir = new OptionString("Working directory (default is '.nitpretty')", "--dir")
# Output pretty printed code with this filename.
var opt_output = new OptionString("Output name (default is pretty.nit)", "-o",
"--output")
# Show diff between source and pretty printed code.
var opt_diff = new OptionBool("Show diff between source and output", "--diff")
# Show diff between source and pretty printed code using meld.
var opt_meld = new OptionBool("Show diff between source and output using meld",
"--meld")
# --line-width
var opt_line_width = new OptionInt("Maximum length of lines (use 0 to disable automatic line breaks)", 80, "--line-width")
# --no-inline
var opt_no_inline = new OptionBool("Disable automatic one-liners", "--no-inline")
# Break too long string literals.
var opt_break_str = new OptionBool("Break too long string literals", "--break-strings")
# Force `do` on the same line as the method signature.
var opt_inline_do = new OptionBool("Force do keyword on the same line as the method signature",
"--inline-do")
# Force formatting on 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 will put empty lines to separate properties and code blocks.
var opt_skip_empty = new OptionBool("Force formatting of empty lines", "--skip-empty")
# Check formatting instead of pretty printing.
#
# 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.
var opt_check = new OptionBool("Check format of Nit source files", "--check")
end
src/nitpretty.nit:20,1--61,3
redef class ToolContext
# Phase that assign a `FFILanguage` to all `AExternCodeBlock`
var ffi_language_assignation_phase: Phase = new FFILanguageAssignationPhase(self, null)
end
src/ffi/light_ffi_base.nit:25,1--28,3
redef class ToolContext
# The phase should be executed before any warning on the module is processed.
var no_warning_phase: Phase = new NoWarningPhase(self, [literal_phase])
end
src/frontend/no_warning.nit:21,1--24,3
redef class ToolContext
# Run `APropdef::do_flow` on each propdef
var flow_phase: Phase = new FlowPhase(self, [scope_phase])
end
src/semantize/flow.nit:22,1--25,3
redef class ToolContext
# Check for unknown annotation in each module
var check_annotation_phase: Phase = new CheckAnnotationPhase(self, null)
end
src/frontend/check_annotation.nit:24,1--27,3
redef class ToolContext
var ast_metrics_phase: Phase = new AstMetricsPhase(self, null)
end
src/metrics/ast_metrics.nit:21,1--23,3
redef class ToolContext
# --detect-variance-constraints
var opt_detect_variance_constraints = new OptionBool("Detect the definition-site variance constraints on formal parameters", "--detect-variance-constraints")
# The DetectVarianceConstraints phase
var detect_variance_constraints_phase: Phase = new DetectVarianceConstraintsPhase(self, null)
end
src/metrics/detect_variance_constraints.nit:33,1--39,3
redef class ToolContext
var model_hyperdoc_phase: Phase = new ModelHyperdocPhase(self, null)
end
src/metrics/model_hyperdoc.nit:22,1--24,3
redef class ToolContext
var poset_metrics_phase: Phase = new PosetMetricsPhase(self, null)
end
src/metrics/poset_metrics.nit:20,1--22,3
redef class ToolContext
var refinement_metrics_phase: Phase = new RefinementMetricsPhase(self, null)
end
src/metrics/refinement_metrics.nit:23,1--25,3
redef class ToolContext
var self_metrics_phase: Phase = new SelfMetricsPhase(self, null)
end
src/metrics/self_metrics.nit:22,1--24,3
redef class ToolContext
var tables_metrics_phase: Phase = new TablesMetricsPhase(self, null)
end
src/metrics/tables_metrics.nit:22,1--24,3
redef class ToolContext
var generate_hierarchies_phase: Phase = new GenerateHierarchyPhase(self, null)
end
src/metrics/generate_hierarchies.nit:24,1--26,3
redef class ToolContext
# Run `APropdef::do_local_var_init` on each propdef
var local_var_init_phase: Phase = new LocalVarInitPhase(self, [flow_phase])
end
src/semantize/local_var_init.nit:23,1--26,3
redef class ToolContext
# Run `AClassdef::build_property` on the classdefs of each module
var modelize_property_phase: Phase = new ModelizePropertyPhase(self, [modelize_class_phase])
end
src/modelize/modelize_property.nit:23,1--26,3
redef class ToolContext
# Parse the annotations on modules, classdefs and propdefs
var parse_annotations_phase: Phase = new ParseAnnotationsPhase(self,
[modelize_class_phase, modelize_property_phase])
end
src/frontend/parse_annotations.nit:40,1--44,3
redef class ToolContext
# Main phase of `deriving`
var deriving_phase: Phase = new DerivingPhase(self, null)
end
src/frontend/deriving.nit:28,1--31,3
redef class ToolContext
# Phase checking for errors in regex
var regex_phase: Phase = new RegexPhase(self, [literal_phase])
end
src/frontend/regex_phase.nit:22,1--26,3
redef class ToolContext
# Apply the annotation `serialize_as`
var serialization_phase_rename: Phase = new SerializationPhaseRename(self, null)
# Generate serialization and deserialization methods on `auto_serializable` annotated classes.
var serialization_phase_pre_model: Phase = new SerializationPhasePreModel(self,
[serialization_phase_rename])
end
src/frontend/serialization_model_phase.nit:27,1--35,3
redef class ToolContext
# Detects the `platform` annotation to set a mobile target platform
var platform_phase: Phase = new PlatformPhase(self, [modelize_property_phase])
# Get platform compilation settings from its `name`
protected fun platform_from_name(name: String): nullable Platform
do
return null
end
end
src/platform/platform.nit:25,1--34,3
redef class ToolContext
# opt --full
var opt_full = new OptionBool("Process also imported modules", "--full")
# opt --output
var opt_output = new OptionString("Output name (default is 'nitunit.xml')", "-o", "--output")
# opt --dirr
var opt_dir = new OptionString("Working directory (default is '.nitunit')", "--dir")
# opt --no-act
var opt_noact = new OptionBool("Does not compile and run tests", "--no-act")
# opt --nitc
var opt_nitc = new OptionString("nitc compiler to use", "--nitc")
# opt --no-time
var opt_no_time = new OptionBool("Disable time information in XML", "--no-time")
# Working directory for testing.
fun test_dir: String do
var dir = opt_dir.value
if dir == null then return "nitunit.out"
return dir
end
# Search the `nitc` compiler to use
#
# If not `nitc` is suitable, then prints an error and quit.
fun find_nitc: String
do
var nitc = opt_nitc.value
if nitc != null then
if not nitc.file_exists then
fatal_error(null, "error: cannot find `{nitc}` given by --nitc.")
abort
end
return nitc
end
nitc = "NITC".environ
if nitc != "" then
if not nitc.file_exists then
fatal_error(null, "error: cannot find `{nitc}` given by NITC.")
abort
end
return nitc
end
var nit_dir = nit_dir or else "."
nitc = nit_dir / "bin/nitc"
if not nitc.file_exists then
fatal_error(null, "Error: cannot find nitc. Set envvar NIT_DIR or NITC or use the --nitc option.")
abort
end
return nitc
end
# Execute a system command in a more safe context than `Sys::system`.
fun safe_exec(command: String): Int
do
info(command, 2)
var real_command = """
bash -c "
ulimit -f {{{ulimit_file}}} 2> /dev/null
ulimit -t {{{ulimit_usertime}}} 2> /dev/null
{{{command}}}
"
"""
return system(real_command)
end
# The maximum size (in KB) of files written by a command executed trough `safe_exec`
#
# Default: 64MB
var ulimit_file = 65536 is writable
# The maximum amount of cpu time (in seconds) for a command executed trough `safe_exec`
#
# Default: 10 CPU minute
var ulimit_usertime = 600 is writable
# Show a single-line status to use as a progression.
#
# If `has_progress_bar` is true, then the output is a progress bar.
# The printed the line starts with `'\r'` and is not ended by a `'\n'`.
# So it is expected that:
# * no other output is printed between two calls
# * the last `show_unit_status` is followed by a new-line
#
# If `has_progress_bar` is false, then only the first and last state is shown
fun show_unit_status(name: String, tests: SequenceRead[UnitTest])
do
var line = "\r\x1B[K==== {name} ["
var done = tests.length
var fails = 0
for t in tests do
if not t.is_done then
line += " "
done -= 1
else if t.error == null then
line += ".".green.bold
else
line += "X".red.bold
fails += 1
end
end
if not has_progress_bar then
if done == 0 then
print "==== {name} | tests: {tests.length}"
end
return
end
if done < tests.length then
line += "] {done}/{tests.length}"
else
line += "] tests: {tests.length} "
if fails == 0 then
line += "OK".green.bold
else
line += "KO: {fails}".red.bold
end
end
printn "{line}"
end
# Is a progress bar printed?
#
# true if color (because and non-verbose mode
# (because verbose mode messes up with the progress bar).
fun has_progress_bar: Bool
do
return not opt_no_color.value and opt_verbose.value <= 0
end
# Clear the line if `has_progress_bar` (no-op else)
fun clear_progress_bar
do
if has_progress_bar then printn "\r\x1B[K"
end
# Show the full description of the test-case.
#
# The output honors `--no-color`.
#
# `more message`, if any, is added after the error message.
fun show_unit(test: UnitTest, more_message: nullable String) do
print test.to_screen(more_message, not opt_no_color.value)
end
# Set the `NIT_TESTING_PATH` environment variable with `path`.
#
# If `path == null` then `NIT_TESTING_PATH` is set with the empty string.
fun set_testing_path(path: nullable String) do
"NIT_TESTING_PATH".setenv(path or else "")
end
end
src/testing/testing_base.nit:23,1--176,3
redef class ToolContext
# Phase generating the files for the Vim plugin
var autocomplete_phase: Phase = new AutocompletePhase(self, [modelize_class_phase])
# Shall we generate the files for the Vim plugin?
var opt_vim_autocomplete = new OptionBool(
"Generate metadata files used by the Vim plugin for autocompletion", "--vim-autocomplete")
init
do
super
option_context.add_option opt_vim_autocomplete
opt_vim_autocomplete.hidden = true
end
end
src/doc/vim_autocomplete.nit:36,1--50,3
redef class ToolContext
# Generate actors
var actor_phase: Phase = new ActorPhase(self, [modelize_class_phase, modelize_property_phase])
end
src/frontend/actors_generation_phase.nit:293,1--296,3
redef class ToolContext
var static_types_metrics_phase: Phase = new StaticTypesMetricsPhase(self, null)
end
src/metrics/static_types_metrics.nit:23,1--25,3
redef class ToolContext
var extern_classes_typing_phase_ast: Phase = new ExternClassesTypingPhaseAst(self, [ffi_language_assignation_phase, modelize_class_phase])
var extern_classes_typing_phase_model: Phase = new ExternClassesTypingPhaseModel(self,
[extern_classes_typing_phase_ast, modelize_class_phase, modelize_property_phase])
end
src/ffi/extern_classes.nit:23,1--28,3
redef class ToolContext
# The second phase of the serialization
var serialization_phase_post_model: Phase = new SerializationPhasePostModel(self,
[modelize_property_phase, serialization_phase_pre_model])
end
src/frontend/serialization_code_gen_phase.nit:20,1--25,3
redef class ToolContext
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 the skeleton, do not write any file", "--only-show")
end
src/testing/testing_gen.nit:175,1--180,3
redef class ToolContext
# MClass related metrics phase
var mclasses_metrics_phase: Phase = new MClassesMetricsPhase(self, null)
end
src/metrics/mclasses_metrics.nit:23,1--27,3
redef class ToolContext
# MModules related metrics phase
var mmodules_metrics_phase: Phase = new MModulesMetricsPhase(self, null)
end
src/metrics/mmodules_metrics.nit:23,1--27,3
redef class ToolContext
# README related metrics phase
var readme_metrics_phase: Phase = new ReadmeMetricsPhase(self, null)
end
src/metrics/readme_metrics.nit:24,1--28,3
redef class ToolContext
var typing_phase: Phase = new TypingPhase(self, [flow_phase, modelize_property_phase, local_var_init_phase])
end
src/semantize/typing.nit:25,1--27,3
redef class ToolContext
# --pattern
var opt_pattern = new OptionString("Only run test case with name that match pattern", "-p", "--pattern")
# --autosav
var opt_autosav = new OptionBool("Automatically create/update .res files for black box testing", "--autosav")
end
src/testing/testing_suite.nit:23,1--28,3
redef class ToolContext
# Phase that inject `super` in constructors that need it.
var auto_super_init_phase: Phase = new AutoSuperInitPhase(self, [typing_phase])
end
src/semantize/auto_super_init.nit:24,1--27,3
redef class ToolContext
# Phase modifying the AST to explain assets when they fail
var explain_assert_phase: Phase = new ExplainAssertPhase(self, [modelize_class_phase, typing_phase, literal_phase])
end
src/frontend/explain_assert.nit:41,1--45,3
redef class ToolContext
# Inheritance related metrics phase
var inheritance_metrics_phase: Phase = new InheritanceMetricsPhase(self, null)
end
src/metrics/inheritance_metrics.nit:24,1--28,3
redef class ToolContext
# Compute MENDEL metrics.
#
# See `mendel_metrics` module documentation.
var mendel_metrics_phase: Phase = new MendelMetricsPhase(self, null)
end
src/metrics/mendel_metrics.nit:51,1--56,3
# Note, `ToolContext` is the main overlord class
# Among its jobs, it orchestrates and executes the various phases
redef class ToolContext
# Instantiate a new specific phase `div_by_zero_phase`
# It must be executed after the two phases `literal_phase` and `typing_phase`
# Those two phases are statically known since they are introduced by the modules `literal` and `typing`
# Note that the constructor automatically register the phase to the ToolContext; this explains why there is `self`
var div_by_zero_phase: Phase = new DivByZeroPhase(self, [literal_phase, typing_phase])
end
src/frontend/div_by_zero.nit:22,1--30,3
redef class ToolContext
# Main phase of `language`
var localize_phase: Phase = new I18NPhase(self, [literal_phase])
end
src/frontend/i18n_phase.nit:23,1--26,3
redef class ToolContext
# Transforms a function annotated with "threaded"
var parallelization_phase: Phase = new ParallelizationPhase(self, null)
end
src/frontend/parallelization_phase.nit:26,1--29,3
redef class ToolContext
# --detect-variance-constraints
var opt_detect_covariance = new OptionBool("Detect the static covariance usages", "--detect-covariance")
# Phase that intercepts static type tests then display statistics about covariance
private var detect_covariance_phase = new DetectCovariancePhase(self, null)
end
src/metrics/detect_covariance.nit:27,1--33,3
redef class ToolContext
var transform_phase: Phase = new TransformPhase(self, [typing_phase, auto_super_init_phase])
# --no-shortcut-range
var opt_no_shortcut_range: OptionBool = new OptionBool("Always instantiate a range and its iterator on 'for' loops", "--no-shortcut-range")
redef init
do
super
self.option_context.add_option(self.opt_no_shortcut_range)
end
end
src/transform.nit:24,1--35,3
redef class ToolContext
var verify_nitni_callback_phase: Phase = new VerifyNitniCallbacksPhase(self, [typing_phase])
end
src/nitni/nitni_callbacks.nit:25,1--27,3
redef class ToolContext
# Parses contracts annotations.
var contracts_phase: Phase = new ContractsPhase(self, [modelize_property_phase,typing_phase])
end
src/contracts.nit:30,1--33,3
redef class ToolContext
# --discover-call-trace
var opt_discover_call_trace = new OptionBool("Trace calls of the first invocation of methods", "--discover-call-trace")
redef init
do
super
self.option_context.add_option(self.opt_discover_call_trace)
end
end
src/interpreter/naive_interpreter.nit:27,1--36,3
redef class ToolContext
var header_dependancy_phase: Phase = new HeaderDependancyPhase(self, [ffi_language_assignation_phase, modelize_class_phase])
end
src/ffi/header_dependency.nit:24,1--26,3
redef class ToolContext
# Detects the `pkgconfig` annotation on the module declaration only
var pkgconfig_phase: Phase = new PkgconfigPhase(self, [literal_phase])
# Is the external program `pkg-config` available?
var pkgconfig_is_available: Bool is lazy do
# Ignore/silence the process output
var proc_which = new ProcessReader("which", "pkg-config")
proc_which.wait
var status = proc_which.status
if status != 0 then
error(null, "Error: program `pkg-config` not found, make sure it is installed.")
return false
end
return true
end
# Check if the `packages` are known by the external program `pkg-config`
#
# Missing packages are reported to the console via `ToolContext::error`.
# Check for errors using `check_errors`.
fun check_pkgconfig_packages(packages: Array[String])
do
if not pkgconfig_is_available then return
for pkg in packages do
var proc_exist = new Process("pkg-config", "--exists", pkg)
proc_exist.wait
var status = proc_exist.status
if status == 1 then
error(null,
"Error: dev package for `{pkg}` unknown by `pkg-config`, install it with `apt-get`, `brew` or similar.")
else if status != 0 then
error(null,
"Error: something went wrong calling `pkg-config`, make sure it is correctly configured.")
end
end
end
end
src/ffi/pkgconfig.nit:25,1--64,3
redef class ToolContext
# Nullable types related metrics
var nullables_metrics_phase: Phase = new NullablesMetricsPhase(self, null)
end
src/metrics/nullables_metrics.nit:24,1--28,3
redef class ToolContext
# RTA related metrics phase
var rta_metrics_phase: Phase = new RTAMetricsPhase(self, null)
end
src/metrics/rta_metrics.nit:25,1--29,3
redef class ToolContext
# Phase to find `cflags`, `ldflags` and `cppflags`
var cflags_phase: Phase = new CCompilerOptionsPhase(self, [platform_phase])
end
src/ffi/c_compiler_options.nit:27,1--30,3
redef class ToolContext
var extra_java_files_phase: Phase = new JavaExtraFilesPhase(self, [literal_phase])
end
src/ffi/extra_java_files.nit:26,1--28,3
# Add compiling options
redef class ToolContext
# --output
var opt_output = new OptionString("Filename of the generated executable", "-o", "--output")
# --dir
var opt_dir = new OptionString("Output directory", "--dir")
# --run
var opt_run = new OptionBool("Execute the binary after the compilation", "--run")
# --no-cc
var opt_no_cc = new OptionBool("Do not invoke the C compiler", "--no-cc")
# --no-main
var opt_no_main = new OptionBool("Do not generate main entry point", "--no-main")
# --make-flags
var opt_make_flags = new OptionString("Additional options to the `make` command", "--make-flags")
# --max-c-lines
var opt_max_c_lines = new OptionInt("Maximum number of lines in generated C files. Use 0 for unlimited", 10000, "--max-c-lines")
# --group-c-files
var opt_group_c_files = new OptionBool("Group all generated code in the same series of files", "--group-c-files")
# --compile-dir
var opt_compile_dir = new OptionString("Directory used to generate temporary files", "--compile-dir")
# --hardening
var opt_hardening = new OptionBool("Generate contracts in the C code against bugs in the compiler", "--hardening")
# --no-check-covariance
var opt_no_check_covariance = new OptionBool("Disable type tests of covariant parameters (dangerous)", "--no-check-covariance")
# --no-check-attr-isset
var opt_no_check_attr_isset = new OptionBool("Disable isset tests before each attribute access (dangerous)", "--no-check-attr-isset")
# --no-check-assert
var opt_no_check_assert = new OptionBool("Disable the evaluation of explicit `assert` and `as` (dangerous)", "--no-check-assert")
# --no-check-autocast
var opt_no_check_autocast = new OptionBool("Disable implicit casts on unsafe expression usage (dangerous)", "--no-check-autocast")
# --no-check-null
var opt_no_check_null = new OptionBool("Disable tests of null receiver (dangerous)", "--no-check-null")
# --no-check-all
var opt_no_check_all = new OptionBool("Disable all tests (dangerous)", "--no-check-all")
# --typing-test-metrics
var opt_typing_test_metrics = new OptionBool("Enable static and dynamic count of all type tests", "--typing-test-metrics")
# --invocation-metrics
var opt_invocation_metrics = new OptionBool("Enable static and dynamic count of all method invocations", "--invocation-metrics")
# --isset-checks-metrics
var opt_isset_checks_metrics = new OptionBool("Enable static and dynamic count of isset checks before attributes access", "--isset-checks-metrics")
# --no-stacktrace
var opt_no_stacktrace = new OptionBool("Disable the generation of stack traces", "--no-stacktrace")
# --no-gcc-directives
var opt_no_gcc_directive = new OptionArray("Disable advanced gcc directives for optimization", "--no-gcc-directive")
# --release
var opt_release = new OptionBool("Compile in release mode and finalize application", "--release")
# -g
var opt_debug = new OptionBool("Compile in debug mode (no C-side optimization)", "-g", "--debug")
# --trace
var opt_trace = new OptionBool("Compile with lttng's instrumentation", "--trace")
redef init
do
super
self.option_context.add_option(self.opt_output, self.opt_dir, self.opt_run, self.opt_no_cc, self.opt_no_main, self.opt_shared_lib, self.opt_make_flags, self.opt_compile_dir, self.opt_hardening)
self.option_context.add_option(self.opt_no_check_covariance, self.opt_no_check_attr_isset, self.opt_no_check_assert, self.opt_no_check_autocast, self.opt_no_check_null, self.opt_no_check_all)
self.option_context.add_option(self.opt_typing_test_metrics, self.opt_invocation_metrics, self.opt_isset_checks_metrics)
self.option_context.add_option(self.opt_no_stacktrace)
self.option_context.add_option(self.opt_no_gcc_directive)
self.option_context.add_option(self.opt_release)
self.option_context.add_option(self.opt_max_c_lines, self.opt_group_c_files)
self.option_context.add_option(self.opt_debug)
self.option_context.add_option(self.opt_trace)
opt_no_main.hidden = true
opt_shared_lib.hidden = true
end
redef fun process_options(args)
do
super
if opt_output.value != null and opt_dir.value != null then
print "Option Error: cannot use both --dir and --output"
exit(1)
end
if opt_no_check_all.value then
opt_no_check_covariance.value = true
opt_no_check_attr_isset.value = true
opt_no_check_assert.value = true
opt_no_check_autocast.value = true
opt_no_check_null.value = true
end
end
end
src/compiler/abstract_compiler.nit:31,1--118,3
redef class ToolContext
# option --global
var opt_global = new OptionBool("Use global compilation", "--global")
var global_compiler_phase = new GlobalCompilerPhase(self, [contracts_phase])
redef init do
super
option_context.add_option(opt_global)
end
end
src/compiler/global_compiler.nit:29,1--39,3
redef class ToolContext
# --trace-memory
var opt_trace_memory = new OptionBool("Enable dynamic measure of memory usage", "--trace-memory")
init do
self.option_context.add_option opt_trace_memory
end
end
src/compiler/memory_logger.nit:20,1--27,3
redef class ToolContext
redef fun platform_from_name(name)
do
if name == "emscripten" then return new EmscriptenPlatform
return super
end
end
src/platform/emscripten.nit:23,1--29,3
# Add separate compiler specific options
redef class ToolContext
# --separate
var opt_separate = new OptionBool("Use separate compilation", "--separate")
# --no-inline-intern
var opt_no_inline_intern = new OptionBool("Do not inline call to intern methods", "--no-inline-intern")
# --no-union-attribute
var opt_no_union_attribute = new OptionBool("Put primitive attributes in a box instead of an union", "--no-union-attribute")
# --no-shortcut-equate
var opt_no_shortcut_equate = new OptionBool("Always call == in a polymorphic way", "--no-shortcut-equal")
# --no-tag-primitives
var opt_no_tag_primitives = new OptionBool("Use only boxes for primitive types", "--no-tag-primitives")
# --colors-are-symbols
var opt_colors_are_symbols = new OptionBool("Store colors as symbols instead of static data (link-boost)", "--colors-are-symbols")
# --trampoline-call
var opt_trampoline_call = new OptionBool("Use an indirection when calling", "--trampoline-call")
# --guard-call
var opt_guard_call = new OptionBool("Guard VFT calls with a direct call", "--guard-call")
# --substitute-monomorph
var opt_substitute_monomorph = new OptionBool("Replace monomorphic trampolines with direct calls (link-boost)", "--substitute-monomorph")
# --link-boost
var opt_link_boost = new OptionBool("Enable all link-boost optimizations", "--link-boost")
# --inline-coloring-numbers
var opt_inline_coloring_numbers = new OptionBool("Inline colors and ids (semi-global)", "--inline-coloring-numbers")
# --inline-some-methods
var opt_inline_some_methods = new OptionBool("Allow the separate compiler to inline some methods (semi-global)", "--inline-some-methods")
# --direct-call-monomorph
var opt_direct_call_monomorph = new OptionBool("Allow the separate compiler to direct call monomorphic sites (semi-global)", "--direct-call-monomorph")
# --direct-call-monomorph0
var opt_direct_call_monomorph0 = new OptionBool("Allow the separate compiler to direct call monomorphic sites (semi-global)", "--direct-call-monomorph0")
# --skip-dead-methods
var opt_skip_dead_methods = new OptionBool("Do not compile dead methods (semi-global)", "--skip-dead-methods")
# --semi-global
var opt_semi_global = new OptionBool("Enable all semi-global optimizations", "--semi-global")
# --no-colo-dead-methods
var opt_colo_dead_methods = new OptionBool("Force colorization of dead methods", "--colo-dead-methods")
# --tables-metrics
var opt_tables_metrics = new OptionBool("Enable static size measuring of tables used for vft, typing and resolution", "--tables-metrics")
# --type-poset
var opt_type_poset = new OptionBool("Build a poset of types to create more condensed tables", "--type-poset")
redef init
do
super
self.option_context.add_option(self.opt_separate)
self.option_context.add_option(self.opt_no_inline_intern)
self.option_context.add_option(self.opt_no_union_attribute)
self.option_context.add_option(self.opt_no_shortcut_equate)
self.option_context.add_option(self.opt_no_tag_primitives)
self.option_context.add_option(opt_colors_are_symbols, opt_trampoline_call, opt_guard_call, opt_direct_call_monomorph0, opt_substitute_monomorph, opt_link_boost)
self.option_context.add_option(self.opt_inline_coloring_numbers, opt_inline_some_methods, opt_direct_call_monomorph, opt_skip_dead_methods, opt_semi_global)
self.option_context.add_option(self.opt_colo_dead_methods)
self.option_context.add_option(self.opt_tables_metrics)
self.option_context.add_option(self.opt_type_poset)
end
redef fun process_options(args)
do
super
var tc = self
if tc.opt_semi_global.value then
tc.opt_inline_coloring_numbers.value = true
tc.opt_inline_some_methods.value = true
tc.opt_direct_call_monomorph.value = true
tc.opt_skip_dead_methods.value = true
end
if tc.opt_link_boost.value then
tc.opt_colors_are_symbols.value = true
tc.opt_substitute_monomorph.value = true
end
if tc.opt_substitute_monomorph.value then
tc.opt_trampoline_call.value = true
end
end
var separate_compiler_phase = new SeparateCompilerPhase(self, [contracts_phase])
end
src/compiler/separate_compiler.nit:22,1--101,3
redef class ToolContext
redef fun platform_from_name(name)
do
if name == "ios" then return new IOSPlatform
return super
end
end
src/platform/ios.nit:23,1--29,3
# Add separate erased compiler specific options
redef class ToolContext
# --erasure
var opt_erasure = new OptionBool("Erase generic types", "--erasure")
# --rta
var opt_rta = new OptionBool("Activate RTA (implicit with --global and --separate)", "--rta")
# --no-check-erasure-cast
var opt_no_check_erasure_cast = new OptionBool("Disable implicit casts on unsafe return with erasure-typing policy (dangerous)", "--no-check-erasure-cast")
redef init
do
super
self.option_context.add_option(self.opt_erasure, self.opt_no_check_erasure_cast, opt_rta)
end
redef fun process_options(args)
do
super
if opt_no_check_all.value then
opt_no_check_erasure_cast.value = true
end
# Temporary disabled. TODO: implement tagging in the erasure compiler.
if opt_erasure.value then
opt_no_tag_primitives.value = true
end
end
var erasure_compiler_phase = new ErasureCompilerPhase(self, [contracts_phase])
end
src/compiler/separate_erasure_compiler.nit:20,1--50,3
redef class ToolContext
# --compile-dir
var opt_compile_dir = new OptionString("Directory used to generate temporary files", "--compile-dir")
init do option_context.add_option opt_compile_dir
end
src/interpreter/dynamic_loading_ffi/on_demand_compiler.nit:25,1--31,3
redef class ToolContext
# FIXME: there is conflict in linex in nitc, so use this trick to force invocation
private var dummy: Bool = do_dummy
# SEE `dummy`
private fun do_dummy: Bool
do
# Force no warning before analysing classes
phases.add_edge(modelize_class_phase, no_warning_phase)
# Force easy warnings after modelbuilder
phases.add_edge(simple_misc_analysis_phase, modelize_property_phase)
# Force easy warnings before intraproc-errors
phases.add_edge(scope_phase, simple_misc_analysis_phase)
# Code genrated by the serialization phase must be analyzed for literals
phases.add_edge(literal_phase, serialization_phase_pre_model)
phases.add_edge(modelize_class_phase, serialization_phase_pre_model)
phases.add_edge(modelize_class_phase, parallelization_phase)
return true
end
end
src/frontend/frontend.nit:36,1--55,3
redef class ToolContext
# Generate serialization and deserialization methods on `auto_serializable` annotated classes.
var restful_phase: Phase = new RestfulPhase(self, [modelize_class_phase])
# Where do we put a single result?
var opt_output: OptionString = new OptionString("Output file (can also be 'stdout')", "-o", "--output")
# Where do we put the result?
var opt_dir: OptionString = new OptionString("Output directory", "--dir")
redef init
do
option_context.add_option(opt_output, opt_dir)
super
end
end
src/nitrestful.nit:105,1--120,3
redef class ToolContext
# Where do we put a single result?
var opt_output: OptionString = new OptionString("Output file (can also be 'stdout')", "-o", "--output")
# Where do we put the result?
var opt_dir: OptionString = new OptionString("Output directory", "--dir")
# Depth of the visit and generation
var opt_depth = new OptionEnum(["module", "group", "package"],
"Depth of the visit and generation", 0, "-d", "--depth")
redef init
do
option_context.add_option(opt_output, opt_dir, opt_depth)
super
end
end
src/nitserial.nit:34,1--50,3
redef class ToolContext
# Phase that generates UML diagrams from model entities.
var umlphase: Phase = new UMLPhase(self, null)
# What to generate?
var opt_gen = new OptionEnum(["class", "package"], "Choose which type of uml diagram to generate", 0, "--diagram")
# Generate private?
var opt_privacy = new OptionBool("Generates private API", "-p", "--private")
redef init do
option_context.add_option opt_gen
option_context.add_option opt_privacy
super
end
end
src/nituml.nit:22,1--38,3
redef class ToolContext
var opt_query = new OptionString("String to search", "-q", "--query")
var opt_name_prefix = new OptionBool("", "--name-prefix")
var opt_full_name_prefix = new OptionBool("", "--full-name-prefix")
var opt_name_similarity = new OptionBool("", "--name-similarity")
var opt_full_name_similarity = new OptionBool("", "--full-name-similarity")
var opt_name = new OptionBool("", "--name")
var opt_full_name = new OptionBool("", "--full-name")
redef init do
option_context.add_option(opt_query)
option_context.add_option(opt_name_prefix, opt_full_name_prefix)
option_context.add_option(opt_name_similarity, opt_full_name_similarity)
option_context.add_option(opt_name, opt_full_name)
end
end
src/test_model_index.nit:20,1--35,3
redef class ToolContext
# nitpackage phase
var nitpackage_phase: Phase = new NitPackagePhase(self, null)
# --expand
var opt_expand = new OptionBool("Move singleton packages to their own directory", "--expand")
# --check-ini
var opt_check_ini = new OptionBool("Check package.ini files", "--check-ini")
# --gen-ini
var opt_gen_ini = new OptionBool("Generate package.ini files", "--gen-ini")
# --force
var opt_force = new OptionBool("Force update of existing files", "-f", "--force")
# --check-makefile
var opt_check_makefile = new OptionBool("Check Makefile files", "--check-makefile")
# --gen-makefile
var opt_gen_makefile = new OptionBool("Generate Makefile files", "--gen-makefile")
# --check-man
var opt_check_man = new OptionBool("Check manpages files", "--check-man")
# --gen-man
var opt_gen_man = new OptionBool("Generate manpages files", "--gen-man")
# --check-readme
var opt_check_readme = new OptionBool("Check README.md files", "--check-readme")
redef init do
super
option_context.add_option(opt_expand, opt_force)
option_context.add_option(opt_check_ini, opt_gen_ini)
option_context.add_option(opt_check_makefile, opt_gen_makefile)
option_context.add_option(opt_check_man, opt_gen_man)
option_context.add_option(opt_check_readme)
end
end
src/nitpackage.nit:21,1--61,3
redef class ToolContext
redef fun process_options(args)
do
super
var sum = opt_separate.value.to_i + opt_erasure.value.to_i
if sum > 1 then
print "Options --separate and --erasure are exclusive"
exit(1)
else if sum == 0 then
# --separate by default
opt_separate.value = true
end
end
end
src/nith.nit:28,1--42,3
redef class ToolContext
redef fun platform_from_name(name)
do
if name == "android" then return new AndroidPlatform
return super
end
end
src/platform/android.nit:26,1--32,3
redef class ToolContext
# Used to shortcut the prompt and display directly the result in console.
var opt_command = new OptionString("Nitx command to perform", "-c", "--command")
# Compute and use the catalog
var opt_catalog = new OptionBool("Use catalog", "--catalog")
init do option_context.add_option(opt_command, opt_catalog)
end
src/nitx.nit:30,1--39,3
redef class ToolContext
# Nitdoc generation phase
var docphase: Phase = new Nitdoc(self, null)
# Directory where the Nitdoc is rendered
var opt_dir = new OptionString("Output directory", "-d", "--dir")
# Do not generate documentation for 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")
# Use a custom title for the homepage
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")
# Display a custom introduction text before the packages overview
var opt_custom_intro = new OptionString("Custom intro text for homepage", "--custom-overview-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")
# Piwik tracker site id
var opt_piwik_site_id = new OptionString("Piwik site ID", "--piwik-site-id")
# Do not generate dot/graphviz diagrams
var opt_nodot = new OptionBool("Do not generate graphs with graphviz", "--no-dot")
# Do not include highlighted code
var opt_nocode = new OptionBool("Do not generate code with nitlight", "--no-code")
# File pattern used to link documentation to source code.
var opt_source = new OptionString("Format to link source code (%f for filename, " +
"%l for first line, %L for last line) only works with option --no-code", "--source")
# Disable HTML rendering
var opt_norender = new OptionBool("DO not render any HTML", "--no-render")
# Test mode
#
# Display test data and remove the progress bar
var opt_test = new OptionBool("Output test data", "--test")
redef init do
super
option_context.add_option(
opt_dir, opt_no_attributes, opt_private,
opt_share_dir, opt_shareurl, opt_custom_title,
opt_custom_footer, opt_custom_intro, opt_custom_brand,
opt_piwik_tracker, opt_piwik_site_id,
opt_nodot, opt_nocode, opt_source, opt_norender, opt_test)
end
end
src/nitdoc.nit:22,1--91,3
redef class ToolContext
# Modules to analyze, other modules will only get a shallow processing.
var mmodules_to_check = new HashSet[MModule]
redef fun phase_process_npropdef(phase, npropdef)
do
var pd = npropdef.mpropdef
# Do not analyze the property bodies outside specified modules
if pd != null and not mmodules_to_check.has(pd.mclassdef.mmodule) then return
super
end
end
src/nitpick.nit:21,1--32,3
redef class ToolContext
# Analysis to apply
var opt_analysis = new OptionEnum(["reaching-defs"], "Analysis to apply", 0, "--analysis")
redef init do
super
option_context.add_option(opt_analysis)
end
end
src/nitsaf.nit:22,1--31,3
redef class ToolContext
# Where to output the generated binary
var opt_output = new OptionString("Output file", "-o", "--output")
# Where to output tmp files
var opt_compile_dir = new OptionString("Directory used to generate temporary files", "--compile-dir")
# Compile using ant instead of make (faster, but no error display)
var opt_ant = new OptionBool("Batch with ant (faster, but no error display)", "--ant")
redef init do
super
option_context.add_option(opt_output, opt_compile_dir, opt_ant)
end
end
src/compiler/java_compiler.nit:31,1--46,3
redef class ToolContext
var codesmells_metrics_phase = new CodeSmellsMetricsPhase(self, null)
end
src/metrics/codesmells_metrics.nit:23,1--25,3
# For force nit to do the good linéarisation to remove the toolcontext redef warning
redef class ToolContext
redef init do super
end
src/nitsmells.nit:19,1--22,3
redef class ToolContext
# Path to app config file.
var opt_config = new OptionString("Path to app config file", "--config")
# Host name to bind on (will overwrite the config one).
var opt_host = new OptionString("Host to bind the server on", "--host")
# Port number to bind on (will overwrite the config one).
var opt_port = new OptionInt("Port number to use", -1, "--port")
# --no-private
var opt_no_private = new OptionBool("Do not show private entities", "--no-private")
# --no-fictive
var opt_no_fictive = new OptionBool("Do not show fictive entities", "--no-fictive")
# --no-test
var opt_no_test = new OptionBool("Do not show test related entities", "--no-test")
# --no-attribute
var opt_no_attribute = new OptionBool("Do not show attributes", "--no-attribute")
# --no-empty-doc
var opt_no_empty_doc = new OptionBool("Do not undocumented entities", "--no-empty-doc")
# Web rendering phase.
var webphase: Phase = new NitwebPhase(self, null)
init do
super
option_context.add_option(opt_config, opt_host, opt_port, opt_no_private,
opt_no_fictive, opt_no_test, opt_no_attribute, opt_no_empty_doc)
end
end
src/nitweb.nit:21,1--55,3
redef class ToolContext
redef fun process_options(args)
do
super
var sum = opt_global.value.to_i + opt_separate.value.to_i + opt_erasure.value.to_i
if sum > 1 then
print "Options --global, --separate and --erasure are exclusive"
exit(1)
else if sum == 0 then
# --separate by default
opt_separate.value = true
end
end
end
src/nitc.nit:24,1--38,3