-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
A check for author tag is implemented. Some tests for it are added. #52
Conversation
Great, thanks, please update the README.MD file with the priority of the check. |
@kaikreuzer , are you OK with this check failing the build or should I change its priority to "warning"? |
Failing the build is fine, thanks! |
73c7c1c
to
178812f
Compare
Done! :) |
178812f
to
fd661dc
Compare
So, I tried this check in the addons2 repository. And it turned out that more than 100 classes have no author tags. That means that when this PR is merged, the build will fail for every new PR. So I searched through all the bindings and I made a list of potentials authors. I think it would be nice to make an issue here. If the authors add their tags before merging this PR, the build will be successful. @kaikreuzer, @svilenvul , what do you think? |
I fear that it will take forever to ask the individual authors to add that. |
I can add all the files-with-no-author tag in the suppressions.xml file. But I am not sure that would be a better decision. Besides, there are several things to consider :
|
I just quickly scanned through this bundle and only saw a single class where the tag was missing. Do you have details?
There might be SOME exceptions, like e.g. generated code (e.g. JAXB beans) or third-party code that has been included in the repo - both are valid exceptions to the rule, so for those cases it would be nice if there is a chance to configure the bundle in a way that this check is suppressed. |
@kaikreuzer we can of course track back the authors by doing some git blames, or is that not sufficient. |
@martinvw That won't help for the two exceptional cases that I mentioned (generated & 3rd party code). |
@kaikreuzer , you are right, 70 of the files with no author tag in org.openhab.ui.cometvisu are generated by the JavaTM Architecture. I will think about how we can handle those exceptions of the rule. |
In most projects I worked on professionally we put the generated code in the target directory and let maven generate it on each build, we could try whether that is a possible option here too. It would solve this problem and make sure the generated code is not accidentally altered @kaikreuzer what would you think about this? |
I think for now we can just add them to the suppression filter. (since most of the files are in a single bundle). |
I only do this for code that we do not compile against ourselves - the rest is checked in, because otherwise you will have hundreds of compilation errors after doing the IDE setup. |
Maybe that is more something to debate over beer, but I would not consider it beauty that you lose track of the difference between generated code and potentially customized (generated) code :-) |
Yes, I go for the beer 🍻 |
I am sure that all of us would like to see this check merged :-), so I will start resolving some of the errors. I still have some questions :
|
I think that that is great solution |
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
Some tests for it are added. Added filter for auto generated classes. Also-by: Svilen Valkanov <[email protected]> Signed-off-by: Mihaela Memova <[email protected]>
fd661dc
to
f88075c
Compare
Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
The cleanup is done :). Are we ready to merge this check as well ? |
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
…ab#2364) Includes: - auto generated classes moved to src/gen/java; - added author tag to PHPProvider; See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
See openhab/static-code-analysis#52 Signed-off-by: Svilen Valkanov <[email protected]>
Signed-off-by: Mihaela Memova [email protected]