Skip to content

Conversation

@nilsreichardt
Copy link
Contributor

@nilsreichardt nilsreichardt commented Oct 10, 2022

Description

I'm going to split #9702 into two PRs:

  1. adding the license header for all missing files (a big PR with many file changes)
  2. adding the GitHub Action check for the license header with instructions on adding the license with one command (see ci: add check for license header and add melos command to add & check license header #9704)

I used this command (in the next PR I'm going to add this as a melos command):

addlicense -f header_template.txt --ignore "**/*.yml" --ignore "**/*.yaml" --ignore "**/*.xml" --ignore "**/*.g.dart" --ignore "**/*.sh" --ignore "**/*.html" --ignore "**/*.js" --ignore "**/*.ts" --ignore "**/*.g.h" --ignore "**/*.g.m" --ignore "**/*.rb" --ignore "**/Runner/AppDelegate.swift" --ignore "**/Runner/MainFlutterWindow.swift" --ignore "**/Runner/Runner-Bridging-Header.h" --ignore "**/Runner/AppDelegate.h" --ignore "**/Runner/AppDelegate.m" --ignore "**/Runner/main.m" --ignore "**/MainActivity.kt" --ignore "**/MainActivity.java" --ignore "**/FlutterMultiDexApplication.java" --ignore **/GeneratedPluginRegistrant.swift .

with this in my header_template.txt

Copyright {{.Year}}, the Chromium project authors.  Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.

Related Issues

Part of #9702

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@nilsreichardt
Copy link
Contributor Author

I have added the missing headers with addlicense.

On which files do we want to add the license headers? I just used the default settings of addlicense but we could use the --ignore parameter.

…**/*.yaml" --ignore "**/*.xml" --ignore "**/*.g.dart" --ignore "**/*.sh" --ignore "**/*.html" --ignore "**/*.js" --ignore "**/*.ts" --ignore "**/*.g.h" --ignore "**/*.g.m" --ignore "**/*.rb" .`
…ignore "**/*.yaml" --ignore "**/*.xml" --ignore "**/*.g.dart" --ignore "**/*.sh" --ignore "**/*.html" --ignore "**/*.js" --ignore "**/*.ts" --ignore "**/*.g.h" --ignore "**/*.g.m" --ignore "**/*.rb" .`"

This reverts commit 886eec4.
…**/*.yaml" --ignore "**/*.xml" --ignore "**/*.g.dart" --ignore "**/*.sh" --ignore "**/*.html" --ignore "**/*.js" --ignore "**/*.ts" --ignore "**/*.g.h" --ignore "**/*.g.m" --ignore "**/*.rb" --ignore "**/Runner/AppDelegate.swift" --ignore "**/Runner/MainFlutterWindow.swift" --ignore "**/Runner/Runner-Bridging-Header.h" --ignore "**/Runner/AppDelegate.h" --ignore "**/Runner/AppDelegate.m" --ignore "**/Runner/main.m" --ignore "**/MainActivity.kt" --ignore "**/MainActivity.java" --ignore "**/FlutterMultiDexApplication.java" --ignore **/GeneratedPluginRegistrant.swift .`
@nilsreichardt
Copy link
Contributor Author

On which files do we want to add the license headers? I just used the default settings of addlicense but we could use the --ignore parameter.

Discussed in Slack: We are going to use these ignore flags: --ignore "**/*.yml" --ignore "**/*.yaml" --ignore "**/*.xml" --ignore "**/*.g.dart" --ignore "**/*.sh" --ignore "**/*.html" --ignore "**/*.js" --ignore "**/*.ts" --ignore "**/*.g.h" --ignore "**/*.g.m" --ignore "**/*.rb" --ignore "**/Runner/AppDelegate.swift" --ignore "**/Runner/MainFlutterWindow.swift" --ignore "**/Runner/Runner-Bridging-Header.h" --ignore "**/Runner/AppDelegate.h" --ignore "**/Runner/AppDelegate.m" --ignore "**/Runner/main.m" --ignore "**/MainActivity.kt" --ignore "**/MainActivity.java" --ignore "**/FlutterMultiDexApplication.java" --ignore **/GeneratedPluginRegistrant.swift

@nilsreichardt
Copy link
Contributor Author

This is the second part: #9704

@Salakar Salakar changed the title refactor: add license header for missing files chore: add license header for missing files Oct 10, 2022
Copy link
Contributor

@Lyokone Lyokone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there are some conflicts, if you can fix them, I'll try to get that merged quickly :)

@nilsreichardt
Copy link
Contributor Author

@Lyokone Thanks for the review :) I solved the conflicts 👍

@Lyokone Lyokone merged commit dea46c4 into firebase:master Oct 24, 2022
@firebase firebase locked and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants