Skip to content
This repository was archived by the owner on Oct 9, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
96f7fdb
Merge pull request #1 from vad710/oct2016
vad710 Nov 1, 2016
1474a84
Merge pull request #2 from vad710/oct2016
vad710 Nov 5, 2016
bf9f360
Implementing UnsealedDerivedClass
vad710 Nov 5, 2016
092a41d
Fixing bugs with Resources
vad710 Nov 5, 2016
ad7ac35
Creating new Analyzer
vad710 Nov 5, 2016
5472dfb
Adding descriptor
vad710 Nov 10, 2016
43d75ee
Refactoring invocation method name
vad710 Nov 10, 2016
b063804
Adding new analyzer for Invoke
vad710 Nov 10, 2016
ce710d5
Invoke is now analyzed by a different analyzer
vad710 Nov 10, 2016
7ccd868
Updates to improve Unity integration
vad710 Nov 23, 2016
d6c87b1
Update readme.md
vad710 Dec 29, 2016
af7b247
Tentative fix for issue #5
vad710 Jan 11, 2017
83c101b
Updating Copyright Info
vad710 Jan 13, 2017
139b065
Minor Tweaks for Interactivity version
vad710 Jan 13, 2017
dbe5025
Fixing NotImplemented exception in the Json Exporter
vad710 Jan 17, 2017
326c9d5
Removing dependency on Location when it is Location.None
vad710 Jan 17, 2017
5a0afd1
Adding more info to exception
vad710 Jan 23, 2017
84ad256
Merge pull request #4 from vad710/nov2016
vad710 Feb 4, 2017
eefa115
Animator Analyzer Checks that project is using hash and not strings.
Kasperki Apr 6, 2017
8b98717
Merge pull request #7 from Kasperki/feature/AnimatorAnalyzer
vad710 Apr 7, 2017
7b7958f
Material string property analyzer methods
Kasperki Sep 30, 2017
2761532
Updated InvokeFunctionMissingnAnalyzer to be consistent with other An…
Kasperki Oct 1, 2017
22f85b7
Camera Analyzer: checks for Camera.main usage in Updates.
Kasperki Oct 1, 2017
14074af
Physics Analyzer, checks for methods that have non allocating versions.
Kasperki Oct 2, 2017
6f5f462
better name for variable.
Kasperki Oct 2, 2017
9d5b26f
Configuration can be read now from Json file.
Kasperki Oct 7, 2017
ea82dfd
ConfigurationFileGenerator & fixed optional arguments to work better.
Kasperki Oct 7, 2017
6dbe815
example analyzerConfiguration.json file.
Kasperki Oct 7, 2017
1b41c10
Updated readme.md
Kasperki Oct 7, 2017
1363757
Add serveral new analysis
donaldwuid Oct 8, 2017
7ee4dff
Merge branch 'feature/CLIConfigFile'
Kasperki Oct 8, 2017
a317016
Merge branch 'feature/CameraAnalyzer'
Kasperki Oct 8, 2017
f037559
Merge branch 'feature/MaterialAnalyzer'
Kasperki Oct 8, 2017
b3de35c
Merge branch 'feature/PhysicsAnalyzer'
Kasperki Oct 8, 2017
a997b85
fix bugs
donaldwuid Oct 9, 2017
33789b9
bug fix and span improvement
donaldwuid Oct 9, 2017
1f36f60
Fix Physics methods that have same name.
Oct 11, 2017
1cb3274
Merge branch 'feature/Physics'
Oct 11, 2017
ffb59fc
Fix stackoverflow error, thrown in recursion.
Oct 11, 2017
3664e3a
Merge branch 'feature/CameraAnalyzer'
Oct 11, 2017
885dd8b
Updated DiagnosticDescriptors.
Oct 12, 2017
4b8f846
Added command line parser.
Oct 16, 2017
0327796
MinimalSeverity can be now given as CLI argument.
Oct 16, 2017
6083ff9
Merge pull request #9 from Kasperki/feature/MaterialAnalyzer
vad710 Oct 16, 2017
070a492
Merge pull request #10 from Kasperki/master
vad710 Oct 16, 2017
c8cf67b
AutoAddUnityEngineAnalyzer
donaldwuid Oct 17, 2017
1410148
Merge branch 'master' into dev
Kasperki Oct 17, 2017
2bb14dc
fix typo
Kasperki Oct 17, 2017
14fe6b3
start of version check
Kasperki Oct 17, 2017
1775cc5
Merge pull request #17 from Kasperki/dev
vad710 Oct 17, 2017
86b4e1f
Unity Version check working.
Oct 18, 2017
d406e77
Refactoring UnityVersionResolver.cs
Oct 19, 2017
5249fa3
Updated DiagnosticDescriptors with new UnityVersion check.
Kasperki Oct 19, 2017
a933c17
Updated readme.md
Kasperki Oct 19, 2017
4eb8079
Merge pull request #18 from Kasperki/feature/UnityVersionCheck
vad710 Oct 20, 2017
f24b965
Merge branch 'master' into master
donaldwuid Oct 23, 2017
05ff37c
merged & tested
donaldwuid Oct 23, 2017
a465ae0
more NB analyzer
donaldwuid Dec 6, 2018
e461164
update readme about AutoAddUnityEngineAnalyzer
donaldwuid Dec 6, 2018
bf7a068
Update readme.md
donaldwuid Dec 6, 2018
e0e5fc6
update readme
donaldwuid Dec 6, 2018
e5fe919
Update readme.md
donaldwuid Dec 6, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
*.user
*.userosscache
*.sln.docstates
AutoAddUnityEngineAnalyzer/obj/
AutoAddUnityEngineAnalyzer/Library/
AutoAddUnityEngineAnalyzer/Temp/

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand Down Expand Up @@ -257,3 +260,6 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk
.DS_Store
*.csproj
*.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

using UnityEditor;
using UnityEngine;
using System.IO;
using System.Xml.Linq;
using System.Linq;

namespace UnityEngineAnalyzer
{

public class AutoAddUnityEngineAnalyzer : AssetPostprocessor
{
/// <summary>
/// Put your UnityEngineAnalyzer.dll in your unity project,
/// and modify this path relative to your project.
/// </summary>
public const string UnityEngineAnalyzerPath = "Tools\\VisualStudio\\UnityEngineAnalyzer\\UnityEngineAnalyzer.dll";

static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
{
TryAddUnityEngineAnalyzer();
}


private static void TryAddUnityEngineAnalyzer()
{
string dataPath = Application.dataPath + "/../";

var csprojPaths = Directory.GetFiles(dataPath, "*.csproj");

foreach(var oneCsProjPath in csprojPaths)
{
if(!string.IsNullOrEmpty(oneCsProjPath))
{
XDocument doc = XDocument.Load(oneCsProjPath);
var defaultNamespace = doc.Root.GetDefaultNamespace();

var unityEngineAnalyzer = doc.Descendants(defaultNamespace + "Analyzer").
Where(x => x.Attribute("Include").
Value.Contains("UnityEngineAnalyzer.dll")).
FirstOrDefault();

if(unityEngineAnalyzer == null)
{
Debug.Log("can not find UnityEngineAnalyzer in oneCsProjPath=" + oneCsProjPath);

try
{
doc.Root.
Add(
new XElement(defaultNamespace + "ItemGroup",
new XElement(defaultNamespace + "Analyzer",
new XAttribute("Include", UnityEngineAnalyzerPath))));

doc.Save(oneCsProjPath);
Debug.Log("did add UnityEngineAnalyzer in oneCsProjPath=" + oneCsProjPath);
}
catch (System.Exception ex)
{
Debug.LogError("exception caught in adding UnityEngineAnalyzer in oneCsProjPath=" + oneCsProjPath + "\nexception=" + ex);
}
}
}
}
}
}

}
17 changes: 17 additions & 0 deletions AutoAddUnityEngineAnalyzer/ProjectSettings/AudioManager.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!11 &1
AudioManager:
m_ObjectHideFlags: 0
m_Volume: 1
Rolloff Scale: 1
Doppler Factor: 1
Default Speaker Mode: 2
m_SampleRate: 0
m_DSPBufferSize: 0
m_VirtualVoiceCount: 512
m_RealVoiceCount: 32
m_SpatializerPlugin:
m_AmbisonicDecoderPlugin:
m_DisableAudio: 0
m_VirtualizeEffects: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!236 &1
ClusterInputManager:
m_ObjectHideFlags: 0
m_Inputs: []
19 changes: 19 additions & 0 deletions AutoAddUnityEngineAnalyzer/ProjectSettings/DynamicsManager.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!55 &1
PhysicsManager:
m_ObjectHideFlags: 0
serializedVersion: 3
m_Gravity: {x: 0, y: -9.81, z: 0}
m_DefaultMaterial: {fileID: 0}
m_BounceThreshold: 2
m_SleepThreshold: 0.005
m_DefaultContactOffset: 0.01
m_DefaultSolverIterations: 6
m_DefaultSolverVelocityIterations: 1
m_QueriesHitBackfaces: 0
m_QueriesHitTriggers: 1
m_EnableAdaptiveForce: 0
m_EnablePCM: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_AutoSimulation: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1045 &1
EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes: []
16 changes: 16 additions & 0 deletions AutoAddUnityEngineAnalyzer/ProjectSettings/EditorSettings.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!159 &1
EditorSettings:
m_ObjectHideFlags: 0
serializedVersion: 4
m_ExternalVersionControlSupport: Visible Meta Files
m_SerializationMode: 2
m_DefaultBehaviorMode: 1
m_SpritePackerMode: 4
m_SpritePackerPaddingPower: 1
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
m_ProjectGenerationRootNamespace:
m_UserGeneratedProjectSuffix:
m_CollabEditorSettings:
inProgressEnabled: 1
61 changes: 61 additions & 0 deletions AutoAddUnityEngineAnalyzer/ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!30 &1
GraphicsSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_Deferred:
m_Mode: 1
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
m_DeferredReflections:
m_Mode: 1
m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
m_ScreenSpaceShadows:
m_Mode: 1
m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
m_LegacyDeferred:
m_Mode: 1
m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
m_DepthNormals:
m_Mode: 1
m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
m_MotionVectors:
m_Mode: 1
m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
m_LightHalo:
m_Mode: 1
m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
m_LensFlare:
m_Mode: 1
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
m_AlwaysIncludedShaders:
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_CustomRenderPipeline: {fileID: 0}
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
m_DefaultRenderingPath: 1
m_DefaultMobileRenderingPath: 1
m_TierSettings: []
m_LightmapStripping: 0
m_FogStripping: 0
m_InstancingStripping: 0
m_LightmapKeepPlain: 1
m_LightmapKeepDirCombined: 1
m_LightmapKeepDynamicPlain: 1
m_LightmapKeepDynamicDirCombined: 1
m_LightmapKeepShadowMask: 1
m_LightmapKeepSubtractive: 1
m_FogKeepLinear: 1
m_FogKeepExp: 1
m_FogKeepExp2: 1
m_AlbedoSwatchInfos: []
m_LightsUseLinearIntensity: 0
m_LightsUseColorTemperature: 0
Loading