Git Product home page Git Product logo

typescriptanalizer's Introduction

TypeScriptAnalizer

Purpose

This package was created for the MGL843 course at ETS Montréal. It aims at detecting the proportions of certain anti-patterns in pure TypeScript and Angular projects. The detected anti-patterns are the following :

  • Long Method
  • Long Parameter List
  • God Class
  • Lazy Class
  • The any Type ( bad practice in TypeScript )

Requirements

A collection of scripts to conduct analysis on TypeScript Projetcs using Pharo and Moose This version is developped for Moose 8.0.2 image This Script relies heavily on the FamixTypeScript by Arezoo-Nasr. Be sure to have it ready in your image before using.

Importing in image

Please use Iceberg to import it in your image : Iceberg -> Add -> Clone from github.com -> Onwer name : Jean-Baptiste-E; Project Name : TypeScriptAnalizer. Be sure to choose the master branch in remote and do not forget to load the package.

Conducting an analysis

Analizing prjects first require you to have genereated the JSON files for your projetcs using the FamixTypeScriptImporter. Create a folder in your image and put all the JSON in this folder. Then in a Moose Playground type :

TypeScriptAnalyzer new analyzeAllProjects: '<NameOfYourFolder>'. 

After completion you will find a .csv file in your image folder containing all the statistics relevant to the detection of the mentionned Anti-patterns.

Visualizations

At the moment only one visualization is available using Roassal. It allows you to see every class in your project and their inheritance tree. The size of each circle represents the size of each class in terms of number of methods. Finaly red classes have been detected as god classes : Visualization example

To use this tool open a Moose Playground and type :

model:= ProjectLoader new loadProject: 'path/of/your/project/JSON.json'.
ProjectVisualisation seeGodClasses: model. 

typescriptanalizer's People

Contributors

jean-baptiste-e avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.