Skip to content

Commit

Permalink
Update to new checkstyle rules introduced in 7eac4b8
Browse files Browse the repository at this point in the history
  • Loading branch information
kariem committed Dec 4, 2016
1 parent e5f09e5 commit e5ba818
Showing 1 changed file with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2016 the original author or authors.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////

package com.github.sevntu.checkstyle.checks.coding;

import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
import org.junit.Assert;
import org.junit.Test;
import static com.github.sevntu.checkstyle.checks.coding.EnumTrailingCommaAndSemicolonCheck.MSG_KEY;
import static com.github.sevntu.checkstyle.checks.coding.EnumTrailingCommaAndSemicolonCheck.MSG_KEY_SEMI;

import java.io.File;
import java.io.IOException;
import java.net.URL;

import static com.github.sevntu.checkstyle.checks.coding.EnumTrailingCommaAndSemicolonCheck.MSG_KEY;
import static com.github.sevntu.checkstyle.checks.coding.EnumTrailingCommaAndSemicolonCheck.MSG_KEY_SEMI;
import org.junit.Assert;
import org.junit.Test;

import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;

public class EnumTrailingCommaAndSemicolonCheckTest
extends BaseCheckTestSupport {
@Override
protected String getPath(String filename) throws IOException {
URL r = getClass().getResource(filename);
return new File(r.getPath()).getCanonicalPath();
final URL resource = getClass().getResource(filename);
return new File(resource.getPath()).getCanonicalPath();
}

@Test
Expand Down

0 comments on commit e5ba818

Please sign in to comment.