Skip to content

andersnygaard/CodeVision

 
 

Repository files navigation

#Code Vision

Code Vision is an impact analysis tool which provides source code and dependency searching.

##Code Search

Code search part of the solution solution based on Apache Lucene.net search engine library. It consists of indexer (console application) and web front end (Asp.Net MVC application). Indexer and web site should run on the same server. There should be a mechanism of getting the source files to that server from source control, SQL Server or elsewhere.

Three type of files are supported, but adding more types would be very simple:

  • C# files are indexed as text and also parsed by Roslyn to extract syntax attributes such as classes, methods, parameters and comments
  • JavaScript files indexed as text. Common third party libraries are excluded
  • SQL files indexed as text

##Dependency Graph This part of the solution helps answering question of what dependencies a given module has and what other modules depend on it. Modules are collectied by using Roslyn, then added to digraph that is searched through front end.

Digraph is persisted in SQL database.

##Nugets View projects in which a given Nuget package is installed. Nuget - project dependencies are discovered during code analysis of master source tree.

##Data Dictionary Data dictionary is digraph of SQL Server objects (databases, tables, columns and stored procedures.) These objects are discovered from live version of SQL Server, addeded to digraph which then is persisted in database. Objects can be searched, but most importantly, they can be annotated with custom properties like comments and flags.

###Local Setup

  1. Run all unit tests. This will build the search index based on the included sample files
  2. Ctrl+F5 CodeVision.Web This should create initial IISExpress configuration.
  3. Run CreateVdirsIISExpress.ps1 to add two virtual directories the IISExpress site.
  4. Start web site again. This time you should be able to search by say "Apache". See other search terms in the unit tests.

###Server Setup

  • Compile CodeVision.Console (indexer) and move it to the server
  • Adjust path where you want the index built in CodeVision.Console.exe.config:
<CodeVision IndexPath="C:\CodeVision\Index" ContentRoot="C:\Jenkins\workspace" />
  • Run Indexer with one parameter which is root folder for the source files
$root='C:\Jenkins\workspace'
$console='C:\CodeVision\Bin\CodeVision.Console.exe'
.$console -c $root
  • Deploy web site with MSWebDeploy or any other method
  • Setup two virtual directories \searchcontent and \searchindex and point them to the folders with source files and index

About

Impact analysis tool which provides source code and dependency searching.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 91.9%
  • JavaScript 6.1%
  • CSS 1.6%
  • Other 0.4%