[PATCH] D36836: [clang-tidy] Implement sonarsource-function-cognitive-complexity check
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 24 02:04:30 PDT 2020
JonasToth added a comment.
In D36836#2289639 <https://reviews.llvm.org/D36836#2289639>, @lebedev.ri wrote:
> Rebased.
>
> There is a number of official open-source LGPL-3 implementations already:
>
> - https://github.com/SonarSource/SonarTS/pull/378
> - https://github.com/SonarSource/sonar-java/pull/1385
> - https://github.com/SonarSource/SonarJS/pull/449
> - https://github.com/SonarSource/sonar-php/pull/173
>
> There are other open-source LGPL-3 implementations already:
>
> - https://pypi.org/project/cognitive-complexity/ (MIT)
> - https://github.com/rossmacarthur/complexity (APACHE/MIT)
>
> There are other 3rd party implementations:
>
> - https://docs.codeclimate.com/docs/cognitive-complexity
>
> Quite honestly, i do not understand how did the license question arose.
> Would have it been fine if i based this on the open-source-licensed code?
> Would have it not been? Would same license question be raised?
> Somehow i don't think it would have been.
>
> Is this really just about `Copyright SonarSource S.A., 2018, Switzerland. All content is copyright protected.` in https://www.sonarsource.com/docs/CognitiveComplexity.pdf ?
> But that is only about the document, not the algorithm.
> But even if we enternain the idea that all of the implementations must bow to that license,
> then surely this is not the first code in LLVM that is implicitly/explicitly based on copyrighted doc.
>
> This is rather frustrating.
Given there are open source implementations, this is in my eyes completly acceptable to implement this in llvm.
The document is copyrighted, true. The algorithm itself is not, in european law it is even very hard to patent algorithms, software in general is not patentable.
The code is not copy&pasted, so there are no infringements on anything.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D36836/new/
https://reviews.llvm.org/D36836
More information about the cfe-commits
mailing list