14.3. Lint fix helpers

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.

require daslib/lint_fixups

14.3.1. Fixes

lint_call_fix(e: Expression?; name: string; args: array<string> ): LintFix

def lint_call_fix (e: Expression?; name: string; args: array<string>) : LintFix

Arguments:
  • e : Expression?

  • name : string

  • args : array<string>

lint_expr_text(e: Expression? ): string

def lint_expr_text (e: Expression?) : string

Arguments:
lint_fills_lines(e: Expression?; one_line: bool ): bool

def lint_fills_lines (e: Expression?; one_line: bool) : bool

Arguments:
lint_fix(at: LineInfo; replacement: string ): LintFix

def lint_fix (at: LineInfo; replacement: string) : LintFix

Arguments:
lint_fix_message(text: string; fix: LintFix ): string

def lint_fix_message (text: string; fix: LintFix) : string

Arguments:
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:
lint_function_names(fn: Function? ): table<string, void>

def lint_function_names (var fn: Function?) : table<string, void>

Arguments:
lint_has_comment(text: string ): bool

def lint_has_comment (text: string) : bool

Arguments:
  • text : string

lint_indent_of(line: string ): int

def lint_indent_of (line: string) : int

Arguments:
  • line : string

lint_is_operand(e: Expression? ): bool

def lint_is_operand (e: Expression?) : bool

Arguments:
lint_merge_fixes(at: LineInfo; edits: array<LintFix> ): LintFix

def lint_merge_fixes (at: LineInfo; edits: array<LintFix>) : LintFix

Arguments:
lint_module_visible(fn: Function?; name: string ): bool

def lint_module_visible (fn: Function?; name: string) : bool

Arguments:
lint_name_counts(e: Expression? ): table<string, int>

def lint_name_counts (var e: Expression?) : table<string, int>

Arguments:
lint_operand_text(e: Expression? ): string

def lint_operand_text (e: Expression?) : string

Arguments:
lint_range(first: LineInfo; last: LineInfo ): LineInfo

def lint_range (first: LineInfo; last: LineInfo) : LineInfo

Arguments:
lint_replace_fix(e: Expression?; replacement: string ): LintFix

def lint_replace_fix (e: Expression?; replacement: string) : LintFix

Arguments:
lint_span_fix(at: LineInfo; replacement: string ): LintFix

def lint_span_fix (at: LineInfo; replacement: string) : LintFix

Arguments:
lint_span_text(at: LineInfo ): string

def lint_span_text (at: LineInfo) : string

Arguments:
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 : LineInfo

  • ln : int

  • col : int

  • token : string

  • replacement : string

lint_unwritten_arg(call: ExprCall?; k: int ): bool

def lint_unwritten_arg (call: ExprCall?; k: int) : bool

Arguments: