Git Product home page Git Product logo

elm-analyse's Introduction

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.

elm-analyse's People

Contributors

adeschamps avatar andys8 avatar antew avatar arowm avatar brandly avatar carlthuringer avatar eeue56 avatar felixlam avatar ferhtgoldaraz avatar gollerob avatar jinjor avatar methodgrab avatar pacbeckh avatar razzeee avatar ream88 avatar rlopzc avatar rofrol avatar stefanjanse avatar stil4m avatar turbomack avatar xtian avatar zwilias avatar

Watchers

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