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
- Host: GitHub
- URL: https://github.com/scogun/automapper.analyzers
- Owner: Scogun
- License: mit
- Created: 2022-05-25T16:23:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-05T13:09:29.000Z (over 3 years ago)
- Last Synced: 2025-08-13T04:50:01.763Z (10 months ago)
- Topics: analyzers, automapper
- Language: C#
- Homepage:
- Size: 73.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](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.