.. _stdlib_lint_fixups: ================ Lint fix helpers ================ .. das:module:: lint_fixups The lint_fixups module holds the helpers the lint passes build their ``--fix`` edits from: the source text of a node or a range, the checks a rewrite must pass, and the shared ``LintFix`` constructors. All functions and symbols are in "lint_fixups" module, use require to get access to it. .. code-block:: das require daslib/lint_fixups +++++ Fixes +++++ * :ref:`lint_call_fix (e: Expression?; name: string; args: array\) : LintFix ` * :ref:`lint_expr_text (e: Expression?) : string ` * :ref:`lint_fills_lines (e: Expression?; one_line: bool) : bool ` * :ref:`lint_fix (at: LineInfo; replacement: string) : LintFix ` * :ref:`lint_fix_message (text: string; fix: LintFix) : string ` * :ref:`lint_fix_site_ok (e: Expression?; fn: Function?; generic_safe: bool) : bool ` * :ref:`lint_function_names (var fn: Function?) : table\ ` * :ref:`lint_has_comment (text: string) : bool ` * :ref:`lint_indent_of (line: string) : int ` * :ref:`lint_is_operand (e: Expression?) : bool ` * :ref:`lint_merge_fixes (at: LineInfo; edits: array\) : LintFix ` * :ref:`lint_module_visible (fn: Function?; name: string) : bool ` * :ref:`lint_name_counts (var e: Expression?) : table\ ` * :ref:`lint_operand_text (e: Expression?) : string ` * :ref:`lint_range (first: LineInfo; last: LineInfo) : LineInfo ` * :ref:`lint_replace_fix (e: Expression?; replacement: string) : LintFix ` * :ref:`lint_span_fix (at: LineInfo; replacement: string) : LintFix ` * :ref:`lint_span_text (at: LineInfo) : string ` * :ref:`lint_token_fix (at: LineInfo; ln: int; col: int; token: string; replacement: string) : LintFix ` * :ref:`lint_unwritten_arg (call: ExprCall?; k: int) : bool ` .. _function-lint_fixups_lint_call_fix_Expression_q__string_array_ls_string_gr_: .. das:function:: lint_call_fix(e: Expression?; name: string; args: array) : LintFix def lint_call_fix (e: Expression?; name: string; args: array) : LintFix :Arguments: * **e** : :ref:`Expression `? * **name** : string * **args** : array .. _function-lint_fixups_lint_expr_text_Expression_q_: .. das:function:: lint_expr_text(e: Expression?) : string def lint_expr_text (e: Expression?) : string :Arguments: * **e** : :ref:`Expression `? .. _function-lint_fixups_lint_fills_lines_Expression_q__bool: .. das:function:: lint_fills_lines(e: Expression?; one_line: bool) : bool def lint_fills_lines (e: Expression?; one_line: bool) : bool :Arguments: * **e** : :ref:`Expression `? * **one_line** : bool .. _function-lint_fixups_lint_fix_LineInfo_string: .. das:function:: lint_fix(at: LineInfo; replacement: string) : LintFix def lint_fix (at: LineInfo; replacement: string) : LintFix :Arguments: * **at** : :ref:`LineInfo ` * **replacement** : string .. _function-lint_fixups_lint_fix_message_string_LintFix: .. das:function:: lint_fix_message(text: string; fix: LintFix) : string def lint_fix_message (text: string; fix: LintFix) : string :Arguments: * **text** : string * **fix** : :ref:`LintFix ` .. _function-lint_fixups_lint_fix_site_ok_Expression_q__Function_q__bool: .. das:function:: lint_fix_site_ok(e: Expression?; fn: Function?; generic_safe: bool) : bool def lint_fix_site_ok (e: Expression?; fn: Function?; generic_safe: bool) : bool :Arguments: * **e** : :ref:`Expression `? * **fn** : :ref:`Function `? * **generic_safe** : bool .. _function-lint_fixups_lint_function_names_Function_q_: .. das:function:: lint_function_names(fn: Function?) : table def lint_function_names (var fn: Function?) : table :Arguments: * **fn** : :ref:`Function `? .. _function-lint_fixups_lint_has_comment_string: .. das:function:: lint_has_comment(text: string) : bool def lint_has_comment (text: string) : bool :Arguments: * **text** : string .. _function-lint_fixups_lint_indent_of_string: .. das:function:: lint_indent_of(line: string) : int def lint_indent_of (line: string) : int :Arguments: * **line** : string .. _function-lint_fixups_lint_is_operand_Expression_q_: .. das:function:: lint_is_operand(e: Expression?) : bool def lint_is_operand (e: Expression?) : bool :Arguments: * **e** : :ref:`Expression `? .. _function-lint_fixups_lint_merge_fixes_LineInfo_array_ls_LintFix_gr_: .. das:function:: lint_merge_fixes(at: LineInfo; edits: array) : LintFix def lint_merge_fixes (at: LineInfo; edits: array) : LintFix :Arguments: * **at** : :ref:`LineInfo ` * **edits** : array< :ref:`LintFix `> .. _function-lint_fixups_lint_module_visible_Function_q__string: .. das:function:: lint_module_visible(fn: Function?; name: string) : bool def lint_module_visible (fn: Function?; name: string) : bool :Arguments: * **fn** : :ref:`Function `? * **name** : string .. _function-lint_fixups_lint_name_counts_Expression_q_: .. das:function:: lint_name_counts(e: Expression?) : table def lint_name_counts (var e: Expression?) : table :Arguments: * **e** : :ref:`Expression `? .. _function-lint_fixups_lint_operand_text_Expression_q_: .. das:function:: lint_operand_text(e: Expression?) : string def lint_operand_text (e: Expression?) : string :Arguments: * **e** : :ref:`Expression `? .. _function-lint_fixups_lint_range_LineInfo_LineInfo: .. das:function:: lint_range(first: LineInfo; last: LineInfo) : LineInfo def lint_range (first: LineInfo; last: LineInfo) : LineInfo :Arguments: * **first** : :ref:`LineInfo ` * **last** : :ref:`LineInfo ` .. _function-lint_fixups_lint_replace_fix_Expression_q__string: .. das:function:: lint_replace_fix(e: Expression?; replacement: string) : LintFix def lint_replace_fix (e: Expression?; replacement: string) : LintFix :Arguments: * **e** : :ref:`Expression `? * **replacement** : string .. _function-lint_fixups_lint_span_fix_LineInfo_string: .. das:function:: lint_span_fix(at: LineInfo; replacement: string) : LintFix def lint_span_fix (at: LineInfo; replacement: string) : LintFix :Arguments: * **at** : :ref:`LineInfo ` * **replacement** : string .. _function-lint_fixups_lint_span_text_LineInfo: .. das:function:: lint_span_text(at: LineInfo) : string def lint_span_text (at: LineInfo) : string :Arguments: * **at** : :ref:`LineInfo ` .. _function-lint_fixups_lint_token_fix_LineInfo_int_int_string_string: .. das:function:: lint_token_fix(at: LineInfo; ln: int; col: int; token: string; replacement: string) : LintFix def lint_token_fix (at: LineInfo; ln: int; col: int; token: string; replacement: string) : LintFix :Arguments: * **at** : :ref:`LineInfo ` * **ln** : int * **col** : int * **token** : string * **replacement** : string .. _function-lint_fixups_lint_unwritten_arg_ExprCall_q__int: .. das:function:: lint_unwritten_arg(call: ExprCall?; k: int) : bool def lint_unwritten_arg (call: ExprCall?; k: int) : bool :Arguments: * **call** : :ref:`ExprCall `? * **k** : int