Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into 170-create-build-dir
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTWF committed Apr 15, 2022
2 parents 3ea910c + b0c27ac commit d3e3007
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Compiler/Config/ConfigIncludeLoader.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Compiler.Exception;
using Compiler.Input.Rule;
using Compiler.Input.Sorter;
using Compiler.Output;
using Newtonsoft.Json.Linq;

Expand Down Expand Up @@ -103,8 +105,9 @@ string configFilePath

// Get the airport folders
string configFileFolder = GetFolderForConfigFile(configFilePath);
string[] directories =
Directory.GetDirectories(configFileFolder + Path.DirectorySeparatorChar + configItem.Key);
var directories = Directory
.GetDirectories(configFileFolder + Path.DirectorySeparatorChar + configItem.Key)
.OrderBy(directory => directory, new AlphabeticalPathSorter()).ToList();

/*
* Airports are a bit special as there are lots of them.
Expand Down
5 changes: 4 additions & 1 deletion tests/CompilerTest/Config/ConfigIncludeLoaderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Compiler.Input.Rule;
using Compiler.Output;
using Newtonsoft.Json.Linq;
using Xunit.Abstractions;
using FileExists = Compiler.Input.Validator.FileExists;

namespace CompilerTest.Config
Expand All @@ -20,11 +21,13 @@ public class ConfigIncludeLoaderTest
{
private readonly ConfigIncludeLoader fileLoader;
private readonly ConfigInclusionRules includes;
private readonly ITestOutputHelper output;

public ConfigIncludeLoaderTest()
public ConfigIncludeLoaderTest(ITestOutputHelper output)
{
fileLoader = ConfigIncludeLoaderFactory.Make(new CompilerArguments());
includes = new ConfigInclusionRules();
this.output = output;
}

[Theory]
Expand Down

0 comments on commit d3e3007

Please sign in to comment.