Skip to content
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

Indentation #726

Closed
floitschG opened this issue Dec 7, 2011 · 7 comments
Closed

Indentation #726

floitschG opened this issue Dec 7, 2011 · 7 comments
Assignees

Comments

@floitschG
Copy link
Contributor

Please change the default indentation for the following constructs:
switch(x) {
  case foo: // indent by 2 characters.
}

var x =
    value; // indent by 4 characters.

returnType foo() =>
    value; // indent 4.
// Next line should not indent.

@devoncarew
Copy link
Member

Changing this to a defect - we should be indenting according to the style guide.


Removed Type-Enhancement label.
Added Type-Defect label.

@DartBot
Copy link

DartBot commented Dec 13, 2011

This comment was originally written by @Bluenuance


make intendation settable under tools/preferences/<somewhere>
so people who prefer an intendation of 4 may do this.

@floitschG
Copy link
Contributor Author

More indentation:
foo(argument1,
    argument2); // <== should align with argument1.

foo_function(
    argument1, argument2, ...) // <== should indent 4.

@floitschG
Copy link
Contributor Author

also:
for (var i = 0;
     condition; // <== should be indented.
...

@stevemessick
Copy link
Contributor

And one more related request. When typing a for-loop you may want the arguments on separate lines

for (int i = 0;)

Typing a return after the semicolon does not insert a return, it jumps the cursor to the end of the line.

Also, actually getting the arguments lined up should be easier than it is.

  for (int i = 0;
       i < 0;
       i++) {
    
  }

You cannot use the tab key to indent the second line (a known bug).

@danrubel
Copy link

danrubel commented Mar 6, 2012

Set owner to @stevemessick.

@stevemessick
Copy link
Contributor

Added Fixed label.

copybara-service bot pushed a commit that referenced this issue Jan 8, 2024
matcher (https://github.com/dart-lang/matcher/compare/fcbd361..d9cf4f6):
  d9cf4f6  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#240)
  7ea9047  2023-12-13  Kevin Moore  Update test_api dependency, bump & fix lints, prepare release (#237)
  050fdda  2023-12-13  Kevin Moore  blast_repo fixes (#238)

mockito (https://github.com/dart-lang/mockito/compare/57a7c82..e15e000):
  e15e000  2023-12-14  Sam Rawlins  Bump mockito to 5.4.4
  a2a6566  2023-12-14  Copybara-Service  Merge pull request #726 from provokateurin:chore/deps/test_api-0.7
  bda332c  2023-12-14  jld3103  chore(deps): Allow test_api 0.7
  9bd6fb0  2023-12-12  Paul Berry  Remove mockito pre-null-safety tests.

test (https://github.com/dart-lang/test/compare/43ff5bf..846d73e):
  846d73ee  2024-01-01  dependabot[bot]  Bump actions/upload-artifact from 3.1.3 to 4.0.0 (#2165)
  0ab56790  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#2167)
  3b960c3e  2024-01-01  dependabot[bot]  Bump github/codeql-action from 2.22.8 to 3.22.12 (#2166)
  30543cae  2023-12-19  Nate Bosch  Add more logging around iframe startup (#2160)
  e56a5e22  2023-12-13  Jacob MacDonald  small cleanup in catch (#2159)
  15b39372  2023-12-13  Jacob MacDonald  handle missing package config files (#2158)
  9667cca8  2023-12-13  Jacob MacDonald  release test_api 7.0.0, test_core 6.0.0, and test 1.25.0 (#2156)
  b3fb1486  2023-12-13  Nate Bosch  Remove support for Internet Explorer (#2114)
  48a2bc3d  2023-12-13  Derek Xu  Update the package:vm_service constraint to allow version 14.x (#2157)

Change-Id: I386444652c47cd14a61665599d86dc3a7669a2fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345341
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants