-
Notifications
You must be signed in to change notification settings - Fork 160
"Copyright is missing or has wrong format" warning on custom modules #275
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
Comments
Hi @hostep. Thank you for your report. Please, add a comment to assign the issue:
|
Maybe the copyright check should only happen on files that use |
@hostep thank you for the report. You could also exclude this specific sniff through the command line using the @fascinosum do you think we should restrict this sniff to files in the |
I've thought about that namespace a bit more, but that only applies to PHP files, while the copyright is also required in other files like xml files, so that would be tricky to get right probably. I'm aware of the exclude flag and I was using it to filter that warning out, but thanks for putting it out here in case other people run into the same problem! 🙂 |
@sivaschenko: that would probably be the best solution! Other good candidates that could be added to the Adobe ruleset are:
Which are all new warnings I saw after upgrading from v6 to v10 and Adobe shouldn't try to push for us to add phpdocs to every single little thing where it's really not worth to add docs. |
@svera I agree with @sivaschenko, we should have a separate more advanced ruleset for Adobe repositories and a general basic ruleset |
@svera: this seems to be fixed in v11 of this module. Should we close this issue or is there anything else you want to do in scope of this issue? |
It looks like these sniffs were disabled in f8cab4a, but I can't tell if that was intended to be temporary or not. (If it was intended to be permanent, removing the sniffs would have been a better choice.) There's mention of |
@fredden @hostep @ihor-sviziev we are planning to introduce several rulesets to the magento-conding-standard:
Copyright test is going to be included in the first ruleset only. |
@sivaschenko TBH, I think 2nd, and 3rd options might be merged into one. But I don't mind against it |
@hostep @fredden @ihor-sviziev A separate standard has been introduced for framework-specific checks and Copyright sniffs have been moved to this standard in #313 |
@sivaschenko Great! Thx for the update. Waiting for the release |
@ihor-sviziev new version is avaiable https://github.com/magento/magento-coding-standard/releases/tag/v14 |
@hostep, could you confirm that issue is fixed in version 14? |
@ihor-sviziev: as mentioned above, this was already fixed in v11 of this module (just re-tested this right now to be sure, and it's fixed in versions 11, 12, 13 and 14) So, should we close this issue, or is something still not finished yet? |
I do still believe some other checks shouldn't be included in the |
@hostep thank you for confirmation! |
@hostep, as to me - it's a good idea. Could you create a separate issue for that with a list of suggestions? |
There's an existing list here: #275 (comment) |
@hostep @fredden @ihor-sviziev it is our recommendation to use the annotation sniffs for extensions and customizations, so they will be kept in the Magento2 coding standard for now. I do understand that each project is unique and can have a specific preference for the code style. There is an ability to adjust the ruleset provided by magento-coding-standard for your project needs, utilising the rules that are important for you and excluding the rules that are less important. A custom ruleset extending the ruleset from Magento2 standard can be created for this purpose. Example:
|
Preconditions
Hi folks, I recently tried upgrading the coding standards library in my custom module from version 6 to version 10 and it suddenly starts complaining about missing copyright headers in files in my module?
This is something I should decide, not something you should decide right?
This coding standards library is still meant for 3rd party modules as well, right? Not only for checking core Magento files?
Steps to reproduce
etc/di.xml
in that module that contains no copyright headerExpected result
Actual result
The text was updated successfully, but these errors were encountered: