google / addlicense

A program which ensures source code files have copyright license headers by scanning directory patterns recursively
Apache License 2.0
716 stars 169 forks source link

add support for cmake files #90

Closed willnorris closed 2 years ago

willnorris commented 3 years ago

Add support for cmake files, adapted from #67

Slight refactoring in licenseHeader() and fileExtension() to make this and other future logic for determining license comment prefix a little cleaner.

Closes #67

codecov-commenter commented 3 years ago

Codecov Report

Merging #90 (9e09af5) into master (944049f) will increase coverage by 1.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
+ Coverage   47.56%   48.60%   +1.04%     
==========================================
  Files           2        2              
  Lines         246      251       +5     
==========================================
+ Hits          117      122       +5     
  Misses        122      122              
  Partials        7        7              
Impacted Files Coverage Δ
main.go 41.62% <100.00%> (+1.43%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 944049f...9e09af5. Read the comment docs.

willnorris commented 3 years ago

GitHub is having issues right now, so can't push new commits (https://www.githubstatus.com/)

willnorris commented 3 years ago

hmm, I was updating my suggested edit in https://github.com/google/addlicense/pull/67#issuecomment-895638200 in light of these edits, and I'm now thinking it might be clearer to combine these changes. I'll repurpose this PR to just include cmake support as well, since I think that will make some things clearer.

google-cla[bot] commented 3 years ago

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

willnorris commented 3 years ago

okay, take a look now. Sorry for the churn and complete repurposing of this PR 😄

Regarding CLA, co-author consent can be implied from #67.

srgbtl commented 3 years ago

@googlebot I consent.

srgbtl commented 3 years ago

@willnorris any updates on this PR?

willnorris commented 3 years ago

rebased onto master. @mco-gh, you had a question about where we to the string lowercasing. See my comment from before and let me know what you think.

mco-gh commented 3 years ago

looks good, thanks

On Thu, 2 Sept 2021 at 21:08, Will Norris @.***> wrote:

rebased onto master. @mco-gh https://github.com/mco-gh, you had a question about where we to the string lowercasing. See my comment from before and let me know what you think.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/addlicense/pull/90#issuecomment-912017098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFAXF4YMIAHZ42LVCWNY5TT77KSBANCNFSM5B3BUHRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Marc Cohen Web: mco.dev Email: @.*** Working with me: mco.dev/working-with-marc Feedback: How am I doing? Provide anonymous feedback! https://www.increment.me/feedback/049628fd-7339-406d-9203-17d3ec8976bd/submit

Q: Why is this email three sentences or less? A: three.sentenc.es

willnorris commented 2 years ago

looks good, thanks

could you do a formal code review approval? That's required on the master branch.

mco-gh commented 2 years ago

looks like PR is closed

On Thu, 30 Sept 2021 at 20:39, Will Norris @.***> wrote:

looks good, thanks

could you do a formal code review approval? That's required on the master branch.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/addlicense/pull/90#issuecomment-931609581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFAXF2SPDYDUSB5JHUOO43UES4G3ANCNFSM5B3BUHRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Marc Cohen Web: mco.dev Email: @.*** Working with me: mco.dev/working-with-marc Feedback: How am I doing? Provide anonymous feedback! https://www.increment.me/feedback/049628fd-7339-406d-9203-17d3ec8976bd/submit

Q: Why is this email three sentences or less? A: three.sentenc.es

willnorris commented 2 years ago

67 is closed, but this one (#90) is still open. This supersedes #67, so @srgbtl just went ahead and closed the other one preemptively.

srgbtl commented 2 years ago

@willnorris any updates on this PR?