[swift-evolution] Proposal: Require functions to have a cyclomatic complexity of <= 10.

Craig Cruden ccruden at novafore.com
Mon Feb 1 10:36:53 CST 2016


Code analytics, code style enforcement can be done by linters — and as such should not be enforced through the language compiler itself.  Trying to foresee all possible scenarios, is fraught with unintended consequences. 



> On 2016-02-01, at 23:28:36, Amir Michail via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On Jan 31, 2016, at 6:10 PM, David Sweeris <davesweeris at mac.com> wrote:
>> 
>> -1 because 64k isn't actually always enough for everyone.
>> 
> 
> I’ve been using the implementation of cyclomatic complexity in swiftlint and have not encountered any limitations that I couldn’t overcome by refactoring my code.
> 
>> - Dave Sweeris
>> 
>>> On Jan 31, 2016, at 08:45, Amir Michail via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> I think that this one metric built into the language would have a huge impact on Swift development and for the better.
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list