Package com.puppycrawl.tools.checkstyle

Examples of com.puppycrawl.tools.checkstyle.DefaultConfiguration


{
    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/InputJava7NumericalLiterals.java"), expected);
    }
View Full Code Here


    @Test
    public void testCanParse()
        throws Exception

    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/InputHexFloat.java"), expected);
    }
View Full Code Here

{
    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/InputJava7StringSwitch.java"), expected);
    }
View Full Code Here

{
    @Test
    public void testCanParse()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
            createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/InputJava7Diamond.java"), expected);
    }
View Full Code Here

    }

    @Test
    public void testAllBlockComments() throws Exception
    {
        DefaultConfiguration checkConfig = createCheckConfig(SinglelineCommentListenerCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("comments" + File.separator
                + "InputFullOfSinglelineComments.java"), expected);
        Assert.assertTrue(allComments.isEmpty());
    }
View Full Code Here

    };

    @Test
    public void testNone() throws Exception
    {
        final DefaultConfiguration filterConfig = null;
        final String[] suppressed = {};
        verifySuppressed(filterConfig, suppressed);
    }
View Full Code Here

    }

    @Test
    public void testDefault() throws Exception
    {
        final DefaultConfiguration filterConfig =
            createFilterConfig(SuppressWarningsFilter.class);
        final String[] suppressed = {
            "24:17: Name 'J' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
            "29:17: Name 'L' must match pattern '^[a-z][a-zA-Z0-9]*$'.",
            "33:30: Name 'm' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.",
 
View Full Code Here

        verifySuppressed(filterConfig, suppressed);
    }

    public static DefaultConfiguration createFilterConfig(Class<?> aClass)
    {
        return new DefaultConfiguration(aClass.getName());
    }
View Full Code Here

    @Override
    protected Checker createChecker(Configuration aFilterConfig)
        throws Exception
    {
        final DefaultConfiguration checkerConfig =
            new DefaultConfiguration("configuration");
        final DefaultConfiguration checksConfig =
            createCheckConfig(TreeWalker.class);
        final DefaultConfiguration holderConfig =
            createCheckConfig(SuppressWarningsHolder.class);
        holderConfig.addAttribute("aliasList",
            "com.puppycrawl.tools.checkstyle.checks.sizes."
                + "ParameterNumberCheck=paramnum");
        checksConfig.addChild(holderConfig);
        checksConfig.addChild(createCheckConfig(MemberNameCheck.class));
        checksConfig.addChild(createCheckConfig(ConstantNameCheck.class));
View Full Code Here

    @Test
    public void testLambdaInVariableInitialization()
        throws Exception
    {
        final DefaultConfiguration checkConfig =
                createCheckConfig(MemberNameCheck.class);
        final String[] expected = {};
        verify(checkConfig, getPath("grammars/java8/InputLambdaTest1.java"),
                expected);
View Full Code Here

TOP

Related Classes of com.puppycrawl.tools.checkstyle.DefaultConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.