[ 
https://issues.apache.org/jira/browse/KAFKA-17381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875308#comment-17875308
 ] 

Chia-Ping Tsai commented on KAFKA-17381:
----------------------------------------

[~yangpoan] I have assigned this to you. I have left a comment 
(https://github.com/apache/kafka/pull/16936#discussion_r1724000282) as a simple 
solution.

> Reduce log output from checkstyle task
> --------------------------------------
>
>                 Key: KAFKA-17381
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17381
>             Project: Kafka
>          Issue Type: Task
>          Components: build
>            Reporter: David Arthur
>            Assignee: PoAn Yang
>            Priority: Minor
>
> When running the "check -x tests" Gradle task, I am noticing a lot of the 
> output is some XSLT thing.
> {code:java}
> [ant:xslt] Processing 
> /home/runner/work/kafka/kafka/streams/upgrade-system-tests-26/build/reports/checkstyle/test.xml
>  to 
> /home/runner/work/kafka/kafka/streams/upgrade-system-tests-26/build/reports/checkstyle/test.html
> 6374[ant:xslt] Loading stylesheet <?xml version="1.0"?>
> 6375<!--
> 6376   Licensed to the Apache Software Foundation (ASF) under one or more
> 6377   contributor license agreements.  See the NOTICE file distributed with
> 6378   this work for additional information regarding copyright ownership.
> 6379   The ASF licenses this file to You under the Apache License, Version 2.0
> 6380   (the "License"); you may not use this file except in compliance with
> 6381   the License.  You may obtain a copy of the License at
> 6382       http://www.apache.org/licenses/LICENSE-2.0
> 6383   Unless required by applicable law or agreed to in writing, software
> 6384   distributed under the License is distributed on an "AS IS" BASIS,
> 6385   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
> implied.
> 6386   See the License for the specific language governing permissions and
> 6387   limitations under the License.
> 6388-->
> 6389<xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
> xmlns:xl="http://www.w3.org/1999/XSL/Transform";>
> 6390    <xsl:output method="html" indent="yes"/>
> 6391    <xsl:param name="gradleVersion"/>
> 6392    <xsl:decimal-format decimal-separator="." grouping-separator="," />
> 6393    <xsl:template match="checkstyle">
> 6394        <html>
> 6395            <head>
> 6396                <title>Checkstyle Violations</title>
> 6397                <!-- vaguely adapted from Gradle's CSS -->
> 6398                <style type="text/css">
> 6399                    body {
> 6400                        background-color: #fff;
> 6401                        color: #02303A;
> 6402                    }
> 6403                    a {
> 6404                        color: #1DA2BD;
> 6405                    }
> 6406                    a.link {
> 6407                        color: #02303A;
> 6408                    }
> 6409                    p {
> 6410                        font-size: 1rem;
> 6411                    }
> 6412                    h1 a[name] {
> 6413                        margin: 0;
> 6414                        padding: 0;
> 6415                    }
> 6416                    tr:nth-child(even) {
> 6417                        background: white;
> 6418                    }
> 6419                    th {
> 6420                        font-weight:bold;
> 6421                    }
> 6422                    tr {
> 6423                        background: #efefef;
> 6424                    }
> 6425                    table th, td, tr {
> 6426                        font-size:100%;
> 6427                        border: none;
> 6428                        text-align: left;
> 6429                        vertical-align: top;
> 6430                    }
> 6431                </style>
> 6432            </head>
> 6433            <body>
> 6434                <p>
> 6435                    <a name="top"><h1>Checkstyle Results</h1></a>
> 6436                </p>
> 6437                <hr align="left" width="95%" size="1"/>
> 6438                <h2>Summary</h2>
> 6439                <table class="summary" width="95%" >
> 6440                    <tr>
> 6441                        <th>Total files checked</th>
> 6442                        <th>Total violations</th>
> 6443                        <th>Files with violations</th>
> 6444                    </tr>
> 6445                    <tr>
> 6446                        <td>
> 6447                            <xsl:number level="any" 
> value="count(descendant::file)"/>
> 6448                        </td>
> 6449                        <td>
> 6450                            <xsl:number level="any" 
> value="count(descendant::error)"/>
> 6451                        </td>
> 6452                        <td>
> 6453Error:                      <xsl:number level="any" 
> value="count(descendant::file[error])"/>
> 6454                        </td>
> 6455                    </tr>
> 6456                </table>
> 6457                <hr align="left" width="95%" size="1"/>
> 6458                <div class="violations">
> 6459                    <h2>Violations</h2>
> 6460                    <p>
> 6461                        <xsl:choose>
> 6462                            <xsl:when test="count(descendant::error) > 0">
> 6463                                <table class="filelist" width="95%">
> 6464                                    <tr>
> 6465                                        <th>File</th>
> 6475                                        <th>Total violations</th>
> 6476                                    </tr>
> 6477Error:                              <xsl:for-each select="file[error]">
> 6478                                        <!-- sort by number of errors and 
> then alphabetically -->
> 6479                                        <xsl:sort data-type="number" 
> order="descending" select="count(descendant::error)"/>
> 6480                                        <xsl:sort select="@name"/>
> 6481                                        <xsl:variable name="errors" 
> select="count(descendant::error)"/>
> 6482                                        <tr>
> 6483                                            <td><a 
> href="#{generate-id(@name)}"><xsl:value-of select="@name"/></a></td>
> 6484                                            <td><xsl:value-of 
> select="$errors"/></td>
> 6485                                        </tr>
> 6486                                    </xsl:for-each>
> 6487                                </table>
> 6488                                <p/>
> 6489                                <xsl:apply-templates>
> 6490                                    <!-- sort entries by file name 
> alphabetically -->
> 6491                                    <xsl:sort select="@name"/>
> 6492                                </xsl:apply-templates>
> 6493                                <p/>
> 6494                            </xsl:when>
> 6495                            <xsl:otherwise>
> 6496                                No violations were found.
> 6497                            </xsl:otherwise>
> 6498                        </xsl:choose>
> 6499                    </p>
> 6500                </div>
> 6501                <hr align="left" width="95%" size="1"/>
> 6502                <p>Generated by <a 
> href="https://gradle.org";><xsl:value-of select="$gradleVersion"/></a> with <a 
> href="https://checkstyle.sourceforge.io/";>Checkstyle <xsl:value-of 
> select="@version"/></a>.</p>
> 6503            </body>
> 6504        </html>
> 6505    </xsl:template>
> 6506    <!-- A single file with violations -->
> 6507Error: l:template match="file[error]">
> 6508        <div class="file-violation">
> 6509            <h3>
> 6510                <a class="link" name="{generate-id(@name)}"><xsl:value-of 
> select="@name"/></a>
> 6511            </h3>
> 6512            <table class="violationlist" width="95%">
> 6513                <tr>
> 6514                    <th>Severity</th>
> 6515                    <th>Description</th>
> 6516                    <th>Line Number</th>
> 6517                </tr>
> 6518                <xsl:apply-templates select="error"/>
> 6519            </table>
> 6520            <p/>
> 6521            <a href="#top">Back to top</a>
> 6522            <p/>
> 6523        </div>
> 6524    </xsl:template>
> 6525    <!-- A single row in the list of violations -->
> 6526    <xsl:template match="error">
> 6527        <tr>
> 6528            <td>
> 6529                <xsl:value-of select="@severity"/>
> 6530            </td>
> 6531            <td>
> 6532                <xsl:value-of select="@message"/>
> 6533            </td>
> 6534            <td>
> 6535                <xsl:value-of select="@line"/>
> 6536            </td>
> 6537        </tr>
> 6538    </xsl:template>
> 6539</xsl:stylesheet>
> 6540Resolve mutations for :streams:upgrade-system-tests-26:spotbugsMain 
> (Thread[Execution worker,5,main]) started.
> 6541:streams:upgrade-system-tests-26:spotbugsMain (Thread[Execution 
> worker,5,main]) started. 
> {code}
> This is repeated many times and increases the log output from our build tasks 
> to 10s of thousands of lines. It would be great if we could remove or 
> suppress this output somehow.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to