Skip to content

Commit

Permalink
Whitespace consistency in sources 🎨
Browse files Browse the repository at this point in the history
- Applies `insert_final_newline=true` from EditorConfig
- Applies `trim_trailing_whitespace=true` from EditorConfig
- Adds `eclint` to CI builds to ensure continued consistency
  • Loading branch information
atifaziz authored Feb 27, 2018
1 parent f09050d commit 836f591
Show file tree
Hide file tree
Showing 175 changed files with 766 additions and 757 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ before_install:
install:
- dotnet restore
- npm install -g eclint

before_script:
- git rm .editorconfig
- eclint check -n "**/*.{cs,tt,cmd,sh,md,txt,yml}"
- eclint check -w "**/*.{cs,tt,cmd,sh,md,txt,yml,json,sln,csproj,shfbproj}"
- git reset --hard

script:
- |
Expand Down
8 changes: 4 additions & 4 deletions MoreLinq.Test/AcquireTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -82,4 +82,4 @@ class Disposable : IDisposable

class ApplicationException : Exception {}
}
}
}
6 changes: 3 additions & 3 deletions MoreLinq.Test/AggregateRightTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/AssertCountTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/AssertTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/AtLeastTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/AtMostTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/BatchTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/BreakingCollection.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/BreakingSequence.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
4 changes: 2 additions & 2 deletions MoreLinq.Test/CartesianTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void TestCartesianProductCount()

Assert.AreEqual( expectedCount, result.Count() );
}

/// <summary>
/// Verify that each combination is produced in the Cartesian product
/// </summary>
Expand Down Expand Up @@ -107,4 +107,4 @@ public void TestEmptyCartesianEvaluation()
Assert.AreEqual(0, resultC.Count());
}
}
}
}
2 changes: 1 addition & 1 deletion MoreLinq.Test/Combinatorics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public static double Factorial(int n)
public static double Binomial(int n, int k) =>
Factorial(n) / (Factorial(n - k) * Factorial(k));
}
}
}
6 changes: 3 additions & 3 deletions MoreLinq.Test/CompareCountTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2017 Jonas Nyrup. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
2 changes: 1 addition & 1 deletion MoreLinq.Test/Comparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ public DelegatingComparer(Func<T, T, int> comparer)
public int Compare(T x, T y) => _comparer(x, y);
}
}
}
}
10 changes: 5 additions & 5 deletions MoreLinq.Test/ConcatTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -25,8 +25,8 @@ public class ConcatTest
{
#region Concat with single head and tail sequence

// NOTE: Concat with single head and tail sequence is now
// implemented in terms of Prepend so the tests are identical.
// NOTE: Concat with single head and tail sequence is now
// implemented in terms of Prepend so the tests are identical.

[Test]
public void ConcatWithNonEmptyTailSequence()
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/ConsumeTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/CountBetweenTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
12 changes: 6 additions & 6 deletions MoreLinq.Test/CountByTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -49,7 +49,7 @@ public void CountByWithSecondOccurenceImmediatelyAfterFirst()
KeyValuePair.Create('e', 1),
KeyValuePair.Create('r', 1));
}

[Test]
public void CountByEvenOddTest()
{
Expand All @@ -70,7 +70,7 @@ public void CountByWithEqualityComparer()
KeyValuePair.Create("B", 2),
KeyValuePair.Create("c", 1));
}

[Test]
public void CountByHasKeysOrderedLikeGroupBy()
{
Expand All @@ -81,7 +81,7 @@ public void CountByHasKeysOrderedLikeGroupBy()

countByKeys.AssertSequenceEqual(groupByKeys);
}

[Test]
public void CountByIsLazy()
{
Expand Down
10 changes: 5 additions & 5 deletions MoreLinq.Test/CurrentThreadCultureScope.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -21,7 +21,7 @@ namespace MoreLinq.Test

sealed class CurrentThreadCultureScope : Scope<CultureInfo>
{
public CurrentThreadCultureScope(CultureInfo @new) :
public CurrentThreadCultureScope(CultureInfo @new) :
base(CultureInfo.CurrentCulture)
{
Install(@new);
Expand All @@ -41,4 +41,4 @@ static void Install(CultureInfo value)
#endif
}
}
}
}
6 changes: 3 additions & 3 deletions MoreLinq.Test/DistinctByTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions MoreLinq.Test/EndsWithTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
Loading

0 comments on commit 836f591

Please sign in to comment.