-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First pass at adding a pre-commit hook to enforce formatting and linting standards. This adds the pre-commit command to run on a limited set of directories. Subsequent changes will remove excluded folders and run formatting on them as well. The command will use the standard pre-commit hooks for yaml, whitespace, and end of line linting. It will also use `ruff` configured identically to the Python SDK repositories. The intention is to start enforcing formatting and linting standards on edited code. Running the pre-commit hook manually will make numerous changes that should be broken into multiple phases.
- Loading branch information
Showing
3 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
exclude: "\ | ||
^(\ | ||
.changes|\ | ||
.github|\ | ||
awscli/examples|\ | ||
awscli/topics|\ | ||
awscli/botocore|\ | ||
awscli/s3transfer|\ | ||
awscli/doc|\ | ||
exe/assets|\ | ||
tests/functional/cloudformation/deploy_templates/booleans/input.yml|\ | ||
tests/functional/cloudformation/deploy_templates/nested-tag/input.yml|\ | ||
tests/|\ | ||
CHANGELOG.rst|\ | ||
configure\ | ||
)" | ||
repos: | ||
- repo: 'https://github.com/pre-commit/pre-commit-hooks' | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.4.8 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters