Explorar el Código

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 hace 10 años
padre
commit
f427a1a764
Se han modificado 2 ficheros con 24 adiciones y 1 borrados
  1. 1
    1
      .gitignore
  2. 23
    0
      build-reports.xml

+ 1
- 1
.gitignore Ver fichero

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

+ 23
- 0
build-reports.xml Ver fichero

213
 
213
 
214
         <copy file="reports/build-log.txt" tofile="reports/warnings.txt">
214
         <copy file="reports/build-log.txt" tofile="reports/warnings.txt">
215
             <filterchain>
215
             <filterchain>
216
+                <!-- Pick out the warnings generated for source files -->
216
                 <linecontainsregexp>
217
                 <linecontainsregexp>
217
                     <regexp pattern="java:[0-9]+: warning: .*"/>
218
                     <regexp pattern="java:[0-9]+: warning: .*"/>
218
                 </linecontainsregexp>
219
                 </linecontainsregexp>
220
+                <!-- Trim whitespace and boilerplate -->
219
                 <trim/>
221
                 <trim/>
220
                 <replacestring from="[javac] ${basedir}${file.separator}" to=""/>
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
                 <sortfilter/>
228
                 <sortfilter/>
222
             </filterchain>
229
             </filterchain>
223
         </copy>
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
     </target>
247
     </target>
225
 
248
 
226
     <target name="teamcity-warnings-report">
249
     <target name="teamcity-warnings-report">

Loading…
Cancelar
Guardar