[Mesa-dev] [RFC] docs: Add a copyright.c template we can copy when making new files.
Nanley Chery
nanleychery at gmail.com
Fri Oct 19 18:48:05 UTC 2018
On Fri, Oct 19, 2018 at 10:51:36AM -0700, Kenneth Graunke wrote:
> Usually when making a new file, people copy some random other file
> to get the copyright header comments. Unfortunately, some of them
> are commented in a decades-old style, are word wrapped poorly, or
> worse, have a few subtle variations in the text. While we've tried
> to clean those up, we're not going to get every copy to be perfect.
>
> Instead, this commit adds docs/copyright.c, which contains a copy of
> the license header which is well-formatted and has the correct text.
> The idea is that you can start from this when making a new file, which
> should help with consistency.
> ---
> docs/copyright.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
> create mode 100644 docs/copyright.c
>
> Hey all,
>
> I noticed when writing my new Iris driver that I had a couple subtle
> variations of copyright headers creep in, even in a brand new project.
> Mostly word wrapping differences. To combat that, I made a copyright.c
> and made sure to use it when I created new files. It seemed to help.
>
> So, the thinking is to just actually put that in the project under docs.
> Maybe it helps other people as well?
>
Should we let people know about this file by adding a note in
docs/devinfo.html?
To help people who don't always keep up w/ the documentation, I was
initially thinking we could add a git hook. I think that'd cause
problems when importing code from elsewhere, though.
> --Ken
>
> diff --git a/docs/copyright.c b/docs/copyright.c
> new file mode 100644
> index 00000000000..db92f27e641
> --- /dev/null
> +++ b/docs/copyright.c
> @@ -0,0 +1,22 @@
> +/*
> + * Copyright © 2018 <Insert Name Here>
^
<Insert Year Here> ?
-Nanley
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included
> + * in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + */
> +
> --
> 2.19.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list