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

Updating SA1636 header rules #36

Merged
merged 4 commits into from
Oct 4, 2020
Merged

Updating SA1636 header rules #36

merged 4 commits into from
Oct 4, 2020

Conversation

muiriswoulfe
Copy link
Contributor

I've created this PR to update the default setting for checking the copyright header to warning, in order to bring it in line with the StyleCop defaults. The line is still commented out, but this change means the only modification required from the user is to uncomment the line -- they no longer need to uncomment and upgrade the severity.

I've also taken this opportunity to update the copyright message to the StyleCop default. I believe this header is preferable as it uses a more standard format (based on having checked many GitHub projects), and it aligns with StyleCop, which I believe is the goal of this .editorconfig project.

I've furthermore:

  • Removed en-us from the explanatory URL, to allow it to default to the user's settings as for the other URLs in the comments.
  • Update the minor version.
  • Updated the revision date.

I'm happy to revert any of the changes you disagree with. Just let me know.

@RehanSaeed RehanSaeed requested a review from henrygab September 23, 2020 10:39
@RehanSaeed
Copy link
Owner

Thanks for provoking this conversation.

If you set it to a warning, you'll need a stylecop.json file to set the header. The duplication seems unnecessary, so I set it to none. Am I missing something?

If we no longer care about the StyleCop warning and stick with the new .editorconfig way, then we also no longer care about the defaults that StyleCop imposes, except if the wording itself is better.

From my conversations over Twitter/GitHub I think the Microsoft tooling team is trying to make .editorconfig the one stop shop for everything code style. There is a growing level of overlap and eventually, it may make sense to drop StyleCop altogether. For now though, this project tries to keep the two in sync. However, where there is overlap as in this case, I think it makes sense to prefer .editorconfig since there are analyzers and code fixes coming from Microsoft very soon that are built into the tooling.

Happy with the removal of en-us though.

@muiriswoulfe
Copy link
Contributor Author

Thanks for taking a look at the PR.

My understanding was that to use the header validation, you need to enable both of the commented-out lines -- i.e. the file_header_template as well as dotnet_diagnostic.SA1636.severity. Perhaps the comment could be clarified to indicate that this is the case?

Regarding the copyright text itself, since we're no longer beholden to the StyleCop standards, may I suggest:

© PROJECT-AUTHOR

Many projects no longer seem to include "All rights reserved" as OSS licenses such as MIT waive rights, and the phrase no longer has any meaning in any jurisdiction. In addition, it seems that when you're using the official © symbol, the word "copyright" is no longer required. If you look at many corporate websites (including GitHub), you'll observe a copyright notice of this format and I believe this is sufficient for copyright enforcement as large companies would have legal teams ensuring adequate protection of their IP.

I'm only making suggestions here and I'm more than happy to go in whatever direction you like, as it is your project. If you wish, I'll just remove the en-us from the URL and leave everything else intact.

@RehanSaeed
Copy link
Owner

I'm all for clearer comments. The current text says:

# File Header (Uncomment to support file headers)

@henrygab knows more about legal stuff, so I defer to him on that side but what you're saying does make a lot of sense to me.

@henrygab
Copy link
Collaborator

@RehanSaeed -- I cannot provide legal advice. To avoid any doubt, I will defer and not provide review here.

Copy link
Collaborator

@henrygab henrygab left a comment

Choose a reason for hiding this comment

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

No review, but marking approved to avoid it showing as needing my review.

@RehanSaeed
Copy link
Owner

These new changes seem ok. Not sure about the removal of the word 'Copyright' give we have the symbol. You mention GitHub, do you have a link for that?

@muiriswoulfe
Copy link
Contributor Author

You mention GitHub, do you have a link for that?

If you go to the bottom of every webpage on GitHub, you'll see "© 2020 GitHub, Inc."

My understanding -- but I admittedly make no claim to being a copyright lawyer -- is that copyright is included when using "(c)" as this has no defined meaning under copyright law. But "©" does, so the word "copyright" is redundant.

@RehanSaeed RehanSaeed merged commit 52a6961 into RehanSaeed:master Oct 4, 2020
@RehanSaeed
Copy link
Owner

I'm convinced by your argument. If someone disagrees, it's just a template and easy to change.

@RehanSaeed
Copy link
Owner

@muiriswoulfe Thanks for the update.

@RehanSaeed RehanSaeed added enhancement Issues describing an enhancement or pull requests adding an enhancement. minor Pull requests requiring a minor version update according to semantic versioning. patch Pull requests requiring a patch version update according to semantic versioning. and removed minor Pull requests requiring a minor version update according to semantic versioning. labels Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues describing an enhancement or pull requests adding an enhancement. patch Pull requests requiring a patch version update according to semantic versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants