diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 49c3ceb24..82ee2da1e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,3 +25,5 @@ jobs: run: bin/check/xmllint.sh - name: Run crates update run: bin/check/crates.sh + - name: Check ad hoc + run: bin/check/ad_hoc.sh diff --git a/bin/check/ad_hoc.sh b/bin/check/ad_hoc.sh new file mode 100755 index 000000000..eb5442f19 --- /dev/null +++ b/bin/check/ad_hoc.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eu + +# Check that Rust source files contains Orange Copyright +find packages -name "*.rs" | while read -r rust_file; do + if ! grep -q "Copyright (C) 2022 Orange" "$rust_file"; then + echo "Missing copyright in $rust_file" + exit 1 + fi +done + + diff --git a/packages/hurl/src/report/mod.rs b/packages/hurl/src/report/mod.rs index 534fb00a5..76e50e3ef 100644 --- a/packages/hurl/src/report/mod.rs +++ b/packages/hurl/src/report/mod.rs @@ -1,5 +1,6 @@ /* * Hurl (https://hurl.dev) + * Copyright (C) 2022 Orange * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/hurl/src/runner/error.rs b/packages/hurl/src/runner/error.rs index 6087a31fa..188720a17 100644 --- a/packages/hurl/src/runner/error.rs +++ b/packages/hurl/src/runner/error.rs @@ -1,3 +1,20 @@ +/* + * Hurl (https://hurl.dev) + * Copyright (C) 2022 Orange + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ use crate::http::HttpError; use crate::runner; use crate::runner::RunnerError; diff --git a/packages/hurl/src/runner/filter.rs b/packages/hurl/src/runner/filter.rs index 8cc7b42c6..5748c8af5 100644 --- a/packages/hurl/src/runner/filter.rs +++ b/packages/hurl/src/runner/filter.rs @@ -1,3 +1,20 @@ +/* + * Hurl (https://hurl.dev) + * Copyright (C) 2022 Orange + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ use crate::runner::template::eval_template; use crate::runner::{Error, RunnerError, Value}; use hurl_core::ast::{Filter, FilterValue, RegexValue, SourceInfo}; diff --git a/packages/hurl_core/src/parser/filter.rs b/packages/hurl_core/src/parser/filter.rs index 05cdd3386..05dfd3a75 100644 --- a/packages/hurl_core/src/parser/filter.rs +++ b/packages/hurl_core/src/parser/filter.rs @@ -1,3 +1,20 @@ +/* + * Hurl (https://hurl.dev) + * Copyright (C) 2022 Orange + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ use crate::ast::{Filter, FilterValue, SourceInfo}; use crate::parser::combinators::choice; use crate::parser::primitives::{one_or_more_spaces, try_literal};