Skip to main content

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

Metadata

Release files for lintaosp 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lintaosp 1.2.4
File Size Uploaded Provenance Actions
lintaosp-1.2.4.tar.gz 15.8 kB Without provenance Details for lintaosp-1.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lintaosp 1.2.4
File Interpreter ABI Platform Actions
lintaosp-1.2.4-py2.py3-none-any.whl Python 2, Python 3 none any Details for lintaosp-1.2.4-py2.py3-none-any.whl

Total release size: 34.9 kB

Release files / lintaosp-1.2.4.tar.gz

Download URL lintaosp-1.2.4.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e2d1e5d15de991004048461ee4dd38329b47ff1526928b2a05eb015630b65258
BLAKE2b-256 checksum
How to use checksums
c8c15432f75fa01316e2d18377eeea4ca06803e746cd7704731273812d4cf018
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / lintaosp-1.2.4-py2.py3-none-any.whl

Download URL lintaosp-1.2.4-py2.py3-none-any.whl
Size 19.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1819f81192f029bdf6f0c97cab209907991c39b93a5ddd5d2875ed27ab5f6392
BLAKE2b-256 checksum
How to use checksums
0f3a13ec20a8790db663521aea028986ce4d74b2c915e6140157e500bcbe6ac5
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for lintaosp 1.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page