Skip to content

Repository files navigation

Analyzers logo

NuGet Version and Downloads count

Table of Contents

  1. Overview
  2. Structure
    1. Currently Available
  3. Code Smells
  4. Installation
    1. NuGet package
    2. 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 - common AutoMapper Analyzers
  2. AutoMapper.Analyzers.Common.CodeFixes - common fixes for raised AutoMapper Analyzers diagnostics
  3. AutoMapper.Analyzers.Common.Package - project for building and publishing the NuGet package
  4. AutoMapper.Analyzers.Common.Tests - tests for common AutoMapper Analyzers
  5. AutoMapper.Analyzers.Vsix - project to create VS Extension package

Code Smells

SmellsAvailabilityCodesLevelDescriptionFix
Common smellsAvailableAMA0001WarrningProfile doesn't contain mapsIn Progress...
AMA0002Identical names properties are manual mappedAvailable
AMA0003Manual checking that src is not nullAvailable for next checking: "??", "== null", "!= null"
AMA0005Manual flattening of complex modelAvailable
AMA0006Manual flattening of naming similar complex modelAvailable
AMA0007Useless try-catch/finally covering of CreateMap calls.Available
In PlansAMA0004ForMember 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 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.

About

AutoMapper Static Analyzers

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages