Unverified Commit d7ffa893 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Clean up the pre-commit config (#2915)

Update the name of the `sdk-lints` check since it checks more than just
license headers now, and make it run at the end so that KTLint runs and
fixes files even if there's an invalid changelog entry.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent ccb7b080
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -6,19 +6,6 @@ repos:
  - id: end-of-file-fixer
    exclude: ^aws/rust-runtime/aws-sigv4/aws-sig-v4-test-suite/
  - id: trailing-whitespace
- repo: local
  hooks:
  - id: kotlin-block-quotes
    name: Kotlin Block Quotes
    entry: ./.pre-commit-hooks/kotlin-block-quotes.py
    language: python
    files: ^.*\.kt$
  - id: license-header-check
    name: License Header Check
    entry: ./.pre-commit-hooks/license-header.sh
    language: system
    files: ^.*$
    pass_filenames: false
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
  rev: v2.10.0
  hooks:
@@ -29,3 +16,16 @@ repos:
  - id: pretty-format-rust
    entry: rustfmt --edition 2021
    files: ^.*\.rs$
- repo: local
  hooks:
  - id: kotlin-block-quotes
    name: Kotlin Block Quotes
    entry: ./.pre-commit-hooks/kotlin-block-quotes.py
    language: python
    files: ^.*\.kt$
  - id: sdk-lints-check
    name: sdk-lints
    entry: ./.pre-commit-hooks/sdk-lints.sh
    language: system
    files: ^.*$
    pass_filenames: false
+1 −2
Original line number Diff line number Diff line
#!/bin/bash
set -e

#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#

set -e
cd "$(git rev-parse --show-toplevel)/tools/ci-build/sdk-lints" && cargo run -- check --license --changelog