Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toml-sort linting tool for pyproject.toml #2311

Merged
merged 5 commits into from
Oct 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
minor changes
giampaolo committed Oct 3, 2023
commit 840981893c0b34c136a2f908f8339d20e4ee1fd4
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -212,18 +212,18 @@ _pylint: ## Python pylint (not mandatory, just run it from time to time)
lint-c: ## Run C linter.
@git ls-files '*.c' '*.h' | xargs $(PYTHON) scripts/internal/clinter.py

lint-toml: ## Linter for pyproject.toml
@git ls-files '*.toml' | xargs toml-sort --check

lint-rst: ## Run C linter.
@git ls-files '*.rst' | xargs rstcheck --config=pyproject.toml

lint-toml: ## Linter for pyproject.toml
@git ls-files '*.toml' | xargs toml-sort --check

lint-all: ## Run all linters
${MAKE} flake8
${MAKE} isort
${MAKE} lint-toml
${MAKE} lint-c
${MAKE} lint-rst
${MAKE} lint-toml

# ===================================================================
# Fixers
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ ignore_messages = [
[tool.tomlsort]
in_place = true
no_sort_tables = true
sort_inline_arrays = false
sort_inline_arrays = true
spaces_before_inline_comment = 2
spaces_indent_inline_array = 4
trailing_comma_inline_array = true