{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/nodejstools/pulls/comments/32792437","id":32792437,"diff_hunk":"@@ -490,6 +490,26 @@ public NodejsProjectNode(NodejsProjectPackage package)\n             if (CommonUtils.IsSubpathOf(_intermediateOutputPath, fileNode.Url)) {\r\n                 return false;\r\n             }\r\n+\r\n+            int maxModulesDepth = AnalysisConstants.MaxAnalysisDepthQualty;\r\n+            if (this._analyzer.AnalysisLevel == Options.AnalysisLevel.Medium) {\r\n+                maxModulesDepth = AnalysisConstants.MaxAnalysisDepthFast;\r\n+            }\r\n+\r\n+            var relativeFile = CommonUtils.GetRelativeFilePath(this.FullPathToChildren, fileNode.Url);\r\n+            int nestedModulesCount = 0;\r\n+            int startIndex = 0;\r\n+            int index = relativeFile.IndexOf(AnalysisConstants.NodeModulesFolder, startIndex, StringComparison.OrdinalIgnoreCase);\r\n+            while (index != -1) {\r\n+                nestedModulesCount++;\r\n+                if (nestedModulesCount > maxModulesDepth){\r\n+                    return false;\r\n+                }\r\n+\r\n+                startIndex = index + 1;\r\n+                index = relativeFile.IndexOf(AnalysisConstants.NodeModulesFolder, startIndex, StringComparison.OrdinalIgnoreCase);\r\n+            }\r\n+\r","path":"Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs","position":23,"original_position":23,"commit_id":"fd7da144f7918feac044fc1f91a858f9eae9b000","original_commit_id":"fd7da144f7918feac044fc1f91a858f9eae9b000","user":{"login":"mousetraps","id":762848,"avatar_url":"https://avatars.githubusercontent.com/u/762848?v=3","gravatar_id":"","url":"https://api.github.com/users/mousetraps","html_url":"https://github.com/mousetraps","followers_url":"https://api.github.com/users/mousetraps/followers","following_url":"https://api.github.com/users/mousetraps/following{/other_user}","gists_url":"https://api.github.com/users/mousetraps/gists{/gist_id}","starred_url":"https://api.github.com/users/mousetraps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mousetraps/subscriptions","organizations_url":"https://api.github.com/users/mousetraps/orgs","repos_url":"https://api.github.com/users/mousetraps/repos","events_url":"https://api.github.com/users/mousetraps/events{/privacy}","received_events_url":"https://api.github.com/users/mousetraps/received_events","type":"User","site_admin":false},"body":"This entire block should be placed below the checks for _analysisIgnoredDirs and _maxFileSize, rather than above because those should take precedent. ","created_at":"2015-06-19T00:23:53Z","updated_at":"2015-06-19T00:23:53Z","html_url":"https://github.com/Microsoft/nodejstools/pull/146#discussion_r32792437","pull_request_url":"https://api.github.com/repos/Microsoft/nodejstools/pulls/146","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/nodejstools/pulls/comments/32792437"},"html":{"href":"https://github.com/Microsoft/nodejstools/pull/146#discussion_r32792437"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/nodejstools/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/nodejstools/pulls/146","id":36407280,"html_url":"https://github.com/Microsoft/nodejstools/pull/146","diff_url":"https://github.com/Microsoft/nodejstools/pull/146.diff","patch_url":"https://github.com/Microsoft/nodejstools/pull/146.patch","issue_url":"https://api.github.com/repos/Microsoft/nodejstools/issues/146","number":146,"state":"open","locked":false,"title":"Add the limit to the analysis depth (Related to #88).","user":{"login":"kant2002","id":4257079,"avatar_url":"https://avatars.githubusercontent.com/u/4257079?v=3","gravatar_id":"","url":"https://api.github.com/users/kant2002","html_url":"https://github.com/kant2002","followers_url":"https://api.github.com/users/kant2002/followers","following_url":"https://api.github.com/users/kant2002/following{/other_user}","gists_url":"https://api.github.com/users/kant2002/gists{/gist_id}","starred_url":"https://api.github.com/users/kant2002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kant2002/subscriptions","organizations_url":"https://api.github.com/users/kant2002/orgs","repos_url":"https://api.github.com/users/kant2002/repos","events_url":"https://api.github.com/users/kant2002/events{/privacy}","received_events_url":"https://api.github.com/users/kant2002/received_events","type":"User","site_admin":false},"body":"Limit depth analysys to relative paths which contains only 2 node_modules. This should be sufficient enough to capture\r\na) Capture API of the root package\r\nb) Capture API of the dependencies. This is obiviously the must to analyze (1 node_modules)\r\nc) Capture API of subdependencies (2 node_modules). This is also the must, since a lot of packages are wrapper/glue for another library. For example using gulp-typescript require that gulp-typescript should be parsed (level b) and typescript should be parsed (level c) since typescritp provide some config options for gulp-typescript.\r\n\r\nRelated to #88 \r\n\r\n#138 Added Medium level of Intellisense. This level now same as Full level, but limit analysis depth to the 2 nested modules depth. Full mode is now has limit to 4 modules depth which I almost sure practical enough, but could be increased if needed. Low level is analyse 1 level depth.","created_at":"2015-05-28T13:40:34Z","updated_at":"2015-06-19T00:23:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"108e674e858e11433ba67f9e8054a2e7df66b9e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/nodejstools/pulls/146/commits","review_comments_url":"https://api.github.com/repos/Microsoft/nodejstools/pulls/146/comments","review_comment_url":"https://api.github.com/repos/Microsoft/nodejstools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/nodejstools/issues/146/comments","statuses_url":"https://api.github.com/repos/Microsoft/nodejstools/statuses/fd7da144f7918feac044fc1f91a858f9eae9b000","head":{"label":"kant2002:high_mem","ref":"high_mem","sha":"fd7da144f7918feac044fc1f91a858f9eae9b000","user":{"login":"kant2002","id":4257079,"avatar_url":"https://avatars.githubusercontent.com/u/4257079?v=3","gravatar_id":"","url":"https://api.github.com/users/kant2002","html_url":"https://github.com/kant2002","followers_url":"https://api.github.com/users/kant2002/followers","following_url":"https://api.github.com/users/kant2002/following{/other_user}","gists_url":"https://api.github.com/users/kant2002/gists{/gist_id}","starred_url":"https://api.github.com/users/kant2002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kant2002/subscriptions","organizations_url":"https://api.github.com/users/kant2002/orgs","repos_url":"https://api.github.com/users/kant2002/repos","events_url":"https://api.github.com/users/kant2002/events{/privacy}","received_events_url":"https://api.github.com/users/kant2002/received_events","type":"User","site_admin":false},"repo":{"id":36436304,"name":"nodejstools","full_name":"kant2002/nodejstools","owner":{"login":"kant2002","id":4257079,"avatar_url":"https://avatars.githubusercontent.com/u/4257079?v=3","gravatar_id":"","url":"https://api.github.com/users/kant2002","html_url":"https://github.com/kant2002","followers_url":"https://api.github.com/users/kant2002/followers","following_url":"https://api.github.com/users/kant2002/following{/other_user}","gists_url":"https://api.github.com/users/kant2002/gists{/gist_id}","starred_url":"https://api.github.com/users/kant2002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kant2002/subscriptions","organizations_url":"https://api.github.com/users/kant2002/orgs","repos_url":"https://api.github.com/users/kant2002/repos","events_url":"https://api.github.com/users/kant2002/events{/privacy}","received_events_url":"https://api.github.com/users/kant2002/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kant2002/nodejstools","description":"Node.js Tools for Visual Studio","fork":true,"url":"https://api.github.com/repos/kant2002/nodejstools","forks_url":"https://api.github.com/repos/kant2002/nodejstools/forks","keys_url":"https://api.github.com/repos/kant2002/nodejstools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kant2002/nodejstools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kant2002/nodejstools/teams","hooks_url":"https://api.github.com/repos/kant2002/nodejstools/hooks","issue_events_url":"https://api.github.com/repos/kant2002/nodejstools/issues/events{/number}","events_url":"https://api.github.com/repos/kant2002/nodejstools/events","assignees_url":"https://api.github.com/repos/kant2002/nodejstools/assignees{/user}","branches_url":"https://api.github.com/repos/kant2002/nodejstools/branches{/branch}","tags_url":"https://api.github.com/repos/kant2002/nodejstools/tags","blobs_url":"https://api.github.com/repos/kant2002/nodejstools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kant2002/nodejstools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kant2002/nodejstools/git/refs{/sha}","trees_url":"https://api.github.com/repos/kant2002/nodejstools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kant2002/nodejstools/statuses/{sha}","languages_url":"https://api.github.com/repos/kant2002/nodejstools/languages","stargazers_url":"https://api.github.com/repos/kant2002/nodejstools/stargazers","contributors_url":"https://api.github.com/repos/kant2002/nodejstools/contributors","subscribers_url":"https://api.github.com/repos/kant2002/nodejstools/subscribers","subscription_url":"https://api.github.com/repos/kant2002/nodejstools/subscription","commits_url":"https://api.github.com/repos/kant2002/nodejstools/commits{/sha}","git_commits_url":"https://api.github.com/repos/kant2002/nodejstools/git/commits{/sha}","comments_url":"https://api.github.com/repos/kant2002/nodejstools/comments{/number}","issue_comment_url":"https://api.github.com/repos/kant2002/nodejstools/issues/comments{/number}","contents_url":"https://api.github.com/repos/kant2002/nodejstools/contents/{+path}","compare_url":"https://api.github.com/repos/kant2002/nodejstools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kant2002/nodejstools/merges","archive_url":"https://api.github.com/repos/kant2002/nodejstools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kant2002/nodejstools/downloads","issues_url":"https://api.github.com/repos/kant2002/nodejstools/issues{/number}","pulls_url":"https://api.github.com/repos/kant2002/nodejstools/pulls{/number}","milestones_url":"https://api.github.com/repos/kant2002/nodejstools/milestones{/number}","notifications_url":"https://api.github.com/repos/kant2002/nodejstools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kant2002/nodejstools/labels{/name}","releases_url":"https://api.github.com/repos/kant2002/nodejstools/releases{/id}","created_at":"2015-05-28T12:16:56Z","updated_at":"2015-05-28T12:17:02Z","pushed_at":"2015-06-18T10:27:38Z","git_url":"git://github.com/kant2002/nodejstools.git","ssh_url":"git@github.com:kant2002/nodejstools.git","clone_url":"https://github.com/kant2002/nodejstools.git","svn_url":"https://github.com/kant2002/nodejstools","homepage":"http://aka.ms/explorentvs","size":89594,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"16b9e653ea4c1dc80c7b7f36ab20a23b48fc55d4","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":33017149,"name":"nodejstools","full_name":"Microsoft/nodejstools","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/nodejstools","description":"Node.js Tools for Visual Studio","fork":false,"url":"https://api.github.com/repos/Microsoft/nodejstools","forks_url":"https://api.github.com/repos/Microsoft/nodejstools/forks","keys_url":"https://api.github.com/repos/Microsoft/nodejstools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/nodejstools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/nodejstools/teams","hooks_url":"https://api.github.com/repos/Microsoft/nodejstools/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/nodejstools/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/nodejstools/events","assignees_url":"https://api.github.com/repos/Microsoft/nodejstools/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/nodejstools/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/nodejstools/tags","blobs_url":"https://api.github.com/repos/Microsoft/nodejstools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/nodejstools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/nodejstools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/nodejstools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/nodejstools/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/nodejstools/languages","stargazers_url":"https://api.github.com/repos/Microsoft/nodejstools/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/nodejstools/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/nodejstools/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/nodejstools/subscription","commits_url":"https://api.github.com/repos/Microsoft/nodejstools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/nodejstools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/nodejstools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/nodejstools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/nodejstools/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/nodejstools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/nodejstools/merges","archive_url":"https://api.github.com/repos/Microsoft/nodejstools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/nodejstools/downloads","issues_url":"https://api.github.com/repos/Microsoft/nodejstools/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/nodejstools/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/nodejstools/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/nodejstools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/nodejstools/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/nodejstools/releases{/id}","created_at":"2015-03-28T01:37:20Z","updated_at":"2015-06-18T23:00:14Z","pushed_at":"2015-06-18T23:12:54Z","git_url":"git://github.com/Microsoft/nodejstools.git","ssh_url":"git@github.com:Microsoft/nodejstools.git","clone_url":"https://github.com/Microsoft/nodejstools.git","svn_url":"https://github.com/Microsoft/nodejstools","homepage":"http://aka.ms/explorentvs","size":96899,"stargazers_count":468,"watchers_count":468,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":119,"forks":53,"open_issues":119,"watchers":468,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/nodejstools/pulls/146"},"html":{"href":"https://github.com/Microsoft/nodejstools/pull/146"},"issue":{"href":"https://api.github.com/repos/Microsoft/nodejstools/issues/146"},"comments":{"href":"https://api.github.com/repos/Microsoft/nodejstools/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/nodejstools/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/nodejstools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/nodejstools/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/nodejstools/statuses/fd7da144f7918feac044fc1f91a858f9eae9b000"}}}}