Skip to content

Commit fe127b0

Browse files
committed
fix
1 parent e0831d0 commit fe127b0

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Use output window = check this box
9797
3. Enter the full path to the linter executable in **Script to run**.
9898
4. Enter the following in **Parameter**:
9999

100-
```
100+
```cmd
101101
--file "$REPO\$FILE" --severity warning --verbose
102102
```
103103

README.ru-ru.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Use output window = поставьте галочку
9191
Откройте пункт меню Инструменты / Настройки в SourceTree, выберите вкладку "Пользовательские действия" и добавьте новый элемент в список.
9292
Далее введите полный путь к исполняемому файлу линтера в поле "Исполняемый файл" и приведенную ниже строку в поле "Параметры":
9393

94-
```
94+
```cmd
9595
--file "$REPO\$FILE" --severity warning --verbose
9696
```
9797

TeamTools.Linter.CommandLineTests/UnitTests/FileEnumeratorTests.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using NUnit.Framework;
22
using System.Collections.Generic;
3+
using System.IO;
34
using TeamTools.Common.Linting;
45
using TeamTools.TSQL.Linter.CommandLine.Infrastructure;
56
using TeamTools.TSQL.Linter.CommandLineTests.TestingInfrastructure;
@@ -34,7 +35,11 @@ public void TestListEnumerator()
3435
var files = new ListedFileEnumerator(fs, "subfolder", "srcfile");
3536
var fileList = string.Join(";", files.EnumFiles());
3637

37-
Assert.That(fileList, Is.EqualTo("subfolder\\line1;subfolder\\line2"));
38+
// Replace is to respect different platforms
39+
var expectedValue = "subfolder\\line1;subfolder\\line2";
40+
expectedValue = expectedValue.Replace('\\', Path.DirectorySeparatorChar);
41+
42+
Assert.That(fileList, Is.EqualTo(expectedValue));
3843
}
3944

4045
[Test]

TeamTools.Linter.CommandLineTests/UnitTests/FileReporterTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using NUnit.Framework;
2+
using System;
23
using System.Collections.Generic;
34
using System.IO;
45
using TeamTools.Common.Linting;
@@ -29,7 +30,7 @@ public void TestReportResultsSendsToStream()
2930
reporter.ReportResults();
3031

3132
// ToList, ToArray returns elements in reversed order
32-
Assert.That(writer.ToString(), Is.EqualTo("error: issue2\r\nerror: issue1\r\n"));
33+
Assert.That(writer.ToString(), Is.EqualTo(string.Join(Environment.NewLine, "error: issue2", "error: issue1", "")));
3334
}
3435

3536
[Test]

0 commit comments

Comments
 (0)