Ctrl K
ComunidadGuías…

integration-test/checkstyle.xml

Rama master · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">

<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
        http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<!--
    Note: Checkstyle configuration under integration-test module only validates the code styles about test cases.
    Other codes rules should be referenced the checkstyle.xml under the project root folder
 -->
<module name="Checker">
    <property name="charset" value="UTF-8"/>
    <property name="severity" value="error"/>
    <property name="fileExtensions" value="java"/>
    <module name="BeforeExecutionExclusionFileFilter">
        <property name="fileNamePattern" value="^.*([\\/]src[\\/]main|[\\/]src[\\/]test[\\/]java[\\/]org[\\/]apache[\\/]iotdb[\\/](db|confignode)[\\/]it[\\/]utils)[\\/].*$||^.*AbstractSchemaIT\.java$"/>
    </module>
    <module name="TreeWalker">
        <module name="ImportControl">
            <property name="file" value="${baseDir}/import-control.xml"/>
            <property name="path" value="^.*(IT|TestUtils|TestConstant)\.java$"/>
            <message key="import.control.disallowed" value="{0} is not allowed to use in integration test."/>
        </module>
        <module name="RegexpSinglelineJava">
            <property name="format" value="getResultSet\(\)"/>
            <property name="ignoreComments" value="true"/>
            <property name="message" value="Statement::getResultSet is not allowed to use in integration test, please use the return value of Statement::executeQuery instead."/>
        </module>
        <module name="Regexp">
            <property name="format" value="(@RunWith\(IoTDBTestRunner\.class\))|(extends AbstractSchemaIT)"/>
            <property name="ignoreComments" value="true"/>
            <property name="illegalPattern" value="false"/>
            <property name="message" value="Test cases should run with IoTDBTestRunner."/>
        </module>
    </module>
</module>