Skip to content

checkstyle:ArrayTypeStyle not workng as expected. #3

@pkmusthafa

Description

@pkmusthafa

Hi,

I tried walkmod-checkstyle-plugin in my sample project. But it is not behaving as expected.
See the below code portion before and after checkstyle:ArrayTypeStyle transformation.

Actual code :

	int intArray[] = new int[5];
	intArray[0] = 1;
	
	double doubleArray[] = new double[5];
	doubleArray[0] = 1.00;
	
	String strArray[]  = new String[5];
	strArray[0] = "Item1";

After 'checkstyle:ArrayTypeStyle' transformation :

			int[] intArray[] = new int[5];
	intArray[0] = 1;
	
		double[] doubleArray[] = new double[5];
	doubleArray[0] = 1.00;
	
	String[] strArray[]  = new String[5];
	strArray[0] = "Item1";

The same behaviour is occurred when I use the 'sonar:ArrayDesignatorOnType'

Any help on this is appreciated.

Thanks & Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions