Lint AOSP
Project description
lintaosp
Introduction
lintaosp is a lint worker of lintflow on AOSP written in Python.
Prerequisites
- Android lint >= 4.1
- Python >= 3.7
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:
aosp:
sdk:
- Correctness
- Correctness:Messages
- Security
- Compliance
- Performance
- Performance:Application Size
- Usability:Typography
- Usability:Icons
- Usability
- Productivity
- Accessibility
- Internationalization
- Internationalization:Bidirectional Text
Design
Errorformat
- Error type
E: Error
I: Information
W: Warning
- JSON format
{
"file": "name",
"line": 1,
"type": "Error",
"details": "text"
}
- Text format
{file}:{line}:{type}:{details}
License
Project License can be found here.
Reference
Project details
Release history Release notifications | RSS feed
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.0.1.tar.gz
(15.8 kB
view details)
Built Distribution
File details
Details for the file lintaosp-1.0.1.tar.gz
.
File metadata
- Download URL: lintaosp-1.0.1.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/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adad6ce98f1f546bf100065db17905b14bab5a2c178de75ede99e68ffc214ba5 |
|
MD5 | a9fec80c42cd97daf4d2bd1d2a9b4f30 |
|
BLAKE2b-256 | c16287f75b9e527a3e920f007592329962b29e7cfeb866ff2b4036ff7d1e3cfa |
File details
Details for the file lintaosp-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: lintaosp-1.0.1-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/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9eb8841b57388f78fca7abc974f7e6dc5d33f234e4b9f762fdc32524c5db4ee |
|
MD5 | 8be43239a44229612b86de3740fa07a3 |
|
BLAKE2b-256 | 446579b811edf334dc7c17c9ab68f4242a9681c8e8b9125941366f1b395c32c3 |