Skip to content

Add-on that is focused on providing analysis based on the Language Server Protocol.

License

Notifications You must be signed in to change notification settings

fabianvf/analyzer-lsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analyzer Rule Engine

In this project, we are writing a rule engine that can use pluggable providers for rules to make a consistent way to execute rules for Konveyor.

One of the primary drivers for this repository is adding providers for specific languages using the Language Server Protocol. Today these providers are in tree, but we will be moving them out in the future.

Quick Demo

If you would like to run a quick demo we have a Dockerfile that has all the dependencies.

To run this demo build the container:

$ podman build -f Dockerfile -t test-analyzer-engine

This will build the engine, and include the current set of rules and examples in the container to be used.

To run the rules (rule-example.yaml) against the examples:

$ podman run test-analyzer-engine

Running from source code

To run the engine from source code, you need to:

  • Configure providers. By default, providers are configured in provider_settings.json. See Providers for instructions on configuring providers.
  • Configure rules. By default, rules are present in rules_example.yaml. See Rules for details on rule format.

Once the providers are configured, you can run:

go run main.go

CLI Options:

  • --provider-settings: Path to provider settings file
  • --rules: Path to rules file
  • --output: Path to output file
  • --error-on-violation: Exit with error when violations are found, also print violations to console
  • --verbose=<level>: Level for logging

Code Base Starting Point

Using the LSP/Protocal from ACME https://github.com/fhs/acme-lsp and stripping out anything related to serving, proxy or anything. Just keeping the types for communication

Using JSONRPC2 from google.org/x/tools/internal. Copied and removed anything to do with serving.

Code of Conduct

Refer to Konveyor's Code of Conduct page

About

Add-on that is focused on providing analysis based on the Language Server Protocol.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.6%
  • Dockerfile 1.2%
  • Makefile 0.2%