Skip to content

Commit

Permalink
Merge pull request #526 from aboutcode-org/512-515-reformat-reorganiz…
Browse files Browse the repository at this point in the history
…ation

512 515 reformat reorganization
  • Loading branch information
JonoYang authored Aug 13, 2024
2 parents 8956895 + a3eaf8b commit 790a9d5
Show file tree
Hide file tree
Showing 288 changed files with 22,579 additions and 22,036 deletions.
25 changes: 10 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,22 @@ envfile_testing: envfile
@echo SCANCODEIO_DB_USER=\"postgres\" >> ${ENV_FILE}
@echo SCANCODEIO_DB_PASSWORD=\"postgres\" >> ${ENV_FILE}

isort:
@echo "-> Apply isort changes to ensure proper imports ordering"
${VENV}/bin/isort .

black:
@echo "-> Apply black code formatter"
${VENV}/bin/black .

doc8:
@echo "-> Run doc8 validation"
@${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/

valid: isort black
valid:
@echo "-> Run Ruff format"
@${ACTIVATE} ruff format --exclude etc/scripts/ --exclude purldb-toolkit/ --exclude purl2vcs/
@echo "-> Run Ruff linter"
@${ACTIVATE} ruff check --fix --exclude etc/scripts/ --exclude purldb-toolkit/ --exclude purl2vcs/

check:
@echo "-> Run pycodestyle (PEP8) validation"
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=venv,lib,thirdparty,docs,migrations,settings.py .
@echo "-> Run isort imports ordering validation"
@${ACTIVATE} isort --check-only .
@echo "-> Run black validation"
@${ACTIVATE} black --check ${BLACK_ARGS}
@echo "-> Run Ruff linter validation (pycodestyle, bandit, isort, and more)"
@${ACTIVATE} ruff check --exclude etc/scripts/ --exclude purldb-toolkit/ --exclude purl2vcs/
@echo "-> Run Ruff format validation"
@${ACTIVATE} ruff format --check --exclude etc/scripts/ --exclude purldb-toolkit/ --exclude purl2vcs/
@$(MAKE) doc8

clean:
@echo "-> Clean the Python env"
Expand Down
8 changes: 8 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,11 @@ jobs:
python_versions: ['3.10']
test_suites:
all: make check_docs

- template: etc/ci/azure-posix.yml
parameters:
job_name: ci_code_style
image_name: ubuntu-22.04
python_versions: ['3.10']
test_suites:
all: make check
Loading

0 comments on commit 790a9d5

Please sign in to comment.