Skip to main content

Lint AOSP

Project description

lintaosp

Actions Status Docker License PyPI Tag

Introduction

lintaosp is a lint worker of lintflow on AOSP written in Python.

Prerequisites

  • Android lint >= 4.1.0
  • gRPC >= 1.36.0
  • Python >= 3.7.0

Run

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

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

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

Docker

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

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

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

Usage

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

Lint AOSP

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

lintaosp parameters can be set in the directory config.

An example of configuration in config.yml:

apiVersion: v1
kind: worker
metadata:
  name: lintaosp
spec:
  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
{
  "lintaosp": [
    {
      "file": "name",
      "line": 1,
      "type": "Error",
      "details": "text"
    }
  ]
}
  • Text format
lintaosp:{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

lintaosp-1.2.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

lintaosp-1.2.3-py2.py3-none-any.whl (19.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file lintaosp-1.2.3.tar.gz.

File metadata

  • Download URL: lintaosp-1.2.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9

File hashes

Hashes for lintaosp-1.2.3.tar.gz
Algorithm Hash digest
SHA256 29b30772f498ee059f4c6cf10b059138652a9a3e2af2b210a59fd3d3a3877330
MD5 e874c1940210374c2f1315b4b7242bc3
BLAKE2b-256 82a277dce5e8cd83fee8a8895907d24bd2e8996a581f175167bedaef5a59b6ab

See more details on using hashes here.

File details

Details for the file lintaosp-1.2.3-py2.py3-none-any.whl.

File metadata

  • Download URL: lintaosp-1.2.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9

File hashes

Hashes for lintaosp-1.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fa7ff3455f7f9cc37a8ba6e47170c8cad184e9861b35574d6c05b00eda4901b2
MD5 8acb22ea1eb7ed4a9df9bc70f3ef9b8a
BLAKE2b-256 603220d9decab8483726650d8a0d26fd54c94a8a1cd5d7cc49b3381cf888a9e5

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