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

fix(tools): ignore the .git folder when checking for copyright header #3937

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

syhol
Copy link
Contributor

@syhol syhol commented Dec 12, 2023

When running deno task ok recently I found that it failed the fmt:licence-headers section because a recent new branch has been created https://github.com/denoland/deno_std/tree/remove-types.d.ts and the check mistakes the remote ref file as a typescript file.

deno task ok
Task ok deno task lint && deno fmt --check && deno task test:browser && deno task test
Task lint deno lint && deno task fmt:licence-headers --check && deno task lint:deprecations && deno task lint:doc-imports && deno task lint:circular && deno task lint:tools-types
Checked 849 files
Task fmt:licence-headers deno run --allow-read --allow-write ./_tools/check_licence.ts "--check"
Missing copyright header: /Users/simon.holloway/Code/deno_std/.git/logs/refs/remotes/upstream/remove-types.d.ts
Missing copyright header: /Users/simon.holloway/Code/deno_std/.git/refs/remotes/upstream/remove-types.d.ts
Copyright header should be "// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license."

After adding .git to the list of folders excluded from this check, deno task ok now passes as expected:

deno task ok                         
Task ok deno task lint && deno fmt --check && deno task test:browser && deno task test
Task lint deno lint && deno task fmt:licence-headers --check && deno task lint:deprecations && deno task lint:doc-imports && deno task lint:circular && deno task lint:tools-types
Checked 849 files
Task fmt:licence-headers deno run --allow-read --allow-write ./_tools/check_licence.ts "--check"
Task lint:deprecations deno run --allow-read --allow-net --allow-env=HOME ./_tools/check_deprecation.ts
Task lint:doc-imports deno run --allow-env --allow-read ./_tools/check_doc_imports.ts
Checked 907 files
Task lint:circular deno run --allow-env --allow-read --allow-net=deno.land ./_tools/check_circular_submodule_dependencies.ts
...

@syhol syhol requested a review from kt3k as a code owner December 12, 2023 10:30
@CLAassistant
Copy link

CLAassistant commented Dec 12, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

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

Nice catch! Thank you.

@iuioiua iuioiua enabled auto-merge (squash) December 12, 2023 10:34
@iuioiua iuioiua merged commit 131cd85 into denoland:main Dec 12, 2023
7 checks passed
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 this pull request may close these issues.

None yet

3 participants