elm-analyse

A tool that allows you to analyse your Elm code, identify deficiencies and apply best practices.

Github星跟踪图

Elm Analyse

A tool that allows you to analyse your Elm code, identify deficiencies and apply best practices.

Preview


Usage

Prerequisites

The following binaries should be available on the path:

node >=8
elm  0.19.x
elm-format (a version that is compatible with the source code you wish to analyse)

Install

npm install -g elm-analyse

or if using yarn:

yarn global add elm-analyse

Run

Change to the directory of Elm project you want to analyse and run elm-analyse.

Add the -s option for server mode. This will allow you to view results in your browser. To change the port use -p XXXX

CLI Options, Option, Description, ------, -----------, --help or -h, Print the help output., --serve or -s, Enable server mode. Disabled by default., --port or -p, The port on which the server should listen. Defaults to 3000 (--port=3000)., --open or -o, Open default browser when server goes live., --elm-format-path, Path to elm-format. Defaults to elm-format., --version or -v, Print version of software., --format, Output format for CLI. Defaults to "human". Valid values are either "human" or "json"., ---

Supported Checks

All supported checks can be found in the check documentation.


Analysis Configuration

Checks can be enable or configured based on your preferences. For this see the Configuration Docs.


Issues

If you have feature ideas or checks that you wish to see, please create an issue.
Please check that you do not create duplicate issues or a check for which we already have a report.

Contributing

Please see the docs

Library Setup

The library is divided into the following main modules:

  • Analyser: The main file that bootstraps the analysis and maintains the core state.
  • ASTUtil.*: Utility functions for fact extraction on the AST.
  • Analyser.Checks.*: All the checks that are performed.
  • Analyser.Fixes.*: All the fixes that can be performed.
  • Analyser.Messages.*: All messages that can be produced and the supporting functions.
  • Client.*: Front-end code for running in 'server' mode.

The code that represents the Elm syntax and the parsing is supported by the elm-syntax package.

主要指标

概览
名称与所有者stil4m/elm-analyse
主编程语言Elm
编程语言JavaScript (语言数: 6)
平台
许可证MIT License
所有者活动
创建于2017-01-21 11:37:15
推送于2023-04-19 09:20:42
最后一次提交2020-05-12 20:56:56
发布数38
最新版本名称0.16.5 (发布于 )
第一版名称0.1.0 (发布于 )
用户参与
星数414
关注者数10
派生数56
提交数810
已启用问题?
问题数190
打开的问题数55
拉请求数50
打开的拉请求数20
关闭的拉请求数8
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?