2021-11-01 19:25:45 +00:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "utf-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
2023-01-10 12:25:04 +00:00
< meta name = "generator" content = "Crystal Docs 1.6.2" >
2021-11-01 19:25:45 +00:00
< meta name = "crystal_docs.project_version" content = "master" >
< meta name = "crystal_docs.project_name" content = "ameba" >
< link href = "../../css/style.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "../../js/doc.js" > < / script >
< meta name = "repository-name" content = "ameba" >
< title > Ameba::Source::Corrector - ameba master< / title >
< script type = "text/javascript" >
CrystalDocs.base_path = "../../";
< / script >
< / head >
< body >
< svg class = "hidden" >
< symbol id = "octicon-link" viewBox = "0 0 16 16" >
< path fill-rule = "evenodd" d = "M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > < / path >
< / symbol >
< / svg >
< div class = "sidebar" >
< div class = "sidebar-header" >
< div class = "search-box" >
< input type = "search" class = "search-input" placeholder = "Search..." spellcheck = "false" aria-label = "Search" >
< / div >
< div class = "project-summary" >
< h1 class = "project-name" >
< a href = "../../index.html" >
ameba
< / a >
< / h1 >
< span class = "project-version" >
master
< / span >
< / div >
< / div >
< div class = "search-results hidden" >
< ul class = "search-list" > < / ul >
< / div >
< div class = "types-list" >
< ul >
< li class = "parent open current" data-id = "ameba/Ameba" data-name = "ameba" >
< a href = "../../Ameba.html" > Ameba< / a >
< ul >
< li class = "parent " data-id = "ameba/Ameba/AST" data-name = "ameba::ast" >
< a href = "../../Ameba/AST.html" > AST< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/AST/Argument" data-name = "ameba::ast::argument" >
< a href = "../../Ameba/AST/Argument.html" > Argument< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/Assignment" data-name = "ameba::ast::assignment" >
< a href = "../../Ameba/AST/Assignment.html" > Assignment< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/BaseVisitor" data-name = "ameba::ast::basevisitor" >
< a href = "../../Ameba/AST/BaseVisitor.html" > BaseVisitor< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/Branch" data-name = "ameba::ast::branch" >
< a href = "../../Ameba/AST/Branch.html" > Branch< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/Branchable" data-name = "ameba::ast::branchable" >
< a href = "../../Ameba/AST/Branchable.html" > Branchable< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/CountingVisitor" data-name = "ameba::ast::countingvisitor" >
< a href = "../../Ameba/AST/CountingVisitor.html" > CountingVisitor< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/FlowExpression" data-name = "ameba::ast::flowexpression" >
< a href = "../../Ameba/AST/FlowExpression.html" > FlowExpression< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/FlowExpressionVisitor" data-name = "ameba::ast::flowexpressionvisitor" >
< a href = "../../Ameba/AST/FlowExpressionVisitor.html" > FlowExpressionVisitor< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/InstanceVariable" data-name = "ameba::ast::instancevariable" >
< a href = "../../Ameba/AST/InstanceVariable.html" > InstanceVariable< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/NodeVisitor" data-name = "ameba::ast::nodevisitor" >
< a href = "../../Ameba/AST/NodeVisitor.html" > NodeVisitor< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/RedundantControlExpressionVisitor" data-name = "ameba::ast::redundantcontrolexpressionvisitor" >
< a href = "../../Ameba/AST/RedundantControlExpressionVisitor.html" > RedundantControlExpressionVisitor< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/Reference" data-name = "ameba::ast::reference" >
< a href = "../../Ameba/AST/Reference.html" > Reference< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/Scope" data-name = "ameba::ast::scope" >
< a href = "../../Ameba/AST/Scope.html" > Scope< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/ScopeVisitor" data-name = "ameba::ast::scopevisitor" >
< a href = "../../Ameba/AST/ScopeVisitor.html" > ScopeVisitor< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/TopLevelNodesVisitor" data-name = "ameba::ast::toplevelnodesvisitor" >
< a href = "../../Ameba/AST/TopLevelNodesVisitor.html" > TopLevelNodesVisitor< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/Util" data-name = "ameba::ast::util" >
< a href = "../../Ameba/AST/Util.html" > Util< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/AST/Variable" data-name = "ameba::ast::variable" >
< a href = "../../Ameba/AST/Variable.html" > Variable< / a >
< / li >
< / ul >
< / li >
< li class = " " data-id = "ameba/Ameba/Config" data-name = "ameba::config" >
< a href = "../../Ameba/Config.html" > Config< / a >
< / li >
2021-11-16 21:31:29 +00:00
< li class = "parent " data-id = "ameba/Ameba/Ext" data-name = "ameba::ext" >
< a href = "../../Ameba/Ext.html" > Ext< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Ext/Location" data-name = "ameba::ext::location" >
< a href = "../../Ameba/Ext/Location.html" > Location< / a >
< / li >
< / ul >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "parent " data-id = "ameba/Ameba/Formatter" data-name = "ameba::formatter" >
< a href = "../../Ameba/Formatter.html" > Formatter< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Formatter/BaseFormatter" data-name = "ameba::formatter::baseformatter" >
< a href = "../../Ameba/Formatter/BaseFormatter.html" > BaseFormatter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Formatter/DisabledFormatter" data-name = "ameba::formatter::disabledformatter" >
< a href = "../../Ameba/Formatter/DisabledFormatter.html" > DisabledFormatter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Formatter/DotFormatter" data-name = "ameba::formatter::dotformatter" >
< a href = "../../Ameba/Formatter/DotFormatter.html" > DotFormatter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Formatter/ExplainFormatter" data-name = "ameba::formatter::explainformatter" >
< a href = "../../Ameba/Formatter/ExplainFormatter.html" > ExplainFormatter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Formatter/FlycheckFormatter" data-name = "ameba::formatter::flycheckformatter" >
< a href = "../../Ameba/Formatter/FlycheckFormatter.html" > FlycheckFormatter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Formatter/JSONFormatter" data-name = "ameba::formatter::jsonformatter" >
< a href = "../../Ameba/Formatter/JSONFormatter.html" > JSONFormatter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Formatter/TODOFormatter" data-name = "ameba::formatter::todoformatter" >
< a href = "../../Ameba/Formatter/TODOFormatter.html" > TODOFormatter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Formatter/Util" data-name = "ameba::formatter::util" >
< a href = "../../Ameba/Formatter/Util.html" > Util< / a >
< / li >
< / ul >
< / li >
< li class = " " data-id = "ameba/Ameba/GlobUtils" data-name = "ameba::globutils" >
< a href = "../../Ameba/GlobUtils.html" > GlobUtils< / a >
< / li >
< li class = "parent " data-id = "ameba/Ameba/InlineComments" data-name = "ameba::inlinecomments" >
< a href = "../../Ameba/InlineComments.html" > InlineComments< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/InlineComments/Action" data-name = "ameba::inlinecomments::action" >
< a href = "../../Ameba/InlineComments/Action.html" > Action< / a >
< / li >
< / ul >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Issue" data-name = "ameba::issue" >
< a href = "../../Ameba/Issue.html" > Issue< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Issue/Status" data-name = "ameba::issue::status" >
< a href = "../../Ameba/Issue/Status.html" > Status< / a >
< / li >
< / ul >
< / li >
< li class = " " data-id = "ameba/Ameba/Reportable" data-name = "ameba::reportable" >
< a href = "../../Ameba/Reportable.html" > Reportable< / a >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Rule" data-name = "ameba::rule" >
< a href = "../../Ameba/Rule.html" > Rule< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Rule/Base" data-name = "ameba::rule::base" >
< a href = "../../Ameba/Rule/Base.html" > Base< / a >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Rule/Layout" data-name = "ameba::rule::layout" >
< a href = "../../Ameba/Rule/Layout.html" > Layout< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Rule/Layout/LineLength" data-name = "ameba::rule::layout::linelength" >
< a href = "../../Ameba/Rule/Layout/LineLength.html" > LineLength< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Layout/TrailingBlankLines" data-name = "ameba::rule::layout::trailingblanklines" >
< a href = "../../Ameba/Rule/Layout/TrailingBlankLines.html" > TrailingBlankLines< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Layout/TrailingWhitespace" data-name = "ameba::rule::layout::trailingwhitespace" >
< a href = "../../Ameba/Rule/Layout/TrailingWhitespace.html" > TrailingWhitespace< / a >
< / li >
< / ul >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Rule/Lint" data-name = "ameba::rule::lint" >
< a href = "../../Ameba/Rule/Lint.html" > Lint< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name = "ameba::rule::lint::ambiguousassignment" >
< a href = "../../Ameba/Rule/Lint/AmbiguousAssignment.html" > AmbiguousAssignment< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/BadDirective" data-name = "ameba::rule::lint::baddirective" >
< a href = "../../Ameba/Rule/Lint/BadDirective.html" > BadDirective< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/ComparisonToBoolean" data-name = "ameba::rule::lint::comparisontoboolean" >
< a href = "../../Ameba/Rule/Lint/ComparisonToBoolean.html" > ComparisonToBoolean< / a >
< / li >
2021-12-31 17:40:58 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/DebugCalls" data-name = "ameba::rule::lint::debugcalls" >
< a href = "../../Ameba/Rule/Lint/DebugCalls.html" > DebugCalls< / a >
< / li >
2021-11-01 19:25:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/DebuggerStatement" data-name = "ameba::rule::lint::debuggerstatement" >
< a href = "../../Ameba/Rule/Lint/DebuggerStatement.html" > DebuggerStatement< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/DuplicatedRequire" data-name = "ameba::rule::lint::duplicatedrequire" >
< a href = "../../Ameba/Rule/Lint/DuplicatedRequire.html" > DuplicatedRequire< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/EmptyEnsure" data-name = "ameba::rule::lint::emptyensure" >
< a href = "../../Ameba/Rule/Lint/EmptyEnsure.html" > EmptyEnsure< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/EmptyExpression" data-name = "ameba::rule::lint::emptyexpression" >
< a href = "../../Ameba/Rule/Lint/EmptyExpression.html" > EmptyExpression< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/EmptyLoop" data-name = "ameba::rule::lint::emptyloop" >
< a href = "../../Ameba/Rule/Lint/EmptyLoop.html" > EmptyLoop< / a >
< / li >
2022-12-20 15:23:07 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/Formatting" data-name = "ameba::rule::lint::formatting" >
< a href = "../../Ameba/Rule/Lint/Formatting.html" > Formatting< / a >
< / li >
2021-11-01 19:25:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/HashDuplicatedKey" data-name = "ameba::rule::lint::hashduplicatedkey" >
< a href = "../../Ameba/Rule/Lint/HashDuplicatedKey.html" > HashDuplicatedKey< / a >
< / li >
2022-11-17 13:22:23 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/LiteralAssignmentsInExpressions" data-name = "ameba::rule::lint::literalassignmentsinexpressions" >
< a href = "../../Ameba/Rule/Lint/LiteralAssignmentsInExpressions.html" > LiteralAssignmentsInExpressions< / a >
< / li >
2021-11-01 19:25:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/LiteralInCondition" data-name = "ameba::rule::lint::literalincondition" >
< a href = "../../Ameba/Rule/Lint/LiteralInCondition.html" > LiteralInCondition< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/LiteralInInterpolation" data-name = "ameba::rule::lint::literalininterpolation" >
< a href = "../../Ameba/Rule/Lint/LiteralInInterpolation.html" > LiteralInInterpolation< / a >
< / li >
2022-11-02 09:13:37 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/LiteralsComparison" data-name = "ameba::rule::lint::literalscomparison" >
< a href = "../../Ameba/Rule/Lint/LiteralsComparison.html" > LiteralsComparison< / a >
< / li >
2022-12-20 15:22:34 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/MissingBlockArgument" data-name = "ameba::rule::lint::missingblockargument" >
< a href = "../../Ameba/Rule/Lint/MissingBlockArgument.html" > MissingBlockArgument< / a >
< / li >
2022-10-30 22:53:00 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/NotNil" data-name = "ameba::rule::lint::notnil" >
< a href = "../../Ameba/Rule/Lint/NotNil.html" > NotNil< / a >
< / li >
2022-11-01 01:19:47 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/NotNilAfterNoBang" data-name = "ameba::rule::lint::notnilafternobang" >
< a href = "../../Ameba/Rule/Lint/NotNilAfterNoBang.html" > NotNilAfterNoBang< / a >
< / li >
2021-11-01 19:25:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/PercentArrays" data-name = "ameba::rule::lint::percentarrays" >
< a href = "../../Ameba/Rule/Lint/PercentArrays.html" > PercentArrays< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/RandZero" data-name = "ameba::rule::lint::randzero" >
< a href = "../../Ameba/Rule/Lint/RandZero.html" > RandZero< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/RedundantStringCoercion" data-name = "ameba::rule::lint::redundantstringcoercion" >
< a href = "../../Ameba/Rule/Lint/RedundantStringCoercion.html" > RedundantStringCoercion< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/RedundantWithIndex" data-name = "ameba::rule::lint::redundantwithindex" >
< a href = "../../Ameba/Rule/Lint/RedundantWithIndex.html" > RedundantWithIndex< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/RedundantWithObject" data-name = "ameba::rule::lint::redundantwithobject" >
< a href = "../../Ameba/Rule/Lint/RedundantWithObject.html" > RedundantWithObject< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/ShadowedArgument" data-name = "ameba::rule::lint::shadowedargument" >
< a href = "../../Ameba/Rule/Lint/ShadowedArgument.html" > ShadowedArgument< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/ShadowedException" data-name = "ameba::rule::lint::shadowedexception" >
< a href = "../../Ameba/Rule/Lint/ShadowedException.html" > ShadowedException< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/ShadowingOuterLocalVar" data-name = "ameba::rule::lint::shadowingouterlocalvar" >
< a href = "../../Ameba/Rule/Lint/ShadowingOuterLocalVar.html" > ShadowingOuterLocalVar< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/SharedVarInFiber" data-name = "ameba::rule::lint::sharedvarinfiber" >
< a href = "../../Ameba/Rule/Lint/SharedVarInFiber.html" > SharedVarInFiber< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/SpecFocus" data-name = "ameba::rule::lint::specfocus" >
< a href = "../../Ameba/Rule/Lint/SpecFocus.html" > SpecFocus< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/Syntax" data-name = "ameba::rule::lint::syntax" >
< a href = "../../Ameba/Rule/Lint/Syntax.html" > Syntax< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/UnneededDisableDirective" data-name = "ameba::rule::lint::unneededdisabledirective" >
< a href = "../../Ameba/Rule/Lint/UnneededDisableDirective.html" > UnneededDisableDirective< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/UnreachableCode" data-name = "ameba::rule::lint::unreachablecode" >
< a href = "../../Ameba/Rule/Lint/UnreachableCode.html" > UnreachableCode< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/UnusedArgument" data-name = "ameba::rule::lint::unusedargument" >
< a href = "../../Ameba/Rule/Lint/UnusedArgument.html" > UnusedArgument< / a >
< / li >
2022-12-15 18:35:50 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/UnusedBlockArgument" data-name = "ameba::rule::lint::unusedblockargument" >
< a href = "../../Ameba/Rule/Lint/UnusedBlockArgument.html" > UnusedBlockArgument< / a >
< / li >
2021-11-01 19:25:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Lint/UselessAssign" data-name = "ameba::rule::lint::uselessassign" >
< a href = "../../Ameba/Rule/Lint/UselessAssign.html" > UselessAssign< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Lint/UselessConditionInWhen" data-name = "ameba::rule::lint::uselessconditioninwhen" >
< a href = "../../Ameba/Rule/Lint/UselessConditionInWhen.html" > UselessConditionInWhen< / a >
< / li >
< / ul >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Rule/Metrics" data-name = "ameba::rule::metrics" >
< a href = "../../Ameba/Rule/Metrics.html" > Metrics< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Rule/Metrics/CyclomaticComplexity" data-name = "ameba::rule::metrics::cyclomaticcomplexity" >
< a href = "../../Ameba/Rule/Metrics/CyclomaticComplexity.html" > CyclomaticComplexity< / a >
< / li >
< / ul >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Rule/Performance" data-name = "ameba::rule::performance" >
< a href = "../../Ameba/Rule/Performance.html" > Performance< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/AnyAfterFilter" data-name = "ameba::rule::performance::anyafterfilter" >
< a href = "../../Ameba/Rule/Performance/AnyAfterFilter.html" > AnyAfterFilter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/AnyInsteadOfEmpty" data-name = "ameba::rule::performance::anyinsteadofempty" >
< a href = "../../Ameba/Rule/Performance/AnyInsteadOfEmpty.html" > AnyInsteadOfEmpty< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/Base" data-name = "ameba::rule::performance::base" >
< a href = "../../Ameba/Rule/Performance/Base.html" > Base< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/ChainedCallWithNoBang" data-name = "ameba::rule::performance::chainedcallwithnobang" >
< a href = "../../Ameba/Rule/Performance/ChainedCallWithNoBang.html" > ChainedCallWithNoBang< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/CompactAfterMap" data-name = "ameba::rule::performance::compactaftermap" >
< a href = "../../Ameba/Rule/Performance/CompactAfterMap.html" > CompactAfterMap< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/FirstLastAfterFilter" data-name = "ameba::rule::performance::firstlastafterfilter" >
< a href = "../../Ameba/Rule/Performance/FirstLastAfterFilter.html" > FirstLastAfterFilter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/FlattenAfterMap" data-name = "ameba::rule::performance::flattenaftermap" >
< a href = "../../Ameba/Rule/Performance/FlattenAfterMap.html" > FlattenAfterMap< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/MapInsteadOfBlock" data-name = "ameba::rule::performance::mapinsteadofblock" >
< a href = "../../Ameba/Rule/Performance/MapInsteadOfBlock.html" > MapInsteadOfBlock< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Performance/SizeAfterFilter" data-name = "ameba::rule::performance::sizeafterfilter" >
< a href = "../../Ameba/Rule/Performance/SizeAfterFilter.html" > SizeAfterFilter< / a >
< / li >
< / ul >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Rule/Style" data-name = "ameba::rule::style" >
< a href = "../../Ameba/Rule/Style.html" > Style< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Rule/Style/ConstantNames" data-name = "ameba::rule::style::constantnames" >
< a href = "../../Ameba/Rule/Style/ConstantNames.html" > ConstantNames< / a >
< / li >
2021-12-09 20:34:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Style/GuardClause" data-name = "ameba::rule::style::guardclause" >
< a href = "../../Ameba/Rule/Style/GuardClause.html" > GuardClause< / a >
< / li >
2021-11-01 19:25:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Style/IsAFilter" data-name = "ameba::rule::style::isafilter" >
< a href = "../../Ameba/Rule/Style/IsAFilter.html" > IsAFilter< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/IsANil" data-name = "ameba::rule::style::isanil" >
< a href = "../../Ameba/Rule/Style/IsANil.html" > IsANil< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/LargeNumbers" data-name = "ameba::rule::style::largenumbers" >
< a href = "../../Ameba/Rule/Style/LargeNumbers.html" > LargeNumbers< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/MethodNames" data-name = "ameba::rule::style::methodnames" >
< a href = "../../Ameba/Rule/Style/MethodNames.html" > MethodNames< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/NegatedConditionsInUnless" data-name = "ameba::rule::style::negatedconditionsinunless" >
< a href = "../../Ameba/Rule/Style/NegatedConditionsInUnless.html" > NegatedConditionsInUnless< / a >
< / li >
2022-11-19 23:42:38 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Style/ParenthesesAroundCondition" data-name = "ameba::rule::style::parenthesesaroundcondition" >
< a href = "../../Ameba/Rule/Style/ParenthesesAroundCondition.html" > ParenthesesAroundCondition< / a >
< / li >
2021-11-01 19:25:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Style/PredicateName" data-name = "ameba::rule::style::predicatename" >
< a href = "../../Ameba/Rule/Style/PredicateName.html" > PredicateName< / a >
< / li >
2022-12-08 12:16:48 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Style/QueryBoolMethods" data-name = "ameba::rule::style::queryboolmethods" >
< a href = "../../Ameba/Rule/Style/QueryBoolMethods.html" > QueryBoolMethods< / a >
< / li >
2021-11-01 19:25:45 +00:00
< li class = " " data-id = "ameba/Ameba/Rule/Style/RedundantBegin" data-name = "ameba::rule::style::redundantbegin" >
< a href = "../../Ameba/Rule/Style/RedundantBegin.html" > RedundantBegin< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/RedundantNext" data-name = "ameba::rule::style::redundantnext" >
< a href = "../../Ameba/Rule/Style/RedundantNext.html" > RedundantNext< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/RedundantReturn" data-name = "ameba::rule::style::redundantreturn" >
< a href = "../../Ameba/Rule/Style/RedundantReturn.html" > RedundantReturn< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/TypeNames" data-name = "ameba::rule::style::typenames" >
< a href = "../../Ameba/Rule/Style/TypeNames.html" > TypeNames< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/UnlessElse" data-name = "ameba::rule::style::unlesselse" >
< a href = "../../Ameba/Rule/Style/UnlessElse.html" > UnlessElse< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/VariableNames" data-name = "ameba::rule::style::variablenames" >
< a href = "../../Ameba/Rule/Style/VariableNames.html" > VariableNames< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/VerboseBlock" data-name = "ameba::rule::style::verboseblock" >
< a href = "../../Ameba/Rule/Style/VerboseBlock.html" > VerboseBlock< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Rule/Style/WhileTrue" data-name = "ameba::rule::style::whiletrue" >
< a href = "../../Ameba/Rule/Style/WhileTrue.html" > WhileTrue< / a >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Runner" data-name = "ameba::runner" >
< a href = "../../Ameba/Runner.html" > Runner< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Runner/InfiniteCorrectionLoopError" data-name = "ameba::runner::infinitecorrectionlooperror" >
< a href = "../../Ameba/Runner/InfiniteCorrectionLoopError.html" > InfiniteCorrectionLoopError< / a >
< / li >
< / ul >
< / li >
< li class = " " data-id = "ameba/Ameba/Severity" data-name = "ameba::severity" >
< a href = "../../Ameba/Severity.html" > Severity< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/SeverityYamlConverter" data-name = "ameba::severityyamlconverter" >
< a href = "../../Ameba/SeverityYamlConverter.html" > SeverityYamlConverter< / a >
< / li >
< li class = "parent open current" data-id = "ameba/Ameba/Source" data-name = "ameba::source" >
< a href = "../../Ameba/Source.html" > Source< / a >
< ul >
< li class = " current" data-id = "ameba/Ameba/Source/Corrector" data-name = "ameba::source::corrector" >
< a href = "../../Ameba/Source/Corrector.html" > Corrector< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Source/Rewriter" data-name = "ameba::source::rewriter" >
< a href = "../../Ameba/Source/Rewriter.html" > Rewriter< / a >
< / li >
< / ul >
< / li >
< li class = "parent " data-id = "ameba/Ameba/Spec" data-name = "ameba::spec" >
< a href = "../../Ameba/Spec.html" > Spec< / a >
< ul >
< li class = " " data-id = "ameba/Ameba/Spec/AnnotatedSource" data-name = "ameba::spec::annotatedsource" >
< a href = "../../Ameba/Spec/AnnotatedSource.html" > AnnotatedSource< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Spec/BeValid" data-name = "ameba::spec::bevalid" >
< a href = "../../Ameba/Spec/BeValid.html" > BeValid< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Spec/BeValidExpectation" data-name = "ameba::spec::bevalidexpectation" >
< a href = "../../Ameba/Spec/BeValidExpectation.html" > BeValidExpectation< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Spec/ExpectIssue" data-name = "ameba::spec::expectissue" >
< a href = "../../Ameba/Spec/ExpectIssue.html" > ExpectIssue< / a >
< / li >
< li class = " " data-id = "ameba/Ameba/Spec/Util" data-name = "ameba::spec::util" >
< a href = "../../Ameba/Spec/Util.html" > Util< / a >
< / li >
< / ul >
< / li >
< li class = " " data-id = "ameba/Ameba/Tokenizer" data-name = "ameba::tokenizer" >
< a href = "../../Ameba/Tokenizer.html" > Tokenizer< / a >
< / li >
< / ul >
< / li >
< / ul >
< / div >
< / div >
< div class = "main-content" >
< h1 class = "type-name" >
< span class = "kind" > class< / span > Ameba::Source::Corrector
< / h1 >
< ul class = "superclass-hierarchy" > < li class = "superclass" > < a href = "../../Ameba/Source/Corrector.html" > Ameba::Source::Corrector< / a > < / li > < li class = "superclass" > Reference< / li > < li class = "superclass" > Object< / li > < / ul >
< h2 >
< a id = "overview" class = "anchor" href = "#overview" >
< svg class = "octicon-link" aria-hidden = "true" >
< use href = "#octicon-link" / >
< / svg >
< / a >
Overview
< / h2 >
< p > This class takes source code and rewrites it based
on the different correction actions supplied.< / p >
< h2 >
< a id = "defined-in" class = "anchor" href = "#defined-in" >
< svg class = "octicon-link" aria-hidden = "true" >
< use href = "#octicon-link" / >
< / svg >
< / a >
Defined in:
< / h2 >
2023-01-30 21:42:11 +00:00
< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L6" target = "_blank" >
2021-11-01 19:25:45 +00:00
ameba/source/corrector.cr
< / a >
< br / >
< h2 >
< a id = "constructors" class = "anchor" href = "#constructors" >
< svg class = "octicon-link" aria-hidden = "true" >
< use href = "#octicon-link" / >
< / svg >
< / a >
Constructors
< / h2 >
< ul class = "list-summary" >
< li class = "entry-summary" >
< a href = "#new%28code%3AString%29-class-method" class = "signature" > < strong > .new< / strong > (code : String)< / a >
< / li >
< / ul >
< h2 >
< a id = "instance-method-summary" class = "anchor" href = "#instance-method-summary" >
< svg class = "octicon-link" aria-hidden = "true" >
< use href = "#octicon-link" / >
< / svg >
< / a >
Instance Method Summary
< / h2 >
< ul class = "list-summary" >
< li class = "entry-summary" >
< a href = "#insert_after%28location%2Cend_location%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_after< / strong > (location, end_location, content)< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28location%2Cend_location%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(location, end_location, nil, content)< / a > < / code > < / p > < / div >
< / li >
2023-01-03 18:26:19 +00:00
< li class = "entry-summary" >
< a href = "#insert_after%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_after< / strong > (range : Range(Int32, Int32), content)< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(range, nil, content)< / a > < / code > < / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#insert_after%28pos%3AInt32%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_after< / strong > (pos : Int32, content)< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#insert_after%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #insert_after(...pos, content)< / a > < / code > < / p > < / div >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "entry-summary" >
< a href = "#insert_after%28node%3ACrystal%3A%3AASTNode%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_after< / strong > (node : Crystal::ASTNode, content)< / a >
2023-01-03 18:26:19 +00:00
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(node, nil, content)< / a > < / code > < / p > < / div >
2021-11-01 19:25:45 +00:00
< / li >
< li class = "entry-summary" >
< a href = "#insert_after%28location%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_after< / strong > (location, content)< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#insert_after%28location%2Cend_location%2Ccontent%29-instance-method" > #insert_after(location, location, content)< / a > < / code > < / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#insert_before%28location%2Cend_location%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_before< / strong > (location, end_location, content)< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28location%2Cend_location%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(location, end_location, content, nil)< / a > < / code > < / p > < / div >
< / li >
2023-01-03 18:26:19 +00:00
< li class = "entry-summary" >
< a href = "#insert_before%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_before< / strong > (range : Range(Int32, Int32), content)< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(range, content, nil)< / a > < / code > < / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#insert_before%28pos%3AInt32%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_before< / strong > (pos : Int32, content)< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#insert_before%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #insert_before(pos.., content)< / a > < / code > < / p > < / div >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "entry-summary" >
< a href = "#insert_before%28node%3ACrystal%3A%3AASTNode%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_before< / strong > (node : Crystal::ASTNode, content)< / a >
2023-01-03 18:26:19 +00:00
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(node, content, nil)< / a > < / code > < / p > < / div >
2021-11-01 19:25:45 +00:00
< / li >
< li class = "entry-summary" >
< a href = "#insert_before%28location%2Ccontent%29-instance-method" class = "signature" > < strong > #insert_before< / strong > (location, content)< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#insert_before%28location%2Cend_location%2Ccontent%29-instance-method" > #insert_before(location, location, content)< / a > < / code > < / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#process-instance-method" class = "signature" > < strong > #process< / strong > < / a >
< div class = "summary" > < p > Applies all scheduled changes and returns modified source as a new string.< / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#remove%28location%2Cend_location%29-instance-method" class = "signature" > < strong > #remove< / strong > (location, end_location)< / a >
2022-03-08 11:21:07 +00:00
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#replace%28location%2Cend_location%2Ccontent%29-instance-method" > #replace(location, end_location, " " )< / a > < / code > < / p > < / div >
2021-11-01 19:25:45 +00:00
< / li >
2023-01-03 18:26:19 +00:00
< li class = "entry-summary" >
< a href = "#remove%28range%3ARange%28Int32%2CInt32%29%29-instance-method" class = "signature" > < strong > #remove< / strong > (range : Range(Int32, Int32))< / a >
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#replace%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #replace(range, " " )< / a > < / code > < / p > < / div >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "entry-summary" >
< a href = "#remove%28node%3ACrystal%3A%3AASTNode%29-instance-method" class = "signature" > < strong > #remove< / strong > (node : Crystal::ASTNode)< / a >
2023-01-03 18:26:19 +00:00
< div class = "summary" > < p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#replace%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #replace(node, " " )< / a > < / code > < / p > < / div >
2021-11-01 19:25:45 +00:00
< / li >
< li class = "entry-summary" >
< a href = "#remove_leading%28location%2Cend_location%2Csize%29-instance-method" class = "signature" > < strong > #remove_leading< / strong > (location, end_location, size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters from the beginning of the given range.< / p > < / div >
< / li >
2023-01-03 18:26:19 +00:00
< li class = "entry-summary" >
< a href = "#remove_leading%28range%3ARange%28Int32%2CInt32%29%2Csize%29-instance-method" class = "signature" > < strong > #remove_leading< / strong > (range : Range(Int32, Int32), size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters from the beginning of the given range.< / p > < / div >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "entry-summary" >
< a href = "#remove_leading%28node%3ACrystal%3A%3AASTNode%2Csize%29-instance-method" class = "signature" > < strong > #remove_leading< / strong > (node : Crystal::ASTNode, size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters from the beginning of the given node.< / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#remove_preceding%28location%2Cend_location%2Csize%29-instance-method" class = "signature" > < strong > #remove_preceding< / strong > (location, end_location, size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters prior to the source range.< / p > < / div >
< / li >
2023-01-03 18:26:19 +00:00
< li class = "entry-summary" >
< a href = "#remove_preceding%28range%3ARange%28Int32%2CInt32%29%2Csize%29-instance-method" class = "signature" > < strong > #remove_preceding< / strong > (range : Range(Int32, Int32), size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters prior to the source range.< / p > < / div >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "entry-summary" >
< a href = "#remove_preceding%28node%3ACrystal%3A%3AASTNode%2Csize%29-instance-method" class = "signature" > < strong > #remove_preceding< / strong > (node : Crystal::ASTNode, size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters prior to the given node.< / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#remove_trailing%28location%2Cend_location%2Csize%29-instance-method" class = "signature" > < strong > #remove_trailing< / strong > (location, end_location, size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters from the end of the given range.< / p > < / div >
< / li >
2023-01-03 18:26:19 +00:00
< li class = "entry-summary" >
< a href = "#remove_trailing%28range%3ARange%28Int32%2CInt32%29%2Csize%29-instance-method" class = "signature" > < strong > #remove_trailing< / strong > (range : Range(Int32, Int32), size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters from the end of the given range.< / p > < / div >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "entry-summary" >
< a href = "#remove_trailing%28node%3ACrystal%3A%3AASTNode%2Csize%29-instance-method" class = "signature" > < strong > #remove_trailing< / strong > (node : Crystal::ASTNode, size)< / a >
< div class = "summary" > < p > Removes < em > size< / em > characters from the end of the given node.< / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#replace%28location%2Cend_location%2Ccontent%29-instance-method" class = "signature" > < strong > #replace< / strong > (location, end_location, content)< / a >
< div class = "summary" > < p > Replaces the code of the given range with < em > content< / em > .< / p > < / div >
< / li >
2023-01-03 18:26:19 +00:00
< li class = "entry-summary" >
< a href = "#replace%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" class = "signature" > < strong > #replace< / strong > (range : Range(Int32, Int32), content)< / a >
< div class = "summary" > < p > Replaces the code of the given range with < em > content< / em > .< / p > < / div >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "entry-summary" >
< a href = "#replace%28node%3ACrystal%3A%3AASTNode%2Ccontent%29-instance-method" class = "signature" > < strong > #replace< / strong > (node : Crystal::ASTNode, content)< / a >
< div class = "summary" > < p > Replaces the code of the given node with < em > content< / em > .< / p > < / div >
< / li >
< li class = "entry-summary" >
< a href = "#wrap%28location%2Cend_location%2Cinsert_before%2Cinsert_after%29-instance-method" class = "signature" > < strong > #wrap< / strong > (location, end_location, insert_before, insert_after)< / a >
< div class = "summary" > < p > Inserts the given strings before and after the given range.< / p > < / div >
< / li >
2023-01-03 18:26:19 +00:00
< li class = "entry-summary" >
< a href = "#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" class = "signature" > < strong > #wrap< / strong > (range : Range(Int32, Int32), insert_before, insert_after)< / a >
< div class = "summary" > < p > Inserts the given strings before and after the given range.< / p > < / div >
< / li >
2021-11-01 19:25:45 +00:00
< li class = "entry-summary" >
< a href = "#wrap%28node%3ACrystal%3A%3AASTNode%2Cinsert_before%2Cinsert_after%29-instance-method" class = "signature" > < strong > #wrap< / strong > (node : Crystal::ASTNode, insert_before, insert_after)< / a >
< div class = "summary" > < p > Inserts the given strings before and after the given node.< / p > < / div >
< / li >
< / ul >
< div class = "methods-inherited" >
< / div >
< h2 >
< a id = "constructor-detail" class = "anchor" href = "#constructor-detail" >
< svg class = "octicon-link" aria-hidden = "true" >
< use href = "#octicon-link" / >
< / svg >
< / a >
Constructor Detail
< / h2 >
< div class = "entry-detail" id = "new(code:String)-class-method" >
< div class = "signature" >
def self.< strong > new< / strong > (code : String)
< a class = "method-permalink" href = "#new%28code%3AString%29-class-method" > #< / a >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L9" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< h2 >
< a id = "instance-method-detail" class = "anchor" href = "#instance-method-detail" >
< svg class = "octicon-link" aria-hidden = "true" >
< use href = "#octicon-link" / >
< / svg >
< / a >
Instance Method Detail
< / h2 >
< div class = "entry-detail" id = "insert_after(location,end_location,content)-instance-method" >
< div class = "signature" >
def < strong > insert_after< / strong > (location, end_location, content)
< a class = "method-permalink" href = "#insert_after%28location%2Cend_location%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28location%2Cend_location%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(location, end_location, nil, content)< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L65" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_after(range:Range(Int32,Int32),content)-instance-method" >
< div class = "signature" >
def < strong > insert_after< / strong > (range : Range(Int32, Int32), content)
< a class = "method-permalink" href = "#insert_after%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(range, nil, content)< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L70" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_after(pos:Int32,content)-instance-method" >
< div class = "signature" >
def < strong > insert_after< / strong > (pos : Int32, content)
< a class = "method-permalink" href = "#insert_after%28pos%3AInt32%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#insert_after%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #insert_after(...pos, content)< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L92" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_after(node:Crystal::ASTNode,content)-instance-method" >
< div class = "signature" >
def < strong > insert_after< / strong > (node : Crystal::ASTNode, content)
< a class = "method-permalink" href = "#insert_after%28node%3ACrystal%3A%3AASTNode%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
2023-01-03 18:26:19 +00:00
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(node, nil, content)< / a > < / code > < / p >
2021-11-01 19:25:45 +00:00
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L164" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_after(location,content)-instance-method" >
< div class = "signature" >
def < strong > insert_after< / strong > (location, content)
< a class = "method-permalink" href = "#insert_after%28location%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#insert_after%28location%2Cend_location%2Ccontent%29-instance-method" > #insert_after(location, location, content)< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L87" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_before(location,end_location,content)-instance-method" >
< div class = "signature" >
def < strong > insert_before< / strong > (location, end_location, content)
< a class = "method-permalink" href = "#insert_before%28location%2Cend_location%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28location%2Cend_location%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(location, end_location, content, nil)< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L53" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_before(range:Range(Int32,Int32),content)-instance-method" >
< div class = "signature" >
def < strong > insert_before< / strong > (range : Range(Int32, Int32), content)
< a class = "method-permalink" href = "#insert_before%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(range, content, nil)< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L58" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_before(pos:Int32,content)-instance-method" >
< div class = "signature" >
def < strong > insert_before< / strong > (pos : Int32, content)
< a class = "method-permalink" href = "#insert_before%28pos%3AInt32%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#insert_before%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #insert_before(pos.., content)< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L82" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_before(node:Crystal::ASTNode,content)-instance-method" >
< div class = "signature" >
def < strong > insert_before< / strong > (node : Crystal::ASTNode, content)
< a class = "method-permalink" href = "#insert_before%28node%3ACrystal%3A%3AASTNode%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
2023-01-03 18:26:19 +00:00
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #wrap(node, content, nil)< / a > < / code > < / p >
2021-11-01 19:25:45 +00:00
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L159" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "insert_before(location,content)-instance-method" >
< div class = "signature" >
def < strong > insert_before< / strong > (location, content)
< a class = "method-permalink" href = "#insert_before%28location%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#insert_before%28location%2Cend_location%2Ccontent%29-instance-method" > #insert_before(location, location, content)< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L77" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "process-instance-method" >
< div class = "signature" >
def < strong > process< / strong >
< a class = "method-permalink" href = "#process-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Applies all scheduled changes and returns modified source as a new string.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L196" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove(location,end_location)-instance-method" >
< div class = "signature" >
def < strong > remove< / strong > (location, end_location)
< a class = "method-permalink" href = "#remove%28location%2Cend_location%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
2022-03-08 11:21:07 +00:00
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#replace%28location%2Cend_location%2Ccontent%29-instance-method" > #replace(location, end_location, " " )< / a > < / code > < / p >
2021-11-01 19:25:45 +00:00
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L41" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove(range:Range(Int32,Int32))-instance-method" >
< div class = "signature" >
def < strong > remove< / strong > (range : Range(Int32, Int32))
< a class = "method-permalink" href = "#remove%28range%3ARange%28Int32%2CInt32%29%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#replace%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #replace(range, " " )< / a > < / code > < / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L46" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove(node:Crystal::ASTNode)-instance-method" >
< div class = "signature" >
def < strong > remove< / strong > (node : Crystal::ASTNode)
< a class = "method-permalink" href = "#remove%28node%3ACrystal%3A%3AASTNode%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
2023-01-03 18:26:19 +00:00
< p > Shortcut for < code > < a href = "../../Ameba/Source/Corrector.html#replace%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #replace(node, " " )< / a > < / code > < / p >
2021-11-01 19:25:45 +00:00
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L154" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_leading(location,end_location,size)-instance-method" >
< div class = "signature" >
def < strong > remove_leading< / strong > (location, end_location, size)
< a class = "method-permalink" href = "#remove_leading%28location%2Cend_location%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters from the beginning of the given range.
If < em > size< / em > is greater than the size of the range, the removed region can
overrun the end of the range.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L110" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_leading(range:Range(Int32,Int32),size)-instance-method" >
< div class = "signature" >
def < strong > remove_leading< / strong > (range : Range(Int32, Int32), size)
< a class = "method-permalink" href = "#remove_leading%28range%3ARange%28Int32%2CInt32%29%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters from the beginning of the given range.
If < em > size< / em > is greater than the size of the range, the removed region can
overrun the end of the range.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L115" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_leading(node:Crystal::ASTNode,size)-instance-method" >
< div class = "signature" >
def < strong > remove_leading< / strong > (node : Crystal::ASTNode, size)
< a class = "method-permalink" href = "#remove_leading%28node%3ACrystal%3A%3AASTNode%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters from the beginning of the given node.
If < em > size< / em > is greater than the size of the node, the removed region can
overrun the end of the node.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L176" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_preceding(location,end_location,size)-instance-method" >
< div class = "signature" >
def < strong > remove_preceding< / strong > (location, end_location, size)
< a class = "method-permalink" href = "#remove_preceding%28location%2Cend_location%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters prior to the source range.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L97" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_preceding(range:Range(Int32,Int32),size)-instance-method" >
< div class = "signature" >
def < strong > remove_preceding< / strong > (range : Range(Int32, Int32), size)
< a class = "method-permalink" href = "#remove_preceding%28range%3ARange%28Int32%2CInt32%29%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters prior to the source range.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L102" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_preceding(node:Crystal::ASTNode,size)-instance-method" >
< div class = "signature" >
def < strong > remove_preceding< / strong > (node : Crystal::ASTNode, size)
< a class = "method-permalink" href = "#remove_preceding%28node%3ACrystal%3A%3AASTNode%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters prior to the given node.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L169" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_trailing(location,end_location,size)-instance-method" >
< div class = "signature" >
def < strong > remove_trailing< / strong > (location, end_location, size)
< a class = "method-permalink" href = "#remove_trailing%28location%2Cend_location%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters from the end of the given range.
If < em > size< / em > is greater than the size of the range, the removed region can
overrun the beginning of the range.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L123" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_trailing(range:Range(Int32,Int32),size)-instance-method" >
< div class = "signature" >
def < strong > remove_trailing< / strong > (range : Range(Int32, Int32), size)
< a class = "method-permalink" href = "#remove_trailing%28range%3ARange%28Int32%2CInt32%29%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters from the end of the given range.
If < em > size< / em > is greater than the size of the range, the removed region can
overrun the beginning of the range.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L128" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "remove_trailing(node:Crystal::ASTNode,size)-instance-method" >
< div class = "signature" >
def < strong > remove_trailing< / strong > (node : Crystal::ASTNode, size)
< a class = "method-permalink" href = "#remove_trailing%28node%3ACrystal%3A%3AASTNode%2Csize%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Removes < em > size< / em > characters from the end of the given node.
If < em > size< / em > is greater than the size of the node, the removed region can
overrun the beginning of the node.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L183" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "replace(location,end_location,content)-instance-method" >
< div class = "signature" >
def < strong > replace< / strong > (location, end_location, content)
< a class = "method-permalink" href = "#replace%28location%2Cend_location%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Replaces the code of the given range with < em > content< / em > .< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L17" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "replace(range:Range(Int32,Int32),content)-instance-method" >
< div class = "signature" >
def < strong > replace< / strong > (range : Range(Int32, Int32), content)
< a class = "method-permalink" href = "#replace%28range%3ARange%28Int32%2CInt32%29%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Replaces the code of the given range with < em > content< / em > .< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L22" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "replace(node:Crystal::ASTNode,content)-instance-method" >
< div class = "signature" >
def < strong > replace< / strong > (node : Crystal::ASTNode, content)
< a class = "method-permalink" href = "#replace%28node%3ACrystal%3A%3AASTNode%2Ccontent%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Replaces the code of the given node with < em > content< / em > .< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L144" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "wrap(location,end_location,insert_before,insert_after)-instance-method" >
< div class = "signature" >
def < strong > wrap< / strong > (location, end_location, insert_before, insert_after)
< a class = "method-permalink" href = "#wrap%28location%2Cend_location%2Cinsert_before%2Cinsert_after%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Inserts the given strings before and after the given range.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L29" target = "_blank" > View source< / a > ]
2023-01-03 18:26:19 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "wrap(range:Range(Int32,Int32),insert_before,insert_after)-instance-method" >
< div class = "signature" >
def < strong > wrap< / strong > (range : Range(Int32, Int32), insert_before, insert_after)
< a class = "method-permalink" href = "#wrap%28range%3ARange%28Int32%2CInt32%29%2Cinsert_before%2Cinsert_after%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Inserts the given strings before and after the given range.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L34" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< div class = "entry-detail" id = "wrap(node:Crystal::ASTNode,insert_before,insert_after)-instance-method" >
< div class = "signature" >
def < strong > wrap< / strong > (node : Crystal::ASTNode, insert_before, insert_after)
< a class = "method-permalink" href = "#wrap%28node%3ACrystal%3A%3AASTNode%2Cinsert_before%2Cinsert_after%29-instance-method" > #< / a >
< / div >
< div class = "doc" >
< p > Inserts the given strings before and after the given node.< / p >
< / div >
< br / >
< div >
2023-01-30 21:42:11 +00:00
[< a href = "https://github.com/crystal-ameba/ameba/blob/de5c6ad/src/ameba/source/corrector.cr#L149" target = "_blank" > View source< / a > ]
2021-11-01 19:25:45 +00:00
< / div >
< / div >
< / div >
< / body >
< / html >