-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add serveral new analysis #15
base: master
Are you sure you want to change the base?
Conversation
DoNotUseCameraMainInUpdate ShouldCacheDelegate Remove DoNotUseForeachInUpdate DoNotBoxWhenInvoke DoNotUseEnumTypeParameter StructShouldImplementIEquatable StructShouldOverride DoNotUseMaterialName
Thanks for contributing @donaldwuid ! I will be merging some of your analyzers - some of the analyzers are dupes with other PRs. The I also noticed that you removed the DoNotUseForEachInUpdate which is no longer an issue with newer versions of unity - but it's still an issue with older versions of unity. I'd like to add in some sort of a version check to determine which analyzers to run on which versions - what are your thoughts on this? |
fix member accessed normal method invocation to be delegate; shrink unsealed method span to method name only, in case that there are some methods are meant to be inherited, and too much green lines will drive developer crazy!
hello, I fix several bugs and do some improvement |
If we can know the CLI version precisely, we can use it. |
@donaldwuid I think that with the new config file that @Kasperki wrote, you can specify which analyzers you want to run - I think we should keep the ForEach analyzer for now and those that don't want to use it can omit it via the config (it can even by default). In the meantime, could you please update the PR so that there's no conflicts and has no duplicate Analyzers? |
Each time you add/remove/modify your script file path, unity will re-generate csproj files, and your UnityEngineAnalyzer settings will miss. Add AutoAddUnityEngineAnalyzer, each time unity refreshes, AutoAddUnityEngineAnalyzer will check and try to add UnityEngineAnalyzer to your csproj files
The branch still has conflicts even after latest commit. I'll review the changes once the conflicts have been resolved. |
Sorry about the delay. I'm using mac personally, and I can only access PC & VisualStudio during workdays. By the way, since this PR, in my branch, I've commit several bug fixes, and add one Unity editor script to add our UnityEngineAnalysis.dll to csproj automatically. |
I've began porting over a lot of the code to dotnet standard and will eventually create a mono or dotnet core version of the CLI so that folks who use Mac/Linux can take advantage of the analyzers as well. You can see what we have here: https://github.com/vad710/UnityEngineAnalyzer/tree/dotnet-standard |
please hold on, this is a merge without testing |
merged & tested
merged & test |
Hi @donaldwuid - it's not clear to me what the AutoAdd is for - are you enabling the Anaylzer in Visual Studio dynamically? |
public const string StructShouldOverrideGetHashCode = "AOT0006"; | ||
public const string DoNotBoxWhenInvoke = "AOT0007"; | ||
public const string DoNoUseEnumTypeParameter = "AOT0008"; | ||
public const string ShouldCacheDelegate = "AOT0009"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am assuming that this is a performance / GC problem not an AOT problem. Is the the correct category?
@@ -9,6 +9,9 @@ | |||
|
|||
namespace UnityEngineAnalyzer.ForEachInUpdate | |||
{ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the new version functionality, no need to comment this analyzer
more NB analyzer
update readme about AutoAddUnityEngineAnalyzer
DoNotUseCameraMainInUpdate
ShouldCacheDelegate
Remove DoNotUseForeachInUpdate
DoNotBoxWhenInvoke
DoNotUseEnumTypeParameter
StructShouldImplementIEquatable
StructShouldOverride
DoNotUseMaterialName