v1.7.0 #895
Sija
announced in
Announcements
v1.7.0
#895
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Release in numbers
Our biggest release yet 🐳
What's Changed
Warning
Breaking changes ahead!⚠️
Each is marked by the following sign:
Community
With this release, we've grown more than just a version, as we've got a new team member — @nobodywasishere ❤️
New website and domain
Ameba website has been redesigned and is now available at crystal-ameba.org.
New Rules
37 new rules added.
LintLint/AssignmentInCallArgumentrule by @Sija in AddLint/AssignmentInCallArgumentrule #777Lint/DeprecatedRulerule by @Sija in Implement rule deprecation mechanism #829Lint/DuplicateBranchrule by @Sija in AddLint/DuplicateBranchrule #582Lint/DuplicateEnumValuerule by @Sija in AddLint/DuplicateEnumValuerule #680Lint/DuplicateMethodSignaturerule by @Sija in AddLint/DuplicateMethodSignaturerule #697Lint/DuplicateWhenConditionrule by @Sija in AddLint/DuplicateWhenConditionrule #568, Add support forselectcontrol expressions inLint/DuplicateWhenConditionrule #575Lint/ElseNilrule by @Sija in AddLint/ElseNilrule #601Lint/EnumMemberNameConflictrule by @Sija in AddLint/EnumMemberNameConflictrule #694Lint/NonExistentRulerule by @Sija in ExtractLint/NonExistentRulefromLint/BadDirective#809, ChangeLint::NonExistentRule#since_versionto0.13.0#818Lint/RequireParenthesesrule by @nobodywasishere in AddLint/RequireParentheses#510Lint/SelfInitializeDefinitionrule by @Sija in AddLint/SelfInitializeDefinitionrule #636Lint/SignalTraprule by @Sija in AddLint/SignalTraprule #591Lint/SpecEqWithBoolOrNilLiteralrule by @Sija in AddLint/SpecEqWithBoolOrNilLiteralrule #567, Covershould_notcall inLint/SpecEqWithBoolOrNilLiteralrule #609Lint/TopLevelOperatorDefinitionrule by @nobodywasishere in AddLint/TopLevelOperatorDefinition#579, Do not report procs as top level operator definitions #587, Allow top-level operator definition in calls #613Lint/TrailingRescueExceptionrule by @nobodywasishere in AddLint/TrailingRescueException#512Lint/UnusedExpressionrule by @nobodywasishere in AddLint/UnusedComparisonandLint/UnusedLiteral#507, Fix edge cases withLint/UnusedComparisonandLint/UnusedLiteral#533, AddLint/UnusedGenericOrUnion#537, AddLint/Unused{Local,Instance,Class}VariableAccess#552, AddLint/UnusedSelfAccessandLint/UnusedPseudoMethodCall#556, Consolidate unused expression rules into oneLint/UnusedExpressionrule #646Lint/UnusedRescueVariablerule by @Sija in AddLint/UnusedRescueVariablerule #766, MakeLint/UnusedRescueVariablemacro-aware #817Lint/UselessVisibilityModifierrule by @Sija in AddLint/UselessVisibilityModifierrule #639, Tweak issue location forLint/UselessVisibilityModifierrule #867Lint/VoidOutsideLibrule by @nobodywasishere in AddLint/VoidOutsideLib#602Lint/WhitespaceAroundMacroExpressionrule by @Sija in AddLint/WhitespaceAroundMacroExpressionrule #583StyleStyle/CallParenthesesrule by @Sija in AddStyle/CallParenthesesrule #737, AddExcludeMultilineCallsoption toStyle/CallParenthesesrule #834, FixupStyle/CallParenthesesrule #837, Fix square bracket calls inStyle/CallParenthesesrule #839, Addexcluded_dsl_call_namesoption to theStyle/CallParenthesesrule #842, TweakStyle/CallParenthesesrule default settings #843, Addpending!to the list of default excluded calls in theStyle/CallParenthesesrule #860Style/Elsifrule by @Sija in AddStyle/Elsifrule #723, Addignore_suffixoption toStyle/Elsifrule #739Style/HeredocEscaperule by @nobodywasishere & @Sija in AddStyle/HeredocEscape#580, Ignore Regex character types inStyle/HeredocEscape#635Style/HeredocIndentrule by @nobodywasishere & @Sija in AddStyle/HeredocIndent#554, Add autocorrect toStyle/HeredocIndentrule #747, FixStyle/HeredocIndentautocorrect bug #750, Addbody_auto_dedentproperty toStyle/HeredocIndentrule #754Style/MultilineCurlyBlockrule by @nobodywasishere in AddStyle/MultilineCurlyBlock#524, Support autocorrection inStyle/MultilineCurlyBlock#595, Revert "Support autocorrection inStyle/MultilineCurlyBlock" #597Style/MultilineStringLiteralrule by @Sija in AddStyle/MultilineStringLiteralrule #679, Do not report%rand%xmultiline literals inStyle/MultilineStringLiteralrule #804Style/PercentLiteralDelimitersrule by @Sija in AddStyle/PercentLiteralDelimitersrule #570, Support autocorrection inStyle/PercentLiteralDelimiters#594Style/RedundantNilInControlExpressionrule by @Sija in AddStyle/RedundantNilInControlExpressionrule #695Style/RedundantSelfrule by @Sija in AddStyle/RedundantSelfrule #547, Fix operator assign calls reported as false positives inStyle/RedundantSelf#607, FixStyle/RedundantSelfrule autocorrection in case of multiline calls #701, FixStyle/RedundantSelfautocorrect bug #751Style/VerboseNilTyperule by @Sija in AddStyle/VerboseNilTyperule #736, FixStyle/VerboseNilTyperule autocorrection bug #745, Collapse single type parenthesized unions inStyle/VerboseNilType#746, AddOnlyTwoElementUnionssetting to theStyle/VerboseNilTyperule #891Style/ArrayLiteralSyntaxrule by @nobodywasishere in AddStyle/{Array,Hash}LiteralSyntax#644Style/HashLiteralSyntaxrule by @nobodywasishere in AddStyle/{Array,Hash}LiteralSyntax#644TypingTyping/MacroCallArgumentTypeRestrictionrule by @nobodywasishere in AddTyping/MacroCallArgumentTypeRestriction#521Typing/MethodParameterTypeRestrictionrule by @nobodywasishere & @Sija in AddTyping/MethodParameterTypeRestriction#520, Fix issue location inTyping/MethodParameterTypeRestrictionrule #664Typing/MethodReturnTypeRestrictionrule by @nobodywasishere in AddTyping/MethodReturnTypeRestriction#519Typing/ProcLiteralReturnTypeRestrictionrule by @nobodywasishere in AddTyping/ProcLiteralReturnTypeRestriction#522PerformancePerformance/TimesMaprule by @Sija in AddPerformance/TimesMaprule #672, Fix autocorrection inPerformance/TimesMaprule #696Renamed Rules
Documentation/DocumentationAdmonition->Documentation/Admonitionrule by @Sija in RenameDocumentation/DocumentationAdmonitionrule to justDocumentation/Admonition#647Lint/DuplicatedRequire->Lint/DuplicateRequirerule by @Sija in Rename ruleLint/DuplicatedRequire->Lint/DuplicateRequire#873Deprecated Rules
Performance/AnyInsteadOfEmptyrule by @Sija in AddPerformance/AnyInsteadOfEmptyrule back (as deprecated) #846Rules disabled by default
Documentation/Admonitionrule by @Sija in DisableDocumentation/Admonitionrule by default #648Lint/Typosrule by @Sija in DisableLint/Typosrule by default #721New Rule Options
Documentation/Documentation: AddRequireExampleoption by @Sija in Addrequire_exampleoption toDocumentationrule #727Lint/SpecFilename: AddIgnoredPathsoption by @Sija inLint/SpecFilename: ReplaceIgnoredDirsandIgnoredFilenamesproperties withIgnoredPaths#850Naming/BinaryOperatorParameterName: AddAllowedNamesoption by @Sija in AddAllowedNamesproperty toNaming/BinaryOperatorParameterNamerule #690Style/ParenthesesAroundCondition: AddExcludeMultilineoption by @Sija in Addexclude_multilinesetting toStyle/ParenthesesAroundConditionrule #649Removed Rule Options
Lint/UselessAssign: RemoveExcludeTypeDeclarationsoption by @Sija in Do not report type declarations within calls inLint/UselessAssign#769Lint/SpecFilename: RemoveIgnoredDirsoption by @Sija inLint/SpecFilename: ReplaceIgnoredDirsandIgnoredFilenamesproperties withIgnoredPaths#850Lint/SpecFilename: RemoveIgnoredFilenamesoption by @Sija inLint/SpecFilename: ReplaceIgnoredDirsandIgnoredFilenamesproperties withIgnoredPaths#850Rule Enhancements
Lint/RedundantStringCoercion: Add autocorrect by @Sija in Add autocorrect toLint/RedundantStringCoercionrule #885Lint/ShadowedArgument: Move to liveness analysis by @veelenga in refactor: moveShadowedArgumentandSharedVarInFiberto liveness analysis #795Lint/SharedVarInFiber: Move to liveness analysis by @veelenga in refactor: moveShadowedArgumentandSharedVarInFiberto liveness analysis #795Lint/UnreachableCode: Support control expressions in blocks by @Sija in TweakLint/UnreachableCodeto support control expressions in blocks #872, Cleanup redundant overrides inAST::FlowExpressionVisitor#889Lint/UselessAssign: Refactor rule using liveness analysis by @veelenga in feat: backward dataflow liveness analysis #785, fix: skip value-less type declarations in useless assign check #799, fix: preserve rescue liveness across flow control in exception handler #805, OptimizeAST::LivenessAnalyzerassignment map implementation #810Naming/BlockParameterName: Addaandbto allowed name list by @Sija in AddaandbtoBlockParameterName#allowed_names#675Naming/BlockParameterName: Addwg(WaitGroup) as allowed block parameter name by @mamantoha in Addwg(WaitGroup) as allowed block parameter name #589Naming/RescuedExceptionsVariableName: Adderrto allowed name list by @Sija in AdderrtoAllowedNamesinNaming/RescuedExceptionsVariableNamerule #814Performance/ChainedCallWithNoBang: Addunstable_sortto the call name list by @Sija in Addunstable_sortto the call name list inPerformance/ChainedCallWithNoBangrule #558Style/RedundantBegin: Apply the rule to blocks as well by @Sija in ApplyStyle/RedundantBeginrule to blocks as well #865Style/RedundantNext: Reportif/unlessbranches with noelseby @Sija in MakeAST::RedundantControlExpressionVisitorreportif/unlessbranches with noelse#820Style/RedundantReturn: Reportif/unlessbranches with noelseby @Sija in MakeAST::RedundantControlExpressionVisitorreportif/unlessbranches with noelse#820Improved Issue Locations
Documentation/Admonitionissues by @Sija in Tweak reported location ofDocumentation/DocumentationAdmonitionissues #569Lint/BadDirectiveissues by @Sija in Tweak reported location ofLint/BadDirectiveissues #572Lint/LiteralInConditionissues by @Sija in Tweak reported location ofLint/LiteralInConditionissues #574Lint/PercentArraysissues by @Sija in Tweak reported location ofLint/PercentArraysissues #571Lint/UnneededDisableDirectiveissues by @Sija in Tweak reported location ofLint/UnneededDisableDirectiveissues #573Lint/UnreachableCodeissues by @Sija in Tweak issue location forLint/UnreachableCoderule #870Lint/UnusedArgumentissues by @Sija in Fix the reported issue end location inLint/UnusedArgumentrule #657Naming/BinaryOperatorParameterNameissues by @Sija in Improve issue location accuracy for more rules #661Naming/BlockParameterNameissues by @Sija in Improve issue location accuracy for more rules #661Naming/RescuedExceptionsVariableNameissues by @Sija in Improve issue location accuracy for more rules #661Naming/ShadowingOuterLocalVarissues by @Sija in Fix issue location inNaming/ShadowingOuterLocalVarrule #662Naming/VariableNamesissues by @Sija in Fix issue location inNaming/VariableNamesrule #663Style/RedundantNextissues by @Sija in Tweak the reported issues location forStyle/RedundantNextandStyle/RedundantReturn#821Style/RedundantReturnissues by @Sija in Tweak the reported issues location forStyle/RedundantNextandStyle/RedundantReturn#821Rule Bug Fixes
Layout/TrailingWhitespace: Do not report CRLF sequences by @Sija in Do not report CRLF sequences inLayout/TrailingWhitespacerule #627Lint/Formatting: AvoidIndexErrorwhen autocorrecting source with no trailing newline by @SAY-5 inLint/Formatting: avoidIndexErrorwhen autocorrecting source with no trailing newline #832Lint/LiteralInInterpolation: Do not report magic constants by @Sija in Do not report magic constants inLint/LiteralInInterpolation#596Lint/LiteralInInterpolation: Report only static literals by @Sija in Report only static literals inLint/LiteralInInterpolation#638Lint/LiteralsComparison: Fix regression by @Sija in Fix regression inLint/LiteralsComparison#630Lint/LiteralsComparison: Skip dynamic literals comparison by @Sija in Skip dynamic literals comparison inLint/LiteralsComparison#633Lint/SpecFocus: Do not reportfocusvalues which are calls or vars by @Sija in Do not reportfocusvalues which are calls or vars inLint/SpecFocus#606Lint/UnneededDisableDirective: Rule fixes by @veelenga inLint/UnneededDisableDirectiverule fixes #788Lint/UnneededDisableDirective: Skip non-existent rules by @Sija in Skip non-existent rules inLint/UnneededDisableDirectiverule #808Lint/UselessAssign: Avoid inheriting vars from outer scope indefby @straight-shoota inLint/UselessAssign: Fix avoid inheriting vars from outer scope indef#625Lint/UselessAssign: Do not report type declarations within calls by @Sija in Do not report type declarations within calls inLint/UselessAssign#769, Fix a couple of edge cases missed in #769 #776Lint/UselessAssign: Fix scopes by @veelenga in fix: useless assign scopes #784Lint/ShadowingOuterLocalVar: Do not flag block argument shadowing across mutually exclusive branches by @veelenga in fix: do not flag block argument shadowing across mutually exclusive branches inLint/ShadowingOuterLocalVar#824Lint/ShadowingOuterLocalVar: Do not flag block argument shadowing inside the initial assignment by @veelenga in fix: do not flag block argument shadowing inside the initial assignment inLint/ShadowingOuterLocalVar#826Lint/ShadowingOuterLocalVar: Avoid false positives across unconnected branches by @veelenga in fix: avoid false positives across unconnected branches inLint/ShadowingOuterLocalVar#838Lint/SpecFilename: UseSource#project_pathproperty to get relative path by @Sija in FixLint/SpecFilenamerule to useSource#project_pathproperty to get relative path #851, FixupSource#project_pathusage inLint/SpecFilenamerule #854Metrics/CyclomaticComplexity: Includeunlessin nodes counted by @Sija in Addunlessto nodes counted byAST::CountingVisitor#586Naming/AccessorMethodName: Fix false-positives by @Sija in Fix false-positives inNaming/AccessorMethodNamerule #716Naming/ConstantNames: Fix reporting single-line constant assigns with namespaces by @nobodywasishere in FixNaming/ConstantNamesreporting single-line constant assigns with namespaces #655Performance/AnyInsteadOfPresent: Fix autocorrection bug by @Sija in Fix autocorrection bug inPerformance/AnyInsteadOfPresentrule #712Style/ParenthesesAroundCondition: Fix autocorrection putting right parenthesis on newline when condition ends with implicit call by @FnControlOption inStyle/ParenthesesAroundConditioncorrection putting right parenthesis on newline when condition ends with implicit call #548Style/ParenthesesAroundCondition: Do not strip parentheses from conditions withrescue,ensure,iforunlessby @Sija in Do not strip parentheses from conditions withrescue,ensure,iforunless#631New Features
GitHubActionsFormatter#531, Fix missing issue message escaping in GHA formatter #758-devsuffix from the version string written into.ameba.yml#752, Disable the version constraint when--onlyflag is given #767.ameba.yml(and its generator) by @nobodywasishere & @Sija in Add a JSON Schema for.ameba.ymland a CLI tool for automatically generating it #497, JSON Schema generator tweaks #685, JSON Schema generator tweaks, pt. 2 #687, Skip ruledescriptionproperty for JSON Schema as it’s redundant #692, Remove documentation link in JSON Schema rule description #698, JSON Schema builder tweaks #699, AddFormatterkey to the JSON schema #714Enhancements
--fail-levelCLI switch with--min-severityby @Sija in Replace--fail-levelCLI switch with--min-severity#761--gen-configby @straight-shoota in Remove noise from--gen-config#616extend self#643:nodoc:methods inTypingrules by @Sija in Add ability to ignore:nodoc:methods inTypingrules #557--ignore-configCLI flag by @Sija in Always preserve excluded files in config + add--ignore-config-fileCLI flag #841, Rename--ignore-config-fileCLI flag to--ignore-config#845Presenter::RulePresenteroutput the rule documentation url by @Sija in MakePresenter::RulePresenteroutput the rule documentation url #868, No need to colorize the rule documentation url [fixup #868] #869Bug Fixes
Formatter::DotFormatterfailures count by @Sija in FixDotFormatterfailures count #530selectexpression omissions by @Sija in Fixselectexpression omissions #629Boolfrom#visitmethods by @Sija in Make sure to returnBoolfrom#visitmethods #715AST::ScopeVisitorby @Sija in Correctly reset location-less node scope inAST::ScopeVisitor#806--fail-levelCLI switch not having any effect by @Sija in Fix--fail-levelCLI switch not having any effect #759--fail-levelCLI switch not having any effect" by @Sija in Revert "Fix--fail-levelCLI switch not having any effect" #760Formatter::Util#affected_codelocation marker display logic by @Sija in Fix edgecase inFormatter::Util#affected_codelocation marker display logic #813--ignore-config-fileCLI flag #841AST::Util#loop?method by @Sija in FixAST::Util#loop?method #888Refactors
AST::ImplicitReturnVisitorby @nobodywasishere & @Sija in AddLint/UnusedComparisonandLint/UnusedLiteral#507, Fix edge cases withLint/UnusedComparisonandLint/UnusedLiteral#533, AddLint/UnusedGenericOrUnion#537,AST::ImplicitReturnVisitorimplicit return fixes forCrystal::ExceptionHandler#549, Mark object ofCastandNilableCastas used by theAST::ImplicitReturnVisitor#551, AddLint/Unused{Local,Instance,Class}VariableAccess#552,AST::ImplicitReturnVisitormacro expression and control support #553, RefactorAST::ImplicitReturnVisitorby removing thenode_is_usedargument passed to the underlying rule #563, The last line of initialize methods do not implicitly return #584, Consolidate unused expression rules into oneLint/UnusedExpressionrule #646, Add spec coverage forAST::ImplicitReturnVisitor#770Lint/Unused*specs by @nobodywasishere in Refactor recentLint/Unused*specs #562Lint/LiteralInConditionrule by @Sija in TweakLint/LiteralInConditionrule #577Lint/RedundantWithIndexrule by @Sija in Constantinize issue messages inLint/RedundantWithIndex#637Ext::Location#same_line?helper method by @Sija in AddExt::Location#same_line?helper method #651Rule::Base#hashtake#groupinto account by @Sija in MakeRule::Base#hashtake#groupinto account #652Lint/Typosrule by @Sija in TweakLint/Typosrule #683AST::Util#operator_method{_name}?by @Sija in AddAST::Util#operator_method{_name}?#691git-branchinput required" #709Configrefactors by @Sija in CLI andConfigrefactors #713Crystal::Callarguments existence checking logic by @Sija in RefactorCrystal::Callarguments existence checking logic #717Lint/Typosrule by @Sija in Revert to the previous implementation ofLint/Typos#719./prefix by @Sija in Normalize relative source paths by stripping the./prefix #728RuleCollectionPresenter" #740, v1.7.0 final polish #811, Final touches for v1.7.0 #881Ameba::Versionby @Sija in AddAmeba::Version#755Source#project_pathproperty by @Sija in AddSource#project_pathproperty #849, FixupSource#project_pathproperty #853Infrastructure
postinstallscript) by @Sija in Skip auto compilation (dropspostinstallscript) #741bin/ameba.crexecutable by @Sija in Don’t installbin/ameba.crexecutable #807.vscodeand.zedfolders to.gitignoreby @nobodywasishere in Add.vscodeand.zedfolders to.gitignore#564--releaseflag by @Sija in Build Docker image with the--releaseflag #730, fixup: Build Docker image with the--releaseflag #731CRFLAGSbuild argument by @Sija in Do not use quotes forCRFLAGSbuild argument #732_typos.tomlconfiguration file by @Sija in Add_typos.tomlconfiguration file #681_typos.tomlto.typos.tomlby @Sija in Rename_typos.tomlto.typos.toml#764Style/CallParenthesesrule in Ameba repo by @Sija in Enable theStyle/CallParenthesesrule in Ameba repo #844crystal-ameba.orgdomain by @Sija in Point urls to the newcrystal-ameba.orgdomain #876/apipath by @Sija in Point documentation urls to the new/apipath #877/apipath prefix in docs CI workflows by @Sija in Use the new/apipath prefix in docs CI workflows #879SECURITY.mdby @Sija in Add SECURITY.md #880Dependabot
New Contributors
Lint/Formatting: avoidIndexErrorwhen autocorrecting source with no trailing newline #832Warning
Requires Crystal
1.19.0Full Changelog: v1.6.4...v1.7.0
This discussion was created from the release v1.7.0.
All reactions