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

Add auto discovery of parameter files when scanning a directory #297

Merged
merged 28 commits into from
Nov 2, 2022
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
14acda4
add auto discovery of parameter files when scanning directories
pim-simons Oct 27, 2022
6caf186
Merge branch 'development' into parameters-auto-discovery
VeraBE Oct 27, 2022
34c1492
Moved auto detect parameters file functionality to separate method, a…
pim-simons Oct 28, 2022
b348f20
check for `.parameters*.json` so we also support the parameters file …
pim-simons Oct 31, 2022
49eff74
update documentation
pim-simons Oct 31, 2022
a8c042a
Update logging according to code suggestion
pim-simons Oct 31, 2022
9967bff
removed excessive test files, added TemplateWithSeparateParametersFil…
pim-simons Nov 1, 2022
881b3ad
added assertion to check the amount of times the bicep and json files…
pim-simons Nov 1, 2022
ff69599
removed duplicate logging, exclude paramaters files from FindTemplate…
pim-simons Nov 1, 2022
a3b3fd5
refactored duplicate code
pim-simons Nov 1, 2022
10912d7
changed up logging
pim-simons Nov 1, 2022
d85ae75
changed tests according to logging changes
pim-simons Nov 1, 2022
7e37cb2
Update README.md
pim-simons Nov 1, 2022
473ad37
Update src/Analyzer.Cli/CommandLineParser.cs
pim-simons Nov 1, 2022
5718325
reorder usings
pim-simons Nov 1, 2022
d462194
Merge branch 'parameters-auto-discovery' of https://github.com/pim-si…
pim-simons Nov 1, 2022
d3dd96d
revert change in csproj
pim-simons Nov 1, 2022
12a325b
removed logging
pim-simons Nov 1, 2022
4cc57d8
changed comments
pim-simons Nov 1, 2022
7d27c20
fixed comment
pim-simons Nov 1, 2022
728fa06
Update src/Analyzer.Cli/CommandLineParser.cs
pim-simons Nov 1, 2022
cab1d57
Update src/Analyzer.Cli/CommandLineParser.cs
pim-simons Nov 1, 2022
e040c73
forgot to remove line, my bad
pim-simons Nov 1, 2022
e054ce3
Merge branch 'parameters-auto-discovery' of https://github.com/pim-si…
pim-simons Nov 1, 2022
3958efe
Update src/Analyzer.Cli/CommandLineParser.cs
pim-simons Nov 2, 2022
840c395
Update README.md
pim-simons Nov 2, 2022
c62c0d7
change Name to FullName in logging
pim-simons Nov 2, 2022
0688cfc
Merge branch 'development' into parameters-auto-discovery
VeraBE Nov 2, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Azure.Templates.Analyzer.Cli;
using Microsoft.Azure.Templates.Analyzer.Types;
using Newtonsoft.Json.Linq;

using System.Text.RegularExpressions;
VeraBE marked this conversation as resolved.
Show resolved Hide resolved

namespace Analyzer.Cli.FunctionalTests
{
Expand Down Expand Up @@ -140,9 +140,12 @@ public void AnalyzeDirectory_ValidInputValues_AnalyzesExpectedNumberOfFilesWithA
var result = _commandLineParser.InvokeCommandLineAPIAsync(args);

Assert.AreEqual((int)ExitCode.Success, result.Result);

StringAssert.Contains(outputWriter.ToString(), "Analyzed 4 files");
StringAssert.Contains(outputWriter.ToString(), "Parameters File: " + Path.Combine(Directory.GetCurrentDirectory(), "Tests", "ToTestSeparateParametersFile", "TemplateWithSeparateParametersFile.parameters.json"));
anaismiller marked this conversation as resolved.
Show resolved Hide resolved
StringAssert.Contains(outputWriter.ToString(), "Parameters File: " + Path.Combine(Directory.GetCurrentDirectory(), "Tests", "ToTestSeparateParametersFile", "TemplateWithSeparateParametersFile.parameters-dev.json"));
Assert.AreEqual(2, Regex.Matches(outputWriter.ToString(), "TemplateWithSeparateParametersFile.bicep").Count);
Assert.AreEqual(2, Regex.Matches(outputWriter.ToString(), "TemplateWithSeparateParametersFile.json").Count);
}

[DataTestMethod]
Expand Down