Skip to content

Commit a53f287

Browse files
author
andygrunwald
committed
Ticket 79: Added check for ruleset.xml by adding a custom standard
1 parent bb6461c commit a53f287

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/org/phpsrc/eclipse/pti/tools/codesniffer/ui/preferences/StandardInputDialog.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ private void doValidation() {
170170
if (newPath != null && newPath.length() > 0) {
171171
IPath path = Path.fromOSString(newPath);
172172
if (path != null) {
173-
File codingStandard = new File(newPath + File.separatorChar + path.lastSegment() + "CodingStandard.php");
174-
if (!codingStandard.exists()) {
175-
status.setError("Missing standard file " + path.lastSegment() + "CodingStandard.php");
173+
File codingStandardPHP = new File(newPath + File.separatorChar + path.lastSegment()
174+
+ "CodingStandard.php");
175+
File codingStandardXML = new File(newPath + File.separatorChar + "ruleset.xml");
176+
if (!codingStandardPHP.exists() && !codingStandardXML.exists()) {
177+
status.setError("Missing standard file " + path.lastSegment() + "CodingStandard.php or ruleset.xml");
176178
}
177179
}
178180
}

0 commit comments

Comments
 (0)