Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorMarco Stornelli2019-04-12 16:15:16 +0000
committerMarco Stornelli2019-05-12 13:42:21 +0000
commitf893b77dba991ba1b3348d72267573540e9ce8bd (patch)
tree91b5f2cbe30fb629af8007f444b31b138c077039 /codan
parent826a0b2c0effc6a8d1479ddbff8d5b4bbd31a6b6 (diff)
downloadorg.eclipse.cdt-f893b77dba991ba1b3348d72267573540e9ce8bd.tar.gz
org.eclipse.cdt-f893b77dba991ba1b3348d72267573540e9ce8bd.tar.xz
org.eclipse.cdt-f893b77dba991ba1b3348d72267573540e9ce8bd.zip
Bug 461435 - Added options to format pointers in methods
Rules used: 1) Default is right alignment to be compliant with built-in formatter rules; 2) Pointer with declarator without name will be always left alignment unless there's a nested declarator; 3) Return value of methods/functions is always left alignment; 4) If left alignment is selected, if space after comma is selected too for a declaration list, space is always forced after the comma. Change-Id: I82d5ad130e665e5357644cc59655a558f3fb732f Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFixTest.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFixTest.java b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFixTest.java
index 7c26421d4a..ca13208545 100644
--- a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFixTest.java
+++ b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFixTest.java
@@ -140,7 +140,7 @@ public class CatchByReferenceQuickFixTest extends QuickFixTestCase {
String result = runQuickFixOneFile();
setPlaceConstRight(before);
- assertContainedIn("catch (C const &)", result); //$NON-NLS-1$
+ assertContainedIn("catch (C const&)", result); //$NON-NLS-1$
}
}
diff --git a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java
index 554a782a96..01df41fd86 100644
--- a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java
+++ b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java
@@ -63,7 +63,7 @@ public class CreateLocalVariableQuickFixTest extends QuickFixTestCase {
public void testString() throws Exception {
loadcode(getAboveComment());
String result = runQuickFixOneFile();
- assertContainedIn("const char* aString;", result); //$NON-NLS-1$
+ assertContainedIn("const char *aString;", result); //$NON-NLS-1$
}
// void func() {
@@ -72,7 +72,7 @@ public class CreateLocalVariableQuickFixTest extends QuickFixTestCase {
public void testWString() throws Exception {
loadcode(getAboveComment());
String result = runQuickFixOneFile();
- assertContainedIn("const wchar_t* aWString;", result); //$NON-NLS-1$
+ assertContainedIn("const wchar_t *aWString;", result); //$NON-NLS-1$
}
// void func() {

Back to the top