Commit c7b5010
SONARPY-183 Include docstrings in the comment lines (SonarSource#71)
* SONARPY-183 Include docstrings in the comment lines - Deduce measure COMMENT_LINES from the FileLineVisitor rather than from the CommentsVisitor (removes possible inconsistency)
* SONARPY-183 Include docstrings in the comment lines - Move unit testing of lines of code/comment from PythonSquidSensorTest to FileLinesVisitorTest
* SONARPY-183 Factorize the extraction of the docstring to a separate class
* SONARPY-183 Include the docstrings in the comment lines
* SONARPY-183 Include docstrings in the comment lines - Retrieve enableNoSonar, ignoreHeaderComments and empty comment line behaviour from CommentsVisitor
* SONARPY-183 Avoid parsing the same file more than once
* SONARPY-183 Reduce complexity
* SONARPY-183 Post-review fixes
* SONARPY-183 Fix handling of state in FileLinesVisitor
* SONARPY-183 Make NCLOC consistent with other metrics1 parent 4480258 commit c7b5010Copy full SHA for c7b5010
File tree
Expand file treeCollapse file tree
17 files changed
+413
-225
lines changedOpen diff view settings
Filter options
- its/plugin/src/test/java/com/sonar/python/it/plugin
- python-checks/src
- main/java/org/sonar/python/checks
- test/java/org/sonar/python/checks
- python-squid/src
- main/java/org/sonar/python
- metrics
- test
- java/org/sonar/python
- resources
- metrics
- sonar-python-plugin/src
- main/java/org/sonar/plugins/python
- test
- java/org/sonar/plugins/python
- resources/org/sonar/plugins/python/squid-sensor
Expand file treeCollapse file tree
17 files changed
+413
-225
lines changedOpen diff view settings
Collapse file
its/plugin/src/test/java/com/sonar/python/it/plugin/MetricsTest.java
Copy file name to clipboardExpand all lines: its/plugin/src/test/java/com/sonar/python/it/plugin/MetricsTest.java+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
153 | 153 | |
154 | 154 | |
155 | 155 | |
156 | | - |
| 156 | + |
157 | 157 | |
158 | 158 | |
159 | 159 | |
|
Collapse file
python-checks/src/main/java/org/sonar/python/checks/MissingDocstringCheck.java
Copy file name to clipboardExpand all lines: python-checks/src/main/java/org/sonar/python/checks/MissingDocstringCheck.java+20-71Lines changed: 20 additions & 71 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | | - |
26 | 25 | |
27 | 26 | |
| 27 | + |
28 | 28 | |
29 | 29 | |
30 | | - |
31 | 30 | |
32 | 31 | |
33 | 32 | |
| ||
59 | 58 | |
60 | 59 | |
61 | 60 | |
62 | | - |
| 61 | + |
63 | 62 | |
64 | 63 | |
65 | 64 | |
66 | 65 | |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | | - |
75 | | - |
76 | | - |
77 | | - |
78 | | - |
79 | | - |
80 | | - |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
85 | | - |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
98 | | - |
99 | | - |
100 | | - |
101 | | - |
102 | | - |
103 | | - |
104 | | - |
105 | | - |
106 | | - |
107 | | - |
108 | | - |
109 | | - |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
110 | 72 | |
111 | | - |
112 | 73 | |
113 | 74 | |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
118 | | - |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
119 | 86 | |
| 87 | + |
120 | 88 | |
121 | 89 | |
122 | 90 | |
| ||
138 | 106 | |
139 | 107 | |
140 | 108 | |
141 | | - |
142 | | - |
143 | | - |
144 | | - |
145 | | - |
146 | | - |
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | | - |
152 | | - |
153 | | - |
154 | | - |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
159 | | - |
160 | 109 | |
Collapse file
python-checks/src/test/java/org/sonar/python/checks/MissingDocstringCheckTest.java
Copy file name to clipboardExpand all lines: python-checks/src/test/java/org/sonar/python/checks/MissingDocstringCheckTest.java+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
43 | 43 | |
44 | 44 | |
45 | 45 | |
| 46 | + |
46 | 47 | |
47 | 48 | |
48 | 49 | |
|
Collapse file
python-squid/src/main/java/org/sonar/python/DocstringExtractor.java
Copy file name to clipboard+90Lines changed: 90 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
Collapse file
python-squid/src/main/java/org/sonar/python/PythonAstScanner.java
Copy file name to clipboardExpand all lines: python-squid/src/main/java/org/sonar/python/PythonAstScanner.java+6-11Lines changed: 6 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
| 27 | + |
| 28 | + |
27 | 29 | |
28 | 30 | |
29 | 31 | |
| ||
40 | 42 | |
41 | 43 | |
42 | 44 | |
43 | | - |
44 | 45 | |
45 | 46 | |
46 | 47 | |
47 | 48 | |
48 | | - |
49 | | - |
50 | | - |
51 | 49 | |
52 | 50 | |
53 | 51 | |
| ||
56 | 54 | |
57 | 55 | |
58 | 56 | |
| 57 | + |
59 | 58 | |
60 | 59 | |
61 | 60 | |
| ||
86 | 85 | |
87 | 86 | |
88 | 87 | |
89 | | - |
| 88 | + |
90 | 89 | |
91 | 90 | |
92 | 91 | |
| ||
99 | 98 | |
100 | 99 | |
101 | 100 | |
102 | | - |
| 101 | + |
103 | 102 | |
104 | | - |
105 | 103 | |
106 | 104 | |
107 | 105 | |
| ||
119 | 117 | |
120 | 118 | |
121 | 119 | |
| 120 | + |
122 | 121 | |
123 | 122 | |
124 | 123 | |
125 | 124 | |
126 | 125 | |
127 | | - |
128 | | - |
129 | | - |
130 | | - |
131 | 126 | |
132 | 127 | |
133 | 128 | |
|
Collapse file
python-squid/src/main/java/org/sonar/python/PythonLinesOfCodeVisitor.java
Copy file name to clipboardExpand all lines: python-squid/src/main/java/org/sonar/python/PythonLinesOfCodeVisitor.java-71Lines changed: 0 additions & 71 deletions
This file was deleted.
0 commit comments