Как определить определения подавлений для checkstyle, той работы и с муравьем и с затмением

Вы также можете использовать расширение модуля, где вы расширяете типы во внешних модулях:

import { TextField } from 'tns-core-modules/ui/text-field';

declare module 'tns-core-modules/ui/text-field' {
    export interface TextField {
        unfocus(): void;
    }
}
TextField.prototype.unfocus = function (this: TextField) {
    this.dismissSoftInput();
    if (this.android) {
        this.android.clearFocus();
    }
};


export function onMainGridLayoutTap(args: EventData) {
    const mainGridLayout = <GridLayout>args.object;

    const emailTextField: TextField = mainGridLayout.getViewById("emailTextField");
    emailTextField.unfocus();
}
8
задан Mnementh 7 April 2009 в 15:15
поделиться

1 ответ

Используйте функциональность расширения свойства Checkstyle. В Вашем checkstyle.xml объявите Ваш SupressionFilter как:

<module name="SuppressionFilter">
    <property name="file" value="${checkstyle.suppressions.file}" default="suppressions.xml"/>
</module>

Затем измените свою задачу Checkstyle в Вашем сценарии сборки Муравья для включения вложенного свойства:

<checkstyle config="conf/checkstyle.xml">
    <fileset dir="src" includes="**/*.java"/>
    <property key="checkstyle.suppressions.file" value="conf/suppressions.xml"/>
</checkstyle>
7
ответ дан 5 December 2019 в 10:05
поделиться
Другие вопросы по тегам:

Похожие вопросы: