https://github.com/kzu/projectcodefixer
https://github.com/kzu/projectcodefixer
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/kzu/projectcodefixer
- Owner: kzu
- License: mit
- Created: 2024-11-22T14:32:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-10T12:42:37.000Z (over 1 year ago)
- Last Synced: 2025-03-26T22:05:50.868Z (over 1 year ago)
- Language: C#
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ProjectCodeFixer
Attempts to repro https://github.com/dotnet/roslyn/issues/34636
## Steps to reproduce
1. Run `dotnet build`
1. Open `Sample\Sample.sln` and build
A build error `PCF001` should appear in `Class1`.
If a `...` property is set on the project, it goes away.
NOTE: the Fixer project is packed with the analyzer, but currently it's not being
picked up by VS :(. Unit testing is also not possible due to the following error:
```
System.InvalidOperationException : Code fix is attempting to provide a fix for a non-local analyzer diagnostic
```
Which doesn't make much sense since a code fixer can fix any artifacts in a project
including additional files, AFAIK.
> NOTE: the code fixer PROJECT is propertly set up and hooked-up, as shown by
> another dummy analyzer/fixer pair that adds a "1" suffix to types without it.
## Expected behavior
The fixer shows up and can add an MSBuild project property to the project file.
The package contents is:
```
Package ProjectCodeFixer.42.252.881.nupkg
.\Fixers\bin\ProjectCodeFixer.nuspec
├── Metadata:
│ Description ProjectCodeFixer
│ RepositoryCommit f504c3c98dfc42a4951630a86d2399c4d55a06c9
│ RepositoryType git
│ Version 42.252.881
└── Contents:
├── analyzers
│ └── dotnet
│ ├── Analyzers.dll
│ ├── Analyzers.pdb
│ ├── Fixers.dll
│ └── Fixers.pdb
└── build
└── ProjectCodeFixer.targets
```
(render by [nugetizer](https://github.com/devlooped/nugetizer))