Skip to main content

Lint Work

Project description

lintwork

Actions Status Docker License PyPI Tag

Introduction

lintwork is a lint worker of lintflow written in Python.

Prerequisites

  • gRPC >= 1.36.0
  • Python >= 3.7.0

Run

  • Local mode
git clone https://github.com/craftslab/lintwork.git

cd lintwork
pip install -Ur requirements.txt
python work.py --config-file="config.yml" --lint-project="project" --output-file="output.json"
  • Service mode
git clone https://github.com/craftslab/lintwork.git

cd lintwork
pip install -Ur requirements.txt
python work.py --config-file="config.yml" --listen-url="127.0.0.1:9090"

Docker

  • Local mode
git clone https://github.com/craftslab/lintwork.git

cd lintwork
docker build --no-cache -f Dockerfile -t craftslab/lintwork:latest .
docker run -it -v /tmp:/tmp craftslab/lintwork:latest ./lintwork--config-file="config.yml" --lint-project="/tmp/project" --output-file="/tmp/output.json"
  • Service mode
git clone https://github.com/craftslab/lintwork.git

cd lintwork
docker build --no-cache -f Dockerfile -t craftslab/lintwork:latest .
docker run -it -p 9090:9090 craftslab/lintwork:latest ./lintwork --config-file="config.yml" --listen-url="127.0.0.1:9090"

Usage

usage: work.py [-h] --config-file CONFIG_FILE
               [--lint-project LINT_PROJECT | --listen-url LISTEN_URL]
               [--output-file OUTPUT_FILE] [-v]

Lint Work

optional arguments:
  -h, --help            show this help message and exit
  --config-file CONFIG_FILE
                        config file (.yml)
  --lint-project LINT_PROJECT
                        lint project (/path/to/project)
  --listen-url LISTEN_URL
                        listen url (host:port)
  --output-file OUTPUT_FILE
                        output file (.json|.txt|.xlsx)
  -v, --version         show program's version number and exit

Settings

lintwork parameters can be set in the directory config.

An example of configuration in config.yml:

apiVersion: v1
kind: worker
metadata:
  name: lintwork
spec:
  aosp:
    sdk:
      - Correctness
      - Correctness:Messages
      - Security
      - Compliance
      - Performance
      - Performance:Application Size
      - Usability:Typography
      - Usability:Icons
      - Usability
      - Productivity
      - Accessibility
      - Internationalization
      - Internationalization:Bidirectional Text

Design

design

Errorformat

  • Error type
E: Error
I: Information
W: Warning
  • JSON format
{
  "lintwork": [
    {
      "file": "name",
      "line": 1,
      "type": "Error",
      "details": "text"
    }
  ]
}
  • Text format
lintwork:{file}:{line}:{type}:{details}

License

Project License can be found here.

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lintwork-1.2.7.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

lintwork-1.2.7-py2.py3-none-any.whl (19.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file lintwork-1.2.7.tar.gz.

File metadata

  • Download URL: lintwork-1.2.7.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9

File hashes

Hashes for lintwork-1.2.7.tar.gz
Algorithm Hash digest
SHA256 c034d9f7c0b4451b3c0f9a5b0ed737097b9795bb1151adb13d665d7b3c3fc92b
MD5 47271cf3e848180fba37ff90114c8435
BLAKE2b-256 875c20bc4625ef24e8973ae9998b3c1926d75112d0a680844007744e97a2ba3d

See more details on using hashes here.

File details

Details for the file lintwork-1.2.7-py2.py3-none-any.whl.

File metadata

  • Download URL: lintwork-1.2.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9

File hashes

Hashes for lintwork-1.2.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e832ba83c94abd252afb03fd6a2b197fdb3c1d8c42b4f64f2baa4b4abad9748d
MD5 148eeb79167d782ad1f4fb2ad0b1168d
BLAKE2b-256 0d1d7eb0e3c4fe5b24b6560118ddc84a4e5006dece4d61c9677f28d55cfcc588

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page