[PATCH] D36836: [clang-tidy] Implement sonarsource-function-cognitive-complexity check
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 23 03:12:32 PDT 2020
lebedev.ri updated this revision to Diff 293678.
lebedev.ri edited the summary of this revision.
lebedev.ri added a comment.
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D36836/new/
https://reviews.llvm.org/D36836
Files:
clang-tools-extra/clang-tidy/CMakeLists.txt
clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
clang-tools-extra/clang-tidy/sonarsource/CMakeLists.txt
clang-tools-extra/clang-tidy/sonarsource/FunctionCognitiveComplexityCheck.cpp
clang-tools-extra/clang-tidy/sonarsource/FunctionCognitiveComplexityCheck.h
clang-tools-extra/clang-tidy/sonarsource/LICENSE.TXT
clang-tools-extra/clang-tidy/sonarsource/SONARSOURCETidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/sonarsource-function-cognitive-complexity.rst
clang-tools-extra/test/clang-tidy/checkers/sonarsource-function-cognitive-complexity.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36836.293678.patch
Type: text/x-patch
Size: 72568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200923/d263c402/attachment-0001.bin>
More information about the cfe-commits
mailing list