Skip to content

Commit 8905025

Browse files
author
Gilles Grousset
committed
SwiftLint 0.16.1 support
1 parent 0acf38f commit 8905025

File tree

5 files changed

+630
-2
lines changed

5 files changed

+630
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ Otherwise, run the ```run-sonar-swift.sh``` script from your Xcode project root
4747

4848
###Release history
4949

50+
####0.3.2
51+
- SwiftLint 0.16.1 (75 rules now).
52+
- Fixed [Metric 'test_data' should not be computed by a Sensor](https://github.com/Backelite/sonar-swift/issues/61) with SonarQube 6.2
53+
5054
####0.3.1
5155
- Now falls back to sonar-scanner if sonar-runner is not installed (thanks to [MaikoHermans](https://github.com/MaikoHermans). See [PR 59](https://github.com/Backelite/sonar-swift/pull/59))
5256
- Ability to set *sonar.swift.appName*. Useful when basename is different from targeted scheme, or when slather fails with 'No product binary found' (thanks to [MaikoHermans](https://github.com/MaikoHermans). See [PR 58](https://github.com/Backelite/sonar-swift/pull/58))

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<groupId>com.backelite.sonarqube</groupId>
2828
<artifactId>backelite-sonar-swift-plugin</artifactId>
29-
<version>0.3.1</version>
29+
<version>0.3.2</version>
3030

3131
<packaging>sonar-plugin</packaging>
3232

src/main/resources/com/sonar/sqale/swiftlint-model.xml

Lines changed: 338 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,175 @@
4545
<chc>
4646
<key>READABILITY</key>
4747
<name>Readability</name>
48+
<chc>
49+
<rule-repo>SwiftLint</rule-repo>
50+
<rule-key>void_return</rule-key>
51+
<prop>
52+
<key>remediationFunction</key>
53+
<txt>CONSTANT_ISSUE</txt>
54+
</prop>
55+
<prop>
56+
<key>offset</key>
57+
<val>5</val>
58+
<txt>min</txt>
59+
</prop>
60+
</chc>
61+
<chc>
62+
<rule-repo>SwiftLint</rule-repo>
63+
<rule-key>unused_optional_binding</rule-key>
64+
<prop>
65+
<key>remediationFunction</key>
66+
<txt>CONSTANT_ISSUE</txt>
67+
</prop>
68+
<prop>
69+
<key>offset</key>
70+
<val>5</val>
71+
<txt>min</txt>
72+
</prop>
73+
</chc>
74+
<chc>
75+
<rule-repo>SwiftLint</rule-repo>
76+
<rule-key>unused_enumerated</rule-key>
77+
<prop>
78+
<key>remediationFunction</key>
79+
<txt>CONSTANT_ISSUE</txt>
80+
</prop>
81+
<prop>
82+
<key>offset</key>
83+
<val>5</val>
84+
<txt>min</txt>
85+
</prop>
86+
</chc>
87+
<chc>
88+
<rule-repo>SwiftLint</rule-repo>
89+
<rule-key>unused_closure_parameter</rule-key>
90+
<prop>
91+
<key>remediationFunction</key>
92+
<txt>CONSTANT_ISSUE</txt>
93+
</prop>
94+
<prop>
95+
<key>offset</key>
96+
<val>5</val>
97+
<txt>min</txt>
98+
</prop>
99+
</chc>
100+
<chc>
101+
<rule-repo>SwiftLint</rule-repo>
102+
<rule-key>shorthand_operator</rule-key>
103+
<prop>
104+
<key>remediationFunction</key>
105+
<txt>CONSTANT_ISSUE</txt>
106+
</prop>
107+
<prop>
108+
<key>offset</key>
109+
<val>5</val>
110+
<txt>min</txt>
111+
</prop>
112+
</chc>
113+
<chc>
114+
<rule-repo>SwiftLint</rule-repo>
115+
<rule-key>redundant_void_return</rule-key>
116+
<prop>
117+
<key>remediationFunction</key>
118+
<txt>CONSTANT_ISSUE</txt>
119+
</prop>
120+
<prop>
121+
<key>offset</key>
122+
<val>5</val>
123+
<txt>min</txt>
124+
</prop>
125+
</chc>
126+
<chc>
127+
<rule-repo>SwiftLint</rule-repo>
128+
<rule-key>redundant_string_enum_value</rule-key>
129+
<prop>
130+
<key>remediationFunction</key>
131+
<txt>CONSTANT_ISSUE</txt>
132+
</prop>
133+
<prop>
134+
<key>offset</key>
135+
<val>5</val>
136+
<txt>min</txt>
137+
</prop>
138+
</chc>
139+
<chc>
140+
<rule-repo>SwiftLint</rule-repo>
141+
<rule-key>redundant_optional_initialization</rule-key>
142+
<prop>
143+
<key>remediationFunction</key>
144+
<txt>CONSTANT_ISSUE</txt>
145+
</prop>
146+
<prop>
147+
<key>offset</key>
148+
<val>5</val>
149+
<txt>min</txt>
150+
</prop>
151+
</chc>
152+
<chc>
153+
<rule-repo>SwiftLint</rule-repo>
154+
<rule-key>object_literal</rule-key>
155+
<prop>
156+
<key>remediationFunction</key>
157+
<txt>CONSTANT_ISSUE</txt>
158+
</prop>
159+
<prop>
160+
<key>offset</key>
161+
<val>5</val>
162+
<txt>min</txt>
163+
</prop>
164+
</chc>
165+
<chc>
166+
<rule-repo>SwiftLint</rule-repo>
167+
<rule-key>first_where</rule-key>
168+
<prop>
169+
<key>remediationFunction</key>
170+
<txt>CONSTANT_ISSUE</txt>
171+
</prop>
172+
<prop>
173+
<key>offset</key>
174+
<val>5</val>
175+
<txt>min</txt>
176+
</prop>
177+
</chc>
178+
<chc>
179+
<rule-repo>SwiftLint</rule-repo>
180+
<rule-key>closure_parameter_position</rule-key>
181+
<prop>
182+
<key>remediationFunction</key>
183+
<txt>CONSTANT_ISSUE</txt>
184+
</prop>
185+
<prop>
186+
<key>offset</key>
187+
<val>5</val>
188+
<txt>min</txt>
189+
</prop>
190+
</chc>
191+
<chc>
192+
<rule-repo>SwiftLint</rule-repo>
193+
<rule-key>closure_end_indentation</rule-key>
194+
<prop>
195+
<key>remediationFunction</key>
196+
<txt>CONSTANT_ISSUE</txt>
197+
</prop>
198+
<prop>
199+
<key>offset</key>
200+
<val>5</val>
201+
<txt>min</txt>
202+
</prop>
203+
</chc>
204+
<chc>
205+
<rule-repo>SwiftLint</rule-repo>
206+
<rule-key>attributes</rule-key>
207+
<prop>
208+
<key>remediationFunction</key>
209+
<txt>CONSTANT_ISSUE</txt>
210+
</prop>
211+
<prop>
212+
<key>offset</key>
213+
<val>5</val>
214+
<txt>min</txt>
215+
</prop>
216+
</chc>
48217
<chc>
49218
<rule-repo>SwiftLint</rule-repo>
50219
<rule-key>vertical_whitespace</rule-key>
@@ -461,10 +630,127 @@
461630
<txt>min</txt>
462631
</prop>
463632
</chc>
633+
<chc>
634+
<rule-repo>SwiftLint</rule-repo>
635+
<rule-key>number_separator</rule-key>
636+
<prop>
637+
<key>remediationFunction</key>
638+
<txt>CONSTANT_ISSUE</txt>
639+
</prop>
640+
<prop>
641+
<key>offset</key>
642+
<val>5</val>
643+
<txt>min</txt>
644+
</prop>
645+
</chc>
464646
</chc>
465647
<chc>
466648
<key>UNDERSTANDABILITY</key>
467649
<name>Understandability</name>
650+
<chc>
651+
<rule-repo>SwiftLint</rule-repo>
652+
<rule-key>vertical_parameter_alignment</rule-key>
653+
<prop>
654+
<key>remediationFunction</key>
655+
<txt>CONSTANT_ISSUE</txt>
656+
</prop>
657+
<prop>
658+
<key>offset</key>
659+
<val>5</val>
660+
<txt>min</txt>
661+
</prop>
662+
</chc>
663+
<chc>
664+
<rule-repo>SwiftLint</rule-repo>
665+
<rule-key>sorted_imports</rule-key>
666+
<prop>
667+
<key>remediationFunction</key>
668+
<txt>CONSTANT_ISSUE</txt>
669+
</prop>
670+
<prop>
671+
<key>offset</key>
672+
<val>5</val>
673+
<txt>min</txt>
674+
</prop>
675+
</chc>
676+
<chc>
677+
<rule-repo>SwiftLint</rule-repo>
678+
<rule-key>operator_usage_whitespace</rule-key>
679+
<prop>
680+
<key>remediationFunction</key>
681+
<txt>CONSTANT_ISSUE</txt>
682+
</prop>
683+
<prop>
684+
<key>offset</key>
685+
<val>10</val>
686+
<txt>min</txt>
687+
</prop>
688+
</chc>
689+
<chc>
690+
<rule-repo>SwiftLint</rule-repo>
691+
<rule-key>large_tuple</rule-key>
692+
<prop>
693+
<key>remediationFunction</key>
694+
<txt>CONSTANT_ISSUE</txt>
695+
</prop>
696+
<prop>
697+
<key>offset</key>
698+
<val>10</val>
699+
<txt>min</txt>
700+
</prop>
701+
</chc>
702+
<chc>
703+
<rule-repo>SwiftLint</rule-repo>
704+
<rule-key>generic_type_name</rule-key>
705+
<prop>
706+
<key>remediationFunction</key>
707+
<txt>CONSTANT_ISSUE</txt>
708+
</prop>
709+
<prop>
710+
<key>offset</key>
711+
<val>10</val>
712+
<txt>min</txt>
713+
</prop>
714+
</chc>
715+
<chc>
716+
<rule-repo>SwiftLint</rule-repo>
717+
<rule-key>file_header</rule-key>
718+
<prop>
719+
<key>remediationFunction</key>
720+
<txt>CONSTANT_ISSUE</txt>
721+
</prop>
722+
<prop>
723+
<key>offset</key>
724+
<val>5</val>
725+
<txt>min</txt>
726+
</prop>
727+
</chc>
728+
<chc>
729+
<rule-repo>SwiftLint</rule-repo>
730+
<rule-key>empty_parentheses_with_trailing_closure</rule-key>
731+
<prop>
732+
<key>remediationFunction</key>
733+
<txt>CONSTANT_ISSUE</txt>
734+
</prop>
735+
<prop>
736+
<key>offset</key>
737+
<val>5</val>
738+
<txt>min</txt>
739+
</prop>
740+
</chc>
741+
<chc>
742+
<rule-repo>SwiftLint</rule-repo>
743+
<rule-key>empty_parameters</rule-key>
744+
<prop>
745+
<key>remediationFunction</key>
746+
<txt>CONSTANT_ISSUE</txt>
747+
</prop>
748+
<prop>
749+
<key>offset</key>
750+
<val>5</val>
751+
<txt>min</txt>
752+
</prop>
753+
</chc>
468754
<chc>
469755
<rule-repo>SwiftLint</rule-repo>
470756
<rule-key>nimble_operator</rule-key>
@@ -693,6 +979,58 @@
693979
<chc>
694980
<key>INSTRUCTION_RELIABILITY</key>
695981
<name>Instruction</name>
982+
<chc>
983+
<rule-repo>SwiftLint</rule-repo>
984+
<rule-key>prohibited_super_call</rule-key>
985+
<prop>
986+
<key>remediationFunction</key>
987+
<txt>CONSTANT_ISSUE</txt>
988+
</prop>
989+
<prop>
990+
<key>offset</key>
991+
<val>10</val>
992+
<txt>min</txt>
993+
</prop>
994+
</chc>
995+
<chc>
996+
<rule-repo>SwiftLint</rule-repo>
997+
<rule-key>dynamic_inline</rule-key>
998+
<prop>
999+
<key>remediationFunction</key>
1000+
<txt>CONSTANT_ISSUE</txt>
1001+
</prop>
1002+
<prop>
1003+
<key>offset</key>
1004+
<val>5</val>
1005+
<txt>min</txt>
1006+
</prop>
1007+
</chc>
1008+
<chc>
1009+
<rule-repo>SwiftLint</rule-repo>
1010+
<rule-key>compiler_protocol_init</rule-key>
1011+
<prop>
1012+
<key>remediationFunction</key>
1013+
<txt>CONSTANT_ISSUE</txt>
1014+
</prop>
1015+
<prop>
1016+
<key>offset</key>
1017+
<val>5</val>
1018+
<txt>min</txt>
1019+
</prop>
1020+
</chc>
1021+
<chc>
1022+
<rule-repo>SwiftLint</rule-repo>
1023+
<rule-key>class_delegate_protocol</rule-key>
1024+
<prop>
1025+
<key>remediationFunction</key>
1026+
<txt>CONSTANT_ISSUE</txt>
1027+
</prop>
1028+
<prop>
1029+
<key>offset</key>
1030+
<val>5</val>
1031+
<txt>min</txt>
1032+
</prop>
1033+
</chc>
6961034
<chc>
6971035
<rule-repo>SwiftLint</rule-repo>
6981036
<rule-key>weak_delegate</rule-key>

0 commit comments

Comments
 (0)