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

Bump up year in headers #583

Closed
mkordas opened this issue Jan 1, 2016 · 22 comments
Closed

Bump up year in headers #583

mkordas opened this issue Jan 1, 2016 · 22 comments
Assignees
Labels

Comments

@mkordas
Copy link
Contributor

mkordas commented Jan 1, 2016

We have year 2016 already, so all occurrences of 2015 in licenses and headers should be bumped up.

Also all occurrences of 2014 should be reviewed. E.g. for entire year we had outdated license in checks.xml.

There should be test added to check whether copyright is 2011-current year. It should check at least .java, .xml, .vm, .groovy, .txt, .fml, .properties extensions.

@yegor256
Copy link
Owner

yegor256 commented Jan 2, 2016

@krzyk it looks like a minor/cosmetic issue, unless we create an automated check inside pom.xml, to verify the presence of 2013-2016 in all our files.

@krzyk
Copy link
Collaborator

krzyk commented Jan 2, 2016

@mkordas please update the description to add a test for such case. We should always check that copyright is in the range 2011-current year. This test should be applied to (at a minimum) .java, .xml, .vm, .groovy, .txt, .fml, .properties - we could add more text file types here.

Another problem is that the LICENSE.txt is updated, but checks.xml doesn't use that, but should, I'm not sure if checkstyle header check is smart enough to look for header deeper in the file.

@mkordas
Copy link
Contributor Author

mkordas commented Jan 2, 2016

@krzyk description updated. I don't think Checkstyle Header check is smart enough to check XML files. I think we need to make new check just for XMLs in Qulice. Would it be in scope of this issue?

@krzyk
Copy link
Collaborator

krzyk commented Jan 2, 2016

@mkordas no, I think that smart License check would be another task, that could be later on used in projects using qulice

@mkordas
Copy link
Contributor Author

mkordas commented Jan 2, 2016

@krzyk sure, I'll submit issue for that. Do you think we need just one custom smart license check for every type of file? Or maybe we should keep using Checkstyle for non-XML files and create our own XmlLicesneCheck?

@krzyk
Copy link
Collaborator

krzyk commented Jan 2, 2016

@mkordas We would need a check for files that don't allow header in the beginning (or are just not caught by checkstyle header check), so we have xml (including .fml), vm, and properties. So not only xml check. And I hope that groovy can be checked by standard checkstyle, if we update extensions.

@yegor256
Copy link
Owner

yegor256 commented Jan 3, 2016

@krzyk I think, just a grep is enough, see how I've done it in a JS project: yegor256/tacit@1618dbd

@krzyk
Copy link
Collaborator

krzyk commented Jan 3, 2016

@davvd valid bug

@davvd
Copy link

davvd commented Jan 4, 2016

@davvd valid bug

@krzyk tag "bug" added

@davvd
Copy link

davvd commented Jan 4, 2016

@mkordas thanks a lot for reporting, 15 mins added to your acc, pmt ID 568a700ec04ee048f60003c4

@krzyk
Copy link
Collaborator

krzyk commented Jan 17, 2016

@davvd assign @krzyk please

krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
krzyk added a commit to krzyk/qulice that referenced this issue Jan 17, 2016
@krzyk
Copy link
Collaborator

krzyk commented Jan 17, 2016

@davvd please see PR #624

@davvd
Copy link

davvd commented Jan 18, 2016

@davvd assign @krzyk please

@krzyk OK @krzyk please go ahead, this task is yours

@davvd
Copy link

davvd commented Jan 18, 2016

@davvd please see PR #624

@krzyk will check it soon, thanks

krzyk added a commit to krzyk/qulice that referenced this issue Jan 18, 2016
@krzyk
Copy link
Collaborator

krzyk commented Jan 18, 2016

@mkordas changes have been merged to master, please close this issue

@mkordas
Copy link
Contributor Author

mkordas commented Jan 18, 2016

@krzyk thank you

@mkordas mkordas closed this as completed Jan 18, 2016
@davvd
Copy link

davvd commented Jan 20, 2016

@krzyk I just added 1 hour to your account, many thanks for your contribution (75129265).. 23 hours and 39 mins spent here... the bonus for fast delivery (m=1419)... +60 to your rating, your total score is +3838

@vkuchyn
Copy link
Contributor

vkuchyn commented Feb 27, 2016

@krzyk I have similar task in rultor project. I tried your decision and have a question about years.sh
If to change year of LICENSE.txt to, for example, 2011-2015 and run ./years.sh - no reaction. Is it bug or feature?
There is --exclude ".*"that excludes all files in root folder. IF to remove it - we'll get violations in *.iml;*.ipr;*.iwsfiles and files I broke to test if it's work.
Can you explain please, what for is exclude ".*"?

@krzyk
Copy link
Collaborator

krzyk commented Feb 27, 2016

@vkuchyn this excludes only files that name starts with a dot . only.
When I change date in the LICENSE.txt I get violation in it.
Also I get violations for idea files without changing the years.sh (this is a feature, as we don't have those in rultor or in travis)

@vkuchyn
Copy link
Contributor

vkuchyn commented Feb 27, 2016

@krzyk problem is that I don't. Suppose because of different environments.
Need your consultation - what if change approach and to do this feature not with black-list as it was done (grep finds all files that doesn't contain valid years but we need to exclude not necessary files), but white-list.
Please, see my comment and say what you think.

@krzyk
Copy link
Collaborator

krzyk commented Feb 27, 2016

@vkuchyn white list is problematic, because it might cause that we miss some file extension.
If you grep doesn't handle exclude the way mine does, you could also use "double grep", so the first grep is withou the excludes, and the second one will do e.g. egrep -v "^\..*"

@vkuchyn
Copy link
Contributor

vkuchyn commented Feb 27, 2016

@krzyk take a look at comment - there is sample of grep code. Idea - chek only those files that has copyright pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants