Unverified Commit c22ec581 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

Add license header checker & missing headers (#917)



* Add license header checker & missing headers

Adds a license check pre-commit hook + adds license checking to CI

* Update tools/sdk-lints/src/copyright.rs

Co-authored-by: default avatarJohn DiSanti <jdisanti@amazon.com>

Co-authored-by: default avatarJohn DiSanti <jdisanti@amazon.com>
parent b1835a14
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -12,6 +12,12 @@ repos:
    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: v1.6.1
  hooks:
+4 −0
Original line number Diff line number Diff line
#!/usr/bin/env python

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

#
# Script for pre-commit that fixes Kotlin block quote indentation
# for Smithy codegen, where the actual whitespace in the block quotes
+9 −0
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.
#

cd "$(git rev-parse --show-toplevel)/tools/sdk-lints" && cargo run -- check --license
+5 −0
Original line number Diff line number Diff line
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

package software.amazon.smithy.rustsdk

import software.amazon.smithy.rust.codegen.rustlang.Writable
+3 −2
Original line number Diff line number Diff line
#  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#  SPDX-License-Identifier: Apache-2.0.

"""
Generate a list of services which have non-trivial unit tests

@@ -8,8 +11,6 @@ This script generates output like `-p aws-sdk-s3 -p aws-sdk-dynamodb`. It is int
cargo test $(python test-services.py)
```
"""
#  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#  SPDX-License-Identifier: Apache-2.0.

import os
from pathlib import Path
Loading