An open API service indexing awesome lists of open source software.

https://github.com/scogun/automapper.analyzers

AutoMapper Static Analyzers
https://github.com/scogun/automapper.analyzers

analyzers automapper

Last synced: 9 months ago
JSON representation

AutoMapper Static Analyzers

Awesome Lists containing this project

README

          


Analyzers logo

[![NuGet Version and Downloads count](https://buildstats.info/nuget/AutoMapper.Contrib.Analyzers)](https://www.nuget.org/packages/AutoMapper.Contrib.Analyzers)

# Table of Contents

1. [Overview](#overview)
2. [Structure](#structure)
1. [Currently Available](#currently-available)
3. [Code Smells](#code-smells)
4. [Installation](#installation)
1. [NuGet package](#nuget-package)
2. [VSIX Extention](#vsix-extention)

## Overview
Here is AutoMapper Static Analyzers.

The main reason to write this VS Extension and NuGet package is that developers who is not so familiar with AutoMapper sometimes use it not proper way.

## Structure
##### Currently Available
The project already contains:
1. [AutoMapper.Analyzers.Common](src/AutoMapper.Analyzers.Common/AutoMapper.Analyzers.Common.csproj) - common AutoMapper Analyzers
2. [AutoMapper.Analyzers.Common.CodeFixes](src/AutoMapper.Analyzers.Common.CodeFixes/AutoMapper.Analyzers.Common.CodeFixes.csproj) - common fixes for raised AutoMapper Analyzers diagnostics
3. [AutoMapper.Analyzers.Common.Package](package/AutoMapper.Analyzers.Common.Package/AutoMapper.Analyzers.Common.Package.csproj) - project for building and publishing the NuGet package
4. [AutoMapper.Analyzers.Common.Tests](tests/AutoMapper.Analyzers.Common.Tests/AutoMapper.Analyzers.Common.Tests.csproj) - tests for common AutoMapper Analyzers
5. [AutoMapper.Analyzers.Vsix](package/AutoMapper.Analyzers.Vsix/AutoMapper.Analyzers.Vsix.csproj) - project to create VS Extension package

## Code Smells


Smells
Availability
Codes
Level
Description
Fix


Common smells
Available
AMA0001
Warrning
Profile doesn't contain maps
In Progress...


AMA0002
Identical names properties are manual mapped
Available


AMA0003
Manual checking that src is not null
Available for next checking: "??", "== null", "!= null"


AMA0005
Manual flattening of complex model
Available


AMA0006
Manual flattening of naming similar complex model
Available


AMA0007
Useless try-catch/finally covering of CreateMap calls.
Available


In Plans
AMA0004
ForMember ignore for all left properties
...

## Installation
There are two ways to install analyzers:

### NuGet Package
Just add **AutoMapper.Contrib.Analyzers** package into a project which you would like to control.

### VSIX Extention
In case of installation **VSIX extention** any project will be checking by **AutoMapper.Analyzers**.
So far, there is only one way to install the extension:
1. Build [Vsix](package/AutoMapper.Analyzers.Vsix/AutoMapper.Analyzers.Vsix.csproj) project
2. Find in `...\AutoMapper.Analyzers\package\AutoMapper.Analyzers.Vsix\bin\Release` folder `AutoMapper.Analyzers.Vsix.vsix` file
3. Run it

In nearest future VSIX extension will be pushed into VSIX repository.