mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 00:38:56 +00:00
[splitting] Validate ambiguous specifications in splitting.txt
This commit is contained in:
parent
5aaf2da7bd
commit
078434360b
1 changed files with 10 additions and 1 deletions
|
@ -57,8 +57,17 @@ public class ValidateSplitting {
|
|||
}
|
||||
}
|
||||
|
||||
// Check whether each file has a specified path as prefix
|
||||
// Check whether any path has an ambiguous specification
|
||||
final Pattern segmentPattern = Pattern.compile("/");
|
||||
for (String path : specifiedPaths) {
|
||||
Matcher matcher = segmentPattern.matcher(path);
|
||||
while (matcher.find()) {
|
||||
if (specifiedPaths.contains(path.substring(0, matcher.start())))
|
||||
fail("Path has ambiguous specification: " + path);
|
||||
}
|
||||
}
|
||||
|
||||
// Check whether each file has a specified path as prefix
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(outputDir + "/" + FindProjects.ALL_FILES))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
|
|
Loading…
Reference in a new issue