Skip to content

Commit

Permalink
Merge pull request #1526 from ChinYing-Li/bug_1648118
Browse files Browse the repository at this point in the history
Bug 1648118: Change the `fmt-` and `lint-` make commands for consistency
  • Loading branch information
badboy authored Mar 2, 2021
2 parents 0a59c72 + 7326db4 commit 2c9212b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ jobs:
steps:
- checkout
- run: sudo pip install yamllint
- run: make yamllint
- run: make lint-yaml

###########################################################################
# Rust / C / FFI
Expand Down Expand Up @@ -725,7 +725,7 @@ jobs:
- checkout
- run:
name: Python lints
command: make pythonlint
command: make lint-python

Python 3_6 tests:
docker:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Introduce a new API `Ping#test_before_next_submit` to run a callback right before a custom ping is submitted ([#1507](https://github.com/mozilla/glean/pull/1507)).
* The new API exists for all language bindings (Kotlin, Swift, Rust, Python).
* Updated `glean_parser` version to 2.5.0
* Change the `fmt-` and `lint-` make commands for consistency ([#1526](https://github.com/mozilla/glean/pull/1526))
* Python
* Update minimal required version of `cffi` dependency to 1.13.0 ([#1520](https://github.com/mozilla/glean/pull/1520)).
* RLB
Expand Down
22 changes: 9 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,42 +92,38 @@ bench-rust: ## Run Rust benchmarks

# Linting

lint: clippy

clippy: ## Run cargo-clippy to lint Rust code
lint-rust: ## Run cargo-clippy to lint Rust code
cargo clippy --all --all-targets --all-features -- -D warnings

ktlint: ## Run ktlint to lint Kotlin code
lint-kotlin: ## Run ktlint to lint Kotlin code
./gradlew ktlint detekt

swiftlint: ## Run swiftlint to lint Swift code
lint-swift: ## Run swiftlint to lint Swift code
swiftlint --strict

yamllint: ## Run yamllint to lint YAML files
lint-yaml: ## Run yamllint to lint YAML files
yamllint glean-core .circleci

shellcheck: ## Run shellcheck against important shell scripts
shellcheck glean-core/ios/sdk_generator.sh
shellcheck bin/check-artifact.sh

pythonlint: python-setup ## Run flake8 and black to lint Python code
lint-python: python-setup ## Run flake8 and black to lint Python code
$(GLEAN_PYENV)/bin/python3 -m flake8 glean-core/python/glean glean-core/python/tests
$(GLEAN_PYENV)/bin/python3 -m black --check --exclude \(.venv\*\)\|\(.eggs\) glean-core/python
$(GLEAN_PYENV)/bin/python3 -m mypy glean-core/python/glean

.PHONY: lint clippy ktlint swiftlint yamllint
.PHONY: lint-rust lint-kotlin lint-swift lint-yaml

# Formatting

fmt: rustfmt

rustfmt: ## Format all Rust code
fmt-rust: ## Format all Rust code
cargo fmt --all

pythonfmt: python-setup ## Run black to format Python code
fmt-python: python-setup ## Run black to format Python code
$(GLEAN_PYENV)/bin/python3 -m black glean-core/python/glean glean-core/python/tests

.PHONY: fmt rustfmt
.PHONY: fmt-rust fmt-python

# Docs

Expand Down

0 comments on commit 2c9212b

Please sign in to comment.