Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #240 #241

Merged
merged 1 commit into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
CheckStyle-IDEA.zip
.DS_Store
/*.iws
*.ipr
*.iml
.idea/
/target/
/build/*
/test-configs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -98,6 +99,9 @@ public List<Problem> inspectFile(@NotNull final PsiFile psiFile,
} catch (CheckStylePluginException e) {
blacklist(configurationLocation);
LOG.error("CheckStyle threw an exception when scanning: " + psiFile.getName(), e);
if (e.getCause() instanceof FileNotFoundException){
plugin.getConfiguration().setActiveConfiguration(null);
}
return NO_PROBLEMS_FOUND;

} catch (Throwable e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public Optional<CheckStyleChecker> checker(@Nullable final Module module,
@Nullable
private CheckStyleChecker checker(@Nullable final Module module,
@Nullable final ConfigurationLocation location,
@Nullable final ClassLoader classLoader) {
@Nullable final ClassLoader classLoader) throws CheckStylePluginException {
LOG.debug("Getting CheckStyle checker with location " + location);

if (location == null) {
Expand Down