Skip to content

Commit c26d05b

Browse files
authored
Merge pull request #5532 from RasmusWL/python-cleanup
Python: Delete filter queries, code duplication library, and precision tag from metric queries
2 parents 3613ceb + 96a66fa commit c26d05b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+35
-1248
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lgtm,codescanning
2+
* The legacy code duplication library has been removed.
3+
* Legacy filter queries have been removed.

python/ql/src/Filters/NotGenerated.ql

Lines changed: 0 additions & 14 deletions
This file was deleted.

python/ql/src/Filters/NotTest.ql

Lines changed: 0 additions & 14 deletions
This file was deleted.

python/ql/src/Lexical/FCommentedOutCode.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* @kind treemap
55
* @treemap.warnOn highValues
66
* @metricType file
7-
* @precision high
87
* @tags maintainability
98
* @id py/lines-of-commented-out-code-in-files
109
*/

python/ql/src/Metrics/Dependencies/ExternalDependencies.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* @kind treemap
66
* @treemap.warnOn highValues
77
* @metricType externalDependency
8-
* @precision medium
98
* @id py/external-dependencies
109
*/
1110

python/ql/src/Metrics/FLinesOfCode.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* @treemap.warnOn highValues
77
* @metricType file
88
* @metricAggregate avg sum max
9-
* @precision very-high
109
* @tags maintainability
1110
* @id py/lines-of-code-in-files
1211
*/

python/ql/src/Metrics/FLinesOfComments.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* @treemap.warnOn lowValues
77
* @metricType file
88
* @metricAggregate avg sum max
9-
* @precision very-high
109
* @id py/lines-of-comments-in-files
1110
*/
1211

python/ql/src/Metrics/FLinesOfDuplicatedCode.ql

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,12 @@
77
* @treemap.warnOn highValues
88
* @metricType file
99
* @metricAggregate avg sum max
10-
* @precision high
1110
* @tags testability
1211
* @id py/duplicated-lines-in-files
1312
*/
1413

1514
import python
16-
import external.CodeDuplication
1715

1816
from File f, int n
19-
where
20-
n =
21-
count(int line |
22-
exists(DuplicateBlock d | d.sourceFile() = f |
23-
line in [d.sourceStartLine() .. d.sourceEndLine()] and
24-
not allowlistedLineForDuplication(f, line)
25-
)
26-
)
17+
where none()
2718
select f, n order by n desc

python/ql/src/Metrics/FLinesOfSimilarCode.ql

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,12 @@
77
* @treemap.warnOn highValues
88
* @metricType file
99
* @metricAggregate avg sum max
10-
* @precision high
1110
* @tags testability
1211
* @id py/similar-lines-in-files
1312
*/
1413

1514
import python
16-
import external.CodeDuplication
1715

1816
from File f, int n
19-
where
20-
n =
21-
count(int line |
22-
exists(SimilarBlock d | d.sourceFile() = f |
23-
line in [d.sourceStartLine() .. d.sourceEndLine()] and
24-
not allowlistedLineForDuplication(f, line)
25-
)
26-
)
17+
where none()
2718
select f, n order by n desc

python/ql/src/Metrics/FNumberOfTests.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* @treemap.warnOn lowValues
66
* @metricType file
77
* @metricAggregate avg sum max
8-
* @precision medium
98
* @id py/tests-in-files
109
*/
1110

0 commit comments

Comments
 (0)