Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# [FluentAssertions](http://fluentassertions.com/) Best Practices
# [FluentAssertions](http://fluentassertions.com/) Analyzers

<img src="./assets/fluent_assertions.svg.png" width="400">

***"With Fluent Assertions, the assertions look beautiful, natural and most importantly, extremely readable"*** -[_Girish_](https://twitter.com/girishracharya)

* Latest stable nuget [![NuGet Badge](https://buildstats.info/nuget/fluentassertions.bestpractices)](https://www.nuget.org/packages/fluentassertions.bestpractices/)
* Latest nuget [![NuGet Badge](https://buildstats.info/nuget/fluentassertions.bestpractices?includePreReleases=true)](https://www.nuget.org/packages/fluentassertions.bestpractices/)
* Latest stable nuget [![NuGet Badge](https://buildstats.info/nuget/fluentassertions.analyzers)](https://www.nuget.org/packages/fluentassertions.analyzers/)
* Latest nuget [![NuGet Badge](https://buildstats.info/nuget/fluentassertions.analyzers?includePreReleases=true)](https://www.nuget.org/packages/fluentassertions.analyzers/)
* The build status is [![Build status](https://ci.appveyor.com/api/projects/status/xxx1txj7qmxwobej?svg=true)](https://ci.appveyor.com/project/Meir017/fluentassertions-bestpractices)

A collection of Analyzers based on the best practices [docs](https://github.com/fluentassertions/fluentassertions/tree/release-5.0/docs/_data/tips).
Expand All @@ -19,13 +19,13 @@ A collection of Analyzers based on the best practices [docs](https://github.com/
using the latest stable version:

```powershell
Install-Package FluentAssertions.BestPractices
Install-Package FluentAssertions.Analyzers
```

using the latest prerelease version:

```powershell
Install-Package FluentAssertions.BestPractices -IncludePrerelease -Source https://ci.appveyor.com/nuget/fluentassertions-bestpractices
Install-Package FluentAssertions.Analyzers -IncludePrerelease -Source https://ci.appveyor.com/nuget/fluentassertions-bestpractices
```


Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ branches:

# Artifacts
artifacts:
- path: '.\artifacts\**\*.nupkg'
- path: ./artifacts/FluentAssertions.Analyzers*.nupkg
name: Artifacts

# Build cache
cache:
Expand Down
10 changes: 5 additions & 5 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ var configuration = Argument("configuration", "Release");
//////////////////////////////////////////////////////////////////////

// Define directories.
var buildDir = Directory("./artifacts") + Directory(configuration);
var solutionFile = File("./src/FluentAssertions.BestPractices.sln");
var testCsproj = File("./src/FluentAssertions.BestPractices.Tests/FluentAssertions.BestPractices.Tests.csproj");
var nuspecFile = File("./src/FluentAssertions.BestPractices/FluentAssertions.BestPractices.nuspec");
var buildDir = Directory("./artifacts");
var solutionFile = File("./src/FluentAssertions.Analyzers.sln");
var testCsproj = File("./src/FluentAssertions.Analyzers.Tests/FluentAssertions.Analyzers.Tests.csproj");
var nuspecFile = File("./src/FluentAssertions.Analyzers/FluentAssertions.Analyzers.nuspec");
var version = GetCurrentVersion(Context);

//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -86,7 +86,7 @@ Task("Publish-NuGet")
var apiKey = EnvironmentVariable("NUGET_API_KEY");
var apiUrl = EnvironmentVariable("NUGET_API_URL");

var nupkgFile = File($"{buildDir}/FluentAssertions.BestPractices.{version}.nupkg");
var nupkgFile = File($"{buildDir}/FluentAssertions.Analyzers.{version}.nupkg");
Information($"Publishing nupkg file '{nupkgFile}'...");

NuGetPush(nupkgFile, new NuGetPushSettings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Microsoft.CodeAnalysis;

namespace FluentAssertions.BestPractices.Tests
namespace FluentAssertions.Analyzers.Tests
{
/// <summary>
/// Location where the diagnostic appears, as determined by path, line number, and column number.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using Microsoft.CodeAnalysis.CSharp;
using System.Reflection;

namespace FluentAssertions.BestPractices.Tests
namespace FluentAssertions.Analyzers.Tests
{
/// <summary>
/// Superclass of all Unit Tests for DiagnosticAnalyzers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FluentAssertions.BestPractices\FluentAssertions.BestPractices.csproj" />
<ProjectReference Include="..\FluentAssertions.Analyzers\FluentAssertions.Analyzers.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text;

namespace FluentAssertions.BestPractices.Tests
namespace FluentAssertions.Analyzers.Tests
{
public static class GenerateCode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections.Generic;
using System.Linq;

namespace FluentAssertions.BestPractices.Tests
namespace FluentAssertions.Analyzers.Tests
{
[AttributeUsage(AttributeTargets.Method)]
public class NotImplementedAttribute : TestCategoryBaseAttribute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace FluentAssertions.BestPractices.Tests
namespace FluentAssertions.Analyzers.Tests
{
[TestClass]
public class CollectionTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace FluentAssertions.BestPractices.Tests
namespace FluentAssertions.Analyzers.Tests
{
[TestClass]
public class DictionaryTests
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
VisualStudioVersion = 15.0.27004.2002
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentAssertions.BestPractices.Tests", "FluentAssertions.BestPractices.Tests\FluentAssertions.BestPractices.Tests.csproj", "{979824BD-5936-4969-B43B-BF613B3C0C5F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentAssertions.Analyzers.Tests", "FluentAssertions.Analyzers.Tests\FluentAssertions.Analyzers.Tests.csproj", "{979824BD-5936-4969-B43B-BF613B3C0C5F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{1D2F0A0B-7B98-49D6-BD83-E750A2DD7FD0}"
ProjectSection(SolutionItems) = preProject
..\.gitattributes = ..\.gitattributes
..\.gitignore = ..\.gitignore
..\appveyor.yml = ..\appveyor.yml
..\build.cake = ..\build.cake
..\build.ps1 = ..\build.ps1
..\build.sh = ..\build.sh
..\collections.yml = ..\collections.yml
..\comparable.yml = ..\comparable.yml
..\dictionaries.yml = ..\dictionaries.yml
..\exceptions.yml = ..\exceptions.yml
..\LICENSE = ..\LICENSE
..\nullables.yml = ..\nullables.yml
..\README.md = ..\README.md
..\strings.yml = ..\strings.yml
..\types.yml = ..\types.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentAssertions.BestPractices", "FluentAssertions.BestPractices\FluentAssertions.BestPractices.csproj", "{3BA672F7-00D8-4E77-89A0-D46DD99D35AA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentAssertions.Analyzers", "FluentAssertions.Analyzers\FluentAssertions.Analyzers.csproj", "{3BA672F7-00D8-4E77-89A0-D46DD99D35AA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
public static class Constants
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<RootNamespace>FluentAssertions.BestPractices</RootNamespace>
<RootNamespace>FluentAssertions.Analyzers</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<None Update="FluentAssertions.BestPractices.nuspec">
<None Update="FluentAssertions.Analyzers.nuspec">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="tools\install.ps1">
Expand All @@ -23,8 +23,4 @@
</None>
</ItemGroup>

<PropertyGroup>
<NuspecFile>.\FluentAssertions.BestPractices</NuspecFile>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>FluentAssertions.BestPractices</id>
<title>Fluent Assertions Best Practice</title>
<id>FluentAssertions.Analyzers</id>
<title>Fluent Assertions Analyzers</title>
<version>0.5.0</version>
<owners>Meir Blachman</owners>
<authors>Meir Blachman</authors>
Expand All @@ -13,17 +13,17 @@
Analyzers to help writing fluentassertions the right way.
</description>
<language>en-US</language>
<licenseUrl>https://github.com/Meir017/fluentassertions.bestpractices/blob/master/LICENSE</licenseUrl>
<licenseUrl>https://github.com/Meir017/fluentassertions.analyzers/blob/master/LICENSE</licenseUrl>
<iconUrl>https://raw.githubusercontent.com/fluentassertions/fluentassertions/release-5.0/Src/FluentAssertions.png</iconUrl>
<projectUrl>https://github.com/Meir017/fluentassertions.bestpractices</projectUrl>
<projectUrl>https://github.com/Meir017/fluentassertions.analyzers</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>FluentAssertions Analyzers</tags>
<frameworkAssemblies>
<frameworkAssembly assemblyName="System" targetFramework="" />
</frameworkAssemblies>
<copyright>Copyright Meir Blachman 2017</copyright>
<releaseNotes>
See https://github.com/Meir017/fluentassertions.bestpractices/releases/
See https://github.com/Meir017/fluentassertions.analyzers/releases/
</releaseNotes>
</metadata>
<files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldBeEmptyAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldBeInAscendingOrderAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldBeInDescendingOrderAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldContainItemAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldContainPropertyAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldContainSingleAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldEqualOtherCollectionByComparerAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldHaveCountAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldHaveCountGreaterOrEqualToAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldHaveCountGreaterThanAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldHaveCountLessOrEqualToAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldHaveCountLessThanAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldHaveElementAtAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldHaveElementAt0NullAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldHaveSameCountAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldIntersectWithAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{

[DiagnosticAnalyzer(LanguageNames.CSharp)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldNotBeNullOrEmptyAnalyzer : FluentAssertionsAnalyzer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Composition;

namespace FluentAssertions.BestPractices
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CollectionShouldNotContainItemAnalyzer : FluentAssertionsAnalyzer
Expand Down
Loading