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 custom file headers to the yaml configuration #618

Closed
sruehl opened this issue May 8, 2023 · 3 comments · Fixed by #620
Closed

Add custom file headers to the yaml configuration #618

sruehl opened this issue May 8, 2023 · 3 comments · Fixed by #620

Comments

@sruehl
Copy link

sruehl commented May 8, 2023

PLEASE READ

Description

Add a feature which adds a custom file header (e.g. Licence header)

Expected Behavior

Add a ASL2 header via the yaml configuration

Actual Behavior

Files are generate without a header

@sruehl
Copy link
Author

sruehl commented May 8, 2023

I wonder if that can be done with that

@sruehl
Copy link
Author

sruehl commented May 8, 2023

Yes it can be done like this in the yaml:
boilerplate-file: .mockery.asl.header
Just put the header there like this for example

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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
 *
 *   https://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.
 */

@sruehl sruehl closed this as completed May 8, 2023
@LandonTClipp
Copy link
Contributor

I see this is missing from the docs, I'll add.

LandonTClipp added a commit that referenced this issue May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants