Browse Source

Report warnings as deprecations + non-deprecations

Change-Id: I0be37863d3478705ded21275829ee9fef0b6d613
Reviewed-on: http://gerrit.dmdirc.com/3165
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.8rc1
Chris Smith 10 years ago
parent
commit
f427a1a764
2 changed files with 24 additions and 1 deletions
  1. 1
    1
      .gitignore
  2. 23
    0
      build-reports.xml

+ 1
- 1
.gitignore View File

@@ -33,7 +33,7 @@ __history
33 33
 /reports/report-pmd.*
34 34
 /reports/checkstyle.*
35 35
 /reports/deadcode.txt
36
-/reports/warnings.txt
36
+/reports/warnings*.txt
37 37
 /reports/build-log.txt
38 38
 /etc/clover.license
39 39
 /etc/clover/clover.license

+ 23
- 0
build-reports.xml View File

@@ -213,14 +213,37 @@
213 213
 
214 214
         <copy file="reports/build-log.txt" tofile="reports/warnings.txt">
215 215
             <filterchain>
216
+                <!-- Pick out the warnings generated for source files -->
216 217
                 <linecontainsregexp>
217 218
                     <regexp pattern="java:[0-9]+: warning: .*"/>
218 219
                 </linecontainsregexp>
220
+                <!-- Trim whitespace and boilerplate -->
219 221
                 <trim/>
220 222
                 <replacestring from="[javac] ${basedir}${file.separator}" to=""/>
223
+                <!-- Ignore anything that's not from a source directory (e.g. dagger generated code) -->
224
+                <linecontainsregexp>
225
+                    <regexp pattern="^(modules${file.separator}[a-z]+${file.separator})?src.*"/>
226
+                </linecontainsregexp>
227
+                <!-- Sort the results in file order -->
221 228
                 <sortfilter/>
222 229
             </filterchain>
223 230
         </copy>
231
+
232
+        <copy file="reports/warnings.txt" tofile="reports/warnings-deprecations.txt">
233
+            <filterchain>
234
+                <linecontainsregexp>
235
+                    <regexp pattern=".*: warning: \[deprecation\] .*"/>
236
+                </linecontainsregexp>
237
+           </filterchain>
238
+        </copy>
239
+
240
+        <copy file="reports/warnings.txt" tofile="reports/warnings-other.txt">
241
+            <filterchain>
242
+                <linecontainsregexp negate="true">
243
+                    <regexp pattern=".*: warning: \[deprecation\] .*"/>
244
+                </linecontainsregexp>
245
+           </filterchain>
246
+        </copy>
224 247
     </target>
225 248
 
226 249
     <target name="teamcity-warnings-report">

Loading…
Cancel
Save