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 copyright lint to CI/CD pipeline #35

Open
Notgnoshi opened this issue Nov 19, 2023 · 0 comments · May be fixed by #43
Open

Add copyright lint to CI/CD pipeline #35

Notgnoshi opened this issue Nov 19, 2023 · 0 comments · May be fixed by #43
Labels
ci/cd Related to automated pipelines

Comments

@Notgnoshi
Copy link
Member

Maybe something like

shopt -s globstar
for source in ./src/**/*.rs; do
    echo "Checking $source for copyright statement"
    should_exit="false"
    if ! head "$source" | grep "// Copyright 2023 Raven Industries inc"; then
        echo "$source missing copyright statement"
        should_exit="true"
    fi
    if [[ "$should_exit" = "true" ]]; then
        echo "Missing copyright statement(s) ..."
        exit 1
    fi
done

but done in a way that contributors can run on their own systems? Maybe a tool to insert them if they're missing?

See 4045ceb for why there's a copyright statement.

@Notgnoshi Notgnoshi added the ci/cd Related to automated pipelines label Nov 19, 2023
Notgnoshi added a commit that referenced this issue Jan 27, 2024
@Notgnoshi Notgnoshi linked a pull request Jan 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Related to automated pipelines
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant