Comments (10)
Not opposed to this (I'd probably make it a separate package unless you have reasons why it would be better not to). I'd have to think about what should be exposed there and what's really internal.
What methods would you use right now? E.g. would you use anything other than IsImmutableType()?
from apex.analyzers.
I think exposing IsImmutableType() would be sufficient for our purposes. Also agree that a separate package is cleaner.
from apex.analyzers.
@dbolin, Let me know if you'd like me to break out a separate project (Apex.Analyzers.Helpers?). Happy to send you a PR if you haven't started on this already.
from apex.analyzers.
Yeah, not sure what I would like the name to be, since Helpers is just kind of vague. The namespace prefix should be Apex.Analyzers.Immutable... since this is for the immutability rules (I don't have any other analyzers yet, but if I do they would be in separate packages).
from apex.analyzers.
Apex.Analyzers.Immutable.Primitives?
Apex.Analyzers.Immutable.TypeInfo?
Apex.Analyzers.Immutable.Metadata?
from apex.analyzers.
I'll go with Apex.Analyzers.Immutable.Semantics - still not quite accurate, but closer than anything else I can think of now.
from apex.analyzers.
DotNetAnalyzers/StyleCopAnalyzers#1624 (comment)
Somehow when you install the analyzer, the consuming project needs to reference the analyzer's dependencies also as an analyzer, or it can't load them. I haven't figured out a way to make this happen automatically. I might just reference the same cs files from both projects if there isn't another way to do this.
from apex.analyzers.
This also affects analyzers that consume the Semantics package, so this needs a good solution if this is to work at all.
from apex.analyzers.
Ended up including it in the package e.g. <None Include="$(OutputPath)\Apex.Analyzers.Immutable.Semantics.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
from apex.analyzers.
That is working great! Thanks for the help!
from apex.analyzers.
Related Issues (8)
- Referencing the analyzer package with PrivateAssets="All"
- OnFaith is not included in latest nuget package (0.9.3) HOT 1
- Could you add a strong name? HOT 1
- Whitelist is hard-coded HOT 3
- Version 1.1 does not work with Visual Studio 16.4 HOT 6
- Delegates with mutable parameters are treated as mutable HOT 1
- C# 9 Init-only property setters trigger IMM002 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apex.analyzers.