checkstyle / patch-filters

Suppression Filter for Checkstyle that is based on patch file
GNU Lesser General Public License v2.1
4 stars 6 forks source link

Issue #264: Sort expected violations by line number #282

Closed HuGanghui closed 4 years ago

HuGanghui commented 4 years ago

Issue #264: Sort expected violations by line number

romani commented 4 years ago

@HuGanghui, please send such update to checkstyle repo also, as we copied such code from main repo.

HuGanghui commented 4 years ago

@romani ok, I will do it.

HuGanghui commented 4 years ago

@romani I read the code in https://github.com/checkstyle/checkstyle/blob/dbac127881da45675108d01fd43f5b82f4a60e0c/src/test/java/com/puppycrawl/tools/checkstyle/AbstractModuleTestSupport.java#L298-L300 it already has Arrays.sort(expected); and now we write violation informations are according to line number, like this one: https://github.com/checkstyle/checkstyle/blob/dbac127881da45675108d01fd43f5b82f4a60e0c/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/AvoidNestedBlocksCheckTest.java#L47 so I think it's ok, and does not need update.