Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Formatting and EPLv2

Can you add them to a gerrit patch for me to look at. Which version of Eclipse are you using to do the formatting? It could be there is some instability in the formatting or something else going on. 

Thanks.
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On Sat, 24 Nov 2018 at 21:01, Nathan Ridge <zeratul976@xxxxxxxxxxx> wrote:
I ended up only staging the changes the script made to the files modified by my patch, and discarding the other changes. That seemed to have made the cleanliness checker in automation happy.

Still strange that the local run makes changes to other files. I've checked and it happens on a clean checkout too. These are files it modifies:

        modified:   codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/IProblemPreferenceDescriptor.java
        modified:   core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java
        modified:   core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBinaryTypeIdExpression.java
        modified:   core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpression.java
        modified:   core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNode.java
        modified:   core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IBasicType.java
        modified:   core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTEnumerationSpecifier.java
        modified:   core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java
        modified:   core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPUnaryTypeTransformation.java
        modified:   core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/rewrite/ASTRewrite.java
        modified:   debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IChangeReverseMethodHandler.java
        modified:   debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IMemoryBlockAddressInfoRetrieval.java
        modified:   debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ReverseDebugAction.java
        modified:   dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java
        modified:   dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/_expression_/ExpressionsChangedEvent.java
        modified:   qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/IQMethod.java
        modified:   qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/IQProperty.java
        modified:   qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/IQmlRegistration.java
        modified:   qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSAssignmentExpression.java
        modified:   qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSBinaryExpression.java
        modified:   qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSLogicalExpression.java
        modified:   qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSUnaryExpression.java
        modified:   qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/qmljs/IJSUpdateExpression.java
        modified:   qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectConnectCompletion.java
        modified:   testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/MessagesViewer.java
        modified:   testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/ResultsView.java
        modified:   testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/model/ITestItem.java
        modified:   testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/model/ITestMessage.java

and the changes are all leading-whitespace related (probably tab vs. space, though it's hard to tell).

Regards,
Nate



________________________________________
From: cdt-dev-bounces@xxxxxxxxxxx <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Nathan Ridge <zeratul976@xxxxxxxxxxx>
Sent: November 24, 2018 7:49 PM
To: Jonah Graham
Cc: CDT General developers list.
Subject: Re: [cdt-dev] Formatting and EPLv2

I tried this, and the script made changes to a bunch of other source files, in addition to the ones my patch modifies. Should I be comitting those changes as well?

This is with my patch rebased onto the master branch, so it seems to me that those other files should already be formatted correctly.

Thanks,
Nate

________________________________________
From: Jonah Graham <jonah@xxxxxxxxxxxxxxxx>
Sent: November 23, 2018 6:06 PM
To: Nathan Ridge
Cc: CDT General developers list.
Subject: Re: [cdt-dev] Formatting and EPLv2

Yes, you can do that.

Run releng/scripts/check_code_cleanliness.sh<https: git.eclipse.org="" r="" #="" c="" 132975="" 4="" releng="" scripts="" check_code_cleanliness.sh="">

You need an ECLIPSE environment variable that points at the eclipse install to use. It defaults to ~/buildtools/eclipse-SDK-4.9/eclipse (the value that works on the build machine). Once the script runs it will leave you to stage/commit any changes it has made.

Jonah
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com<http: www.kichwacoders.com="">


On Fri, 23 Nov 2018 at 18:01, Nathan Ridge <zeratul976@xxxxxxxxxxx<mailto:zeratul976@xxxxxxxxxxx>&gt; wrote:
Hi Jonah,

&gt; 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.
&gt;
&gt; It means that gerrit CI check will fail if you have formatting/whitespace issues. Please let me know what you think.

Is there a local command I can run to reformat my code (which perhaps has an old patch applied) to satisfy the check?

Thanks,
Nate
</zeratul976@xxxxxxxxxxx<mailto:zeratul976@xxxxxxxxxxx></http:></https:></jonah@xxxxxxxxxxxxxxxx>
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top