Skip to content

mike-hoang/redhat-alizer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alizer

Alizer (which stands for Application Analyzer) is a utilily whose goal is to extract informations about an application source code.

🚨 DEPRECATION WARNING

This repository is deprecated and will be archived. Active developement of this tool has been moved to devfile/alizer.

Usage

CLI

The Go CLI can be built with the below command:

# inside the go/ dir
$ go build alizer.go

CLI Arguments

alizer analyze

./alizer analyze [OPTION]... [PATH]...
  --log {debug|info|warning}    sets the logging level of the CLI. The arg accepts only 3 values [`debug`, `info`, `warning`]. The default value is `warning` and the logging level is `ErrorLevel`.

alizer component

./alizer component [OPTION]... [PATH]...
  --port-detection {docker|compose|source}    port detection strategy to use when detecting a port. Currently supported strategies are 'docker', 'compose' and 'source'. You can pass more strategies at the same time. They will be executed in order. By default Alizer will execute docker, compose and source.

alizer devfile

./alizer devfile [OPTION]... [PATH]...
  --registry strings    registry where to download the devfiles. Default value: https://registry.devfile.io

Library Package

Language Detection

To analyze your source code with Alizer, just import it and use the recognizer:

import "github.com/redhat-developer/alizer/pkg/apis/recognizer"

languages, err := recognizer.Analyze("your/project/path")

Component Detection

It detects all components which are found in the source tree where each component consists of:

  • Name: name of the component
  • Path: root of the component
  • Languages: list of languages belonging to the component ordered by their relevance.
  • Ports: list of ports used by the component
import "github.com/redhat-developer/alizer/pkg/apis/recognizer"

components, err := recognizer.DetectComponents("your/project/path")

For more info about name detection, see the name detection doc.

For more info about port detection, see the port detection doc.

Devfile Detection

It selects a devfile from a list of devfiles (from a devfile registry or other storage) based on the information found in the source tree.

import "github.com/redhat-developer/alizer/pkg/apis/recognizer"

devfile, err := recognizer.SelectDevFileFromTypes("your/project/path", devfiles)

Outputs

Example of analyze command:

[
  {
    "Name": "Go",
    "Aliases": ["golang"],
    "Weight": 94.72,
    "Frameworks": [],
    "Tools": ["1.18"],
    "CanBeComponent": true
  }
]

Example of component command:

[
  {
    "Name": "spring4mvc-jpa",
    "Path": "path-of-the-component",
    "Languages": [
      {
        "Name": "Java",
        "Aliases": null,
        "Weight": 100,
        "Frameworks": ["Spring"],
        "Tools": ["Maven"],
        "CanBeComponent": true
      }
    ],
    "Ports": null
  }
]

Example of devfile command:

[
  {
    "Name": "nodejs",
    "Language": "JavaScript",
    "ProjectType": "Node.js",
    "Tags": ["Node.js", "Express", "ubi8"]
  }
]

Contributing

This is an open source project open to anyone. This project welcomes contributions and suggestions!

For information on getting started, refer to the CONTRIBUTING instructions.

Release process

The release process of alizer is very straightforward. You can create a new release here.

  • The title of the release has to be the new version. Alizer follows the v{major}.{minor}.{bugfix} format (e.g v0.1.0)
  • The description of the release is optional. You may add a description if there were outstanding updates in the project, not mentioned in the issues or PRs of this release.

Release Binaries

For each release a group of binary files is generated. More detailed we have the following types:

  • linux/amd64
  • linux/ppc65le
  • linux/s390x
  • windows/amd64
  • darwin/amd64

In order to download a binary file:

  • Go to the release you are interested for https://github.com/thepetk/alizer/releases/tag/<release-tag>
  • In the Assets section you will see the list of generated binaries for the release.

Feedback & Questions

If you discover an issue please file a bug and we will fix it as soon as possible.

About

Application analyzer toolkit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 38.2%
  • PHP 15.3%
  • HTML 14.6%
  • Java 7.5%
  • TypeScript 6.6%
  • C# 5.0%
  • Other 12.8%