Code Monkey home page Code Monkey logo

sfccanalyser's Introduction

SFCCAnalyser

A node script, which allows to analyse pipeline, script and controller usage. Ideal to identify potentially unused code.

Installation

  • checkout the code
  • run npm i

Usage

Use as npm start and follow the script. First it will request the cartridges folder of the project to analyse.

The following analysis are available:

  • cartridge usage (Checks Pipeline and Controller Usage)
    • The result is written to data/result/analyse.csv.
  • custom attribute usage (combine the custom objects before - see below)
  • detect unused code (analyses the import and require chains in order to identify and potentially delete unused scripts)

cartridge usage

Exclude Pipelines from the analysis

Create a data/ignores.json file and add the cartridge names to the list. Example:

[
  "bm_serviceframework",
  "bm_integrationframework",
  "bm_contentcopytool",
  "bm_cache_clear_plugin",
  "bm_customfeeds",
  "bm_instore",
  "bc_library"
]

detect unused code

This script takes controller and pipelines as base and sees, which scripts are actually imported from them.

Combine and analyse system objecttype extension XML Files

  1. put all xml files you would like to merge into one in ./data/meta-xmls/
  2. run node combine-xml.js
  3. the resulting merged and cleaned xml file will be in ./data/meta-xmls/combined.xml

sfccanalyser's People

Stargazers

 avatar  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.