mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-15 11:07:00 +02:00
* Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License. Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUS-1.1 * Fix test that expected exact offset on hcl file --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Sarah Thompson <sthompson@hashicorp.com> Co-authored-by: Brian Kassouf <bkassouf@hashicorp.com>
39 lines
1.5 KiB
Bash
Executable File
39 lines
1.5 KiB
Bash
Executable File
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
# This script is sourced into the shell running in a Github Actions workflow.
|
|
|
|
# Usage:
|
|
# To check deprecations locally using the script, follow these steps:
|
|
# From the repository root or within a package folder, execute deprecations-checker.sh
|
|
# Optionally: to only show deprecations in changed files between the current branch and
|
|
# a specific branch, pass the other branch name as an argument to the script.
|
|
#
|
|
# For example:
|
|
# ./scripts/deprecations-checker.sh (or) make deprecations
|
|
# ./scripts/deprecations-checker.sh main (or) make ci-deprecations
|
|
#
|
|
# If no branch name is specified, the command will show all usage of deprecations in the code.
|
|
#
|
|
# GitHub Actions runs this against the PR's base ref branch.
|
|
|
|
# Staticcheck uses static analysis to finds bugs and performance issues, offers simplifications,
|
|
# and enforces style rules.
|
|
# Here, it is used to check if a deprecated function, variable, constant or field is used.
|
|
|
|
# Run staticcheck
|
|
set -e
|
|
echo "Performing deprecations check: running staticcheck"
|
|
|
|
|
|
# If no compare branch name is specified, output all deprecations
|
|
# Else only output the deprecations from the changes added
|
|
if [ -z $1 ]
|
|
then
|
|
staticcheck -checks="SA1019" -tags="$BUILD_TAGS"
|
|
else
|
|
# GitHub Actions will use this to find only changes wrt PR's base ref branch
|
|
# revgrep CLI tool will return an exit status of 1 if any issues match, else it will return 0
|
|
staticcheck -checks="SA1019" -tags="$BUILD_TAGS" 2>&1 | revgrep origin/"$1"
|
|
fi
|