Community
Participate
Working Groups
At EclipseCon Embedded Summit we discussed formatting the entire code base to the Eclipse standard, with the exception of javadoc comments. As numerous Javadoc comments have a nice hand-crafted layout we don't want to lose (for example, see org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser.postfixExpression(CastExprCtx, ITemplateIdStrategy)) In addition we will continue to enforce the standards by turning on Format on Save and storing the formatting in the projects.
Announcement/request for feedback sent to cdt-dev: https://www.eclipse.org/lists/cdt-dev/msg33214.html Target date is week of 12 Nov.
Wishlist: - Remove trailing white space (Clean-up + save action).
(In reply to Marc-André Laperle from comment #2) > Wishlist: - Remove trailing white space (Clean-up + save action). +1
New Gerrit change created: https://git.eclipse.org/r/132779
New Gerrit change created: https://git.eclipse.org/r/132778
New Gerrit change created: https://git.eclipse.org/r/132777
New Gerrit change created: https://git.eclipse.org/r/132780
New Gerrit change created: https://git.eclipse.org/r/132781
New Gerrit change created: https://git.eclipse.org/r/132782
New Gerrit change created: https://git.eclipse.org/r/132795
New Gerrit change created: https://git.eclipse.org/r/132797
New Gerrit change created: https://git.eclipse.org/r/132802
New Gerrit change created: https://git.eclipse.org/r/132920
New Gerrit change created: https://git.eclipse.org/r/132923
New Gerrit change created: https://git.eclipse.org/r/132921
New Gerrit change created: https://git.eclipse.org/r/132925
New Gerrit change created: https://git.eclipse.org/r/132922
New Gerrit change created: https://git.eclipse.org/r/132924
New Gerrit change created: https://git.eclipse.org/r/132930
New Gerrit change created: https://git.eclipse.org/r/132929
New Gerrit change created: https://git.eclipse.org/r/132931
New Gerrit change created: https://git.eclipse.org/r/132932
New Gerrit change created: https://git.eclipse.org/r/132933
Gerrit change https://git.eclipse.org/r/132777 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=48d2271a58a68743e428d3096d2bca054d04e310
Gerrit change https://git.eclipse.org/r/132778 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=c5c5412f8d993fe48dd889b21afe8152f4fe2443
Gerrit change https://git.eclipse.org/r/132802 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=37f0f660c868b7570516843db01d51c08cbc75e2
Gerrit change https://git.eclipse.org/r/132795 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=086e6e30b7a4ba995a33da9db14066c3fec0fb9e
Gerrit change https://git.eclipse.org/r/132920 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=871c91ee5e5631ac080750a3643d4f855f5dd5d0
Gerrit change https://git.eclipse.org/r/132780 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=35996a5c5ca5c254959ba48241eaada6dbf8628d
Gerrit change https://git.eclipse.org/r/132779 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=4f9a44aa3d912d8e2d4da21b02ec683d75fd69eb
Gerrit change https://git.eclipse.org/r/132781 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=170e654b4796bad1453ae85a427b97317d67a69a
Gerrit change https://git.eclipse.org/r/132921 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=a923614c73274179d56e78d35d17aef149c23a03
Gerrit change https://git.eclipse.org/r/132924 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=caf2292768deccd885b5b6989b731742e2e5edf4
Gerrit change https://git.eclipse.org/r/132923 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8844a8f9f22802fedffa3cb2a8a21b041aa64b74
Gerrit change https://git.eclipse.org/r/132922 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8985c7b63f04ad139e8b93160798e642d2addc55
Gerrit change https://git.eclipse.org/r/132925 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=eeb3006e271eac4f5b319f2ca8007226efaadb58
Gerrit change https://git.eclipse.org/r/132932 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=be35c7327d2a6168718afea45181a058a7d414fa
Gerrit change https://git.eclipse.org/r/132931 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=b4031b5a8bc8154950a06f248675934ef4e41b5c
Gerrit change https://git.eclipse.org/r/132797 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=aa1040a21ab27e9dd0c666e12022ec3dcb569d84
Gerrit change https://git.eclipse.org/r/132930 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=ff75ae80fa44dfc925064f7ca0169ac80997bc77
All code submitted. Announced on CDT N&N and mailing list. Only thing left is to see if we can enforce some of this on gerrits.
New Gerrit change created: https://git.eclipse.org/r/132975
New Gerrit change created: https://git.eclipse.org/r/132974
New Gerrit change created: https://git.eclipse.org/r/132973
Gerrit change https://git.eclipse.org/r/132974 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8e811ccbd01094e60a0ed3df7937e6e270408884
Gerrit change https://git.eclipse.org/r/132973 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=3caea240a38caa9b4913481ba9fb41d9b57a032c
Gerrit change https://git.eclipse.org/r/132975 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=1903ae1acd47cdaee048d640acb2c6329b02a5bb
There is now a CI job to check code formatting and a few other rules. The job is https://ci.eclipse.org/cdt/job/cdt-verify-code-cleanliness and it runs https://git.eclipse.org/r/#/c/132975/4/releng/scripts/check_code_cleanliness.sh which has some rules in it.
Reopened because there is some code that is warning now that used to not warn due to change in compiler settings. From Nate: It looks like a lot of new warnings appeared in the CDT codebase. A lot of them are in test code. For example, in test files like AST2CPPTests.java, every import from org.eclipse.cdt.internal.* packages is marked with a "discouraged access" warning. The tests have always used internal APIs; there is no reason to warn about that. There are also new warnings in non-test code, some of which seem bogus. For example, in ASTCompletionNode.java: "ASTCompletionNode implements non-API interface IASTCompletionNode". That make no sense - ASTCompletionNode is in the same package as IASTCompletionNode, and it is our canonical implementation. Is this fallout from the recent cleanliness changes?
New Gerrit change created: https://git.eclipse.org/r/133020
New Gerrit change created: https://git.eclipse.org/r/133019
> For example, in ASTCompletionNode.java: "ASTCompletionNode implements non-API interface IASTCompletionNode". That make no sense - ASTCompletionNode is in the same package as IASTCompletionNode, and it is our canonical implementation. Nate, I see this warning in revision 3cf0297769 (before any code cleanup). I think it should not be there too, but it seems to be a bug in PDE rather than an incorrect setting. I have tested it on various Eclipse's I have around and it shows up as a warning in Oxygen.3+ and not Neon.1-. I'll try and raise a bug against PDE. If you are only seeing it since the code cleanup change then it is probably a more intricate bug. https://wiki.eclipse.org/PDE/API_Tools/Restrictions says: "Restrictions are not applied in the same bundle where API is defined." so it should not be possible to have this warning ever on ASTCompletionNode. > A lot of them are in test code. For example, in test files like AST2CPPTests.java, every import from org.eclipse.cdt.internal.* packages is marked with a "discouraged access" warning. > The tests have always used internal APIs; there is no reason to warn about that. I am working on better refinement of this now. I'll report back on that soon.
New Gerrit change created: https://git.eclipse.org/r/133023
New Gerrit change created: https://git.eclipse.org/r/133024
(In reply to Jonah Graham from comment #52) > I am working on better refinement of this now. I'll report back on that soon. See https://git.eclipse.org/r/#/c/133019/2/releng/scripts/check_code_cleanliness.sh I have turned off warnings for a number of JDT/PDE settings. This brings the number of warnings in o.e.c.core.tests/ui.tests to similar numbers as before. There are a few additional warnings which I would rather fix that disable the warnings. See https://git.eclipse.org/r/#/c/133024/
Gerrit change https://git.eclipse.org/r/133020 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=1ca30675219c639ea9cdf713d686dbb862f00d29
Gerrit change https://git.eclipse.org/r/133019 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=37ed2c406d0a019c18b65ecd418addf7af808f1f
Gerrit change https://git.eclipse.org/r/133023 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=f869a3f247afc6030a6d559996cd9e3ffb920a12
Gerrit change https://git.eclipse.org/r/133024 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=3859b78b71da07b2588c81f5ee6bdbb4f0f7f0ba
Nate/others. I think the most recent set of patches resolve the outstanding issues with increased warnings. Please reopen if there are things that still don't seem right.
New Gerrit change created: https://git.eclipse.org/r/133029
Gerrit change https://git.eclipse.org/r/133029 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=5b21097125aadd908b731c750b02913250263142
(In reply to Jonah Graham from comment #52) > > For example, in ASTCompletionNode.java: "ASTCompletionNode implements non-API interface IASTCompletionNode". That make no sense - ASTCompletionNode is in the same package as IASTCompletionNode, and it is our canonical implementation. > > Nate, I see this warning in revision 3cf0297769 (before any code cleanup). I > think it should not be there too, but it seems to be a bug in PDE rather > than an incorrect setting. I have tested it on various Eclipse's I have > around and it shows up as a warning in Oxygen.3+ and not Neon.1-. I'll try > and raise a bug against PDE. If you are only seeing it since the code > cleanup change then it is probably a more intricate bug. > > https://wiki.eclipse.org/PDE/API_Tools/Restrictions says: "Restrictions are > not applied in the same bundle where API is defined." so it should not be > possible to have this warning ever on ASTCompletionNode. It's possible that this has always been around and I just noticed it now. > > A lot of them are in test code. For example, in test files like AST2CPPTests.java, every import from org.eclipse.cdt.internal.* packages is marked with a "discouraged access" warning. > > > The tests have always used internal APIs; there is no reason to warn about that. > > I am working on better refinement of this now. I'll report back on that soon. Thanks, this is looking much better!
(In reply to Eclipse Genie from comment #62) > Gerrit change https://git.eclipse.org/r/133029 was merged to [master]. > Commit: > http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/ > ?id=5b21097125aadd908b731c750b02913250263142 These instructions on how to rebase an old commit are also in a blog post https://kichwacoders.com/2018/11/24/cdt-has-been-reformatted/
See Bug 553231 (for launchbar) and Bug 553233 (for tools.templates)