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

Improve maintainability of source code files #747

Open
1 of 3 tasks
bmuenzenmeyer opened this issue Jan 31, 2023 · 5 comments
Open
1 of 3 tasks

Improve maintainability of source code files #747

bmuenzenmeyer opened this issue Jan 31, 2023 · 5 comments
Labels
enhancement Indicates an improvement to a feature

Comments

@bmuenzenmeyer
Copy link

bmuenzenmeyer commented Jan 31, 2023

Description

Clean up source code files throughout Vela to make them more maintainable.

Value

Reduce future notification noise and maintenance cost

Definition of Done

I don't know the product very intimately, but I guessed at a scope:

Citing PRs like this one: https://github.com/go-vela/types-private/pull/4/files/26402fd670272d401ea48e912e2bd234cf8de034

  • Team to decide on course of action. I worked with Legal to clarify:

  • Including a copyright notice with file each is not required

  • The year in the notice specifies the year of first publication. So there is no need to go back and update the year in existing files.

    • ✅ For example, for a project that began in 2022, this suffices: © 2022 Target Brands, Inc.
    • ❌ No need to update this each year:
      - © 2022 Target Brands, Inc.
      + © 2023 Target Brands, Inc.
    • ❌ No need to specify a range: © 2022 - present Target Brands, Inc.
  • Do not specify Copyright (c), this is redundant.

  • Once an option is chosen (remove completely, update each file to state the year created only), change all files.

  • Address any linting or automation checking for current year.

Effort (Optional)

Impacted Personas (Optional)

@bmuenzenmeyer bmuenzenmeyer added the enhancement Indicates an improvement to a feature label Jan 31, 2023
@wass3r
Copy link
Collaborator

wass3r commented Feb 22, 2023

we'll go with the option to remove the copyright piece from the source files. i'll open an example PR to a repo of what the change will look like for the other repos.

@bmuenzenmeyer
Copy link
Author

I wonder if it could be automated

@wass3r
Copy link
Collaborator

wass3r commented Feb 23, 2023

oh yes. it will be. i just want to make sure i understand what the change will look like.

in fact. i'm wondering about replacing our standard three-liner in our code files:

// Copyright (c) 2022 Target Brands, Inc. All rights reserved.
//
// Use of this source code is governed by the LICENSE file in this repository.

with a SPDX identifier, such as:

// SPDX-License-Identifier: Apache-2.0

more info: https://spdx.dev/ids/#why

In our README's in the repos, also looking to reduce:

## Copyright and License

Copyright (c) 2022 Target Brands, Inc.

[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

to just:

## License

[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

do you have any thoughts on those tweaks?

@bmuenzenmeyer
Copy link
Author

The README I am less sure of (and since there is only one it doesn't matter as much to me), but I like the file name change

@wass3r
Copy link
Collaborator

wass3r commented Mar 17, 2023

Here's an example of the changes I was thinking to make: go-vela/vela-email#41.

couple of callouts:

  1. https://github.com/go-vela/vela-email/pull/41/files#diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7R189 follows guidance here more closely: https://www.apache.org/licenses/LICENSE-2.0.html#apply. one contention might be the year i picked. was hoping to keep this the same across all repos, but it may differ per repo, depending on what it needs to be.
  2. curious on thoughts for https://github.com/go-vela/vela-email/pull/41/files#diff-70d86781add4b013df40d3433bf0ed8033639b5e05fcc2c43d23afe0085d4892R37. took some liberties here maybe, but saw another module do this.

the remainder of the changes are pretty uncontroversial, i think.

This was referenced Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates an improvement to a feature
Projects
None yet
Development

No branches or pull requests

2 participants