Skip to content

indent "default:" to match "case" in switch statement #3143

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

Closed
danrubel opened this issue May 18, 2012 · 4 comments
Closed

indent "default:" to match "case" in switch statement #3143

danrubel opened this issue May 18, 2012 · 4 comments
Assignees
Milestone

Comments

@danrubel
Copy link

floitsch: bad indentation.
switch (foo) {
 case 3:
   return true;
 default:
   return false;
}

the "default:" is not intended correctly (it is at the same level as "return true;".
////////////////////////////////////////////////////////////////////////////////////
Editor Version: 7759
////////////////////////////////////////////////////////////////////////////////////
OS: Linux - amd64 (3.3.5-1-ARCH)
SDK installed = true
Dartium installed = true
AnalysisServer enabled = true
////////////////////////////////////////////////////////////////////////////////////

@stevemessick
Copy link
Contributor

Arg, did you have to report this bug? I was hoping no one would complain. I know what the problem is but it's a hassle to fix it. Still, gotta be done now, doesn't it? :)


Added this to the M1 milestone.

@stevemessick
Copy link
Contributor

floitsch: indentation.
Inside a switch the "case" statements are moved back to the left so that indentation is correct. However for "default:" this doesn't happen. In other words the editor indents the "default:" more than the "case" clauses.
////////////////////////////////////////////////////////////////////////////////////
Editor: 10115
OS: Linux - amd64 (3.2.5-gg886)
JVM: 1.6.0-google-v4

SDK installed: true
Dartium installed: true

@stevemessick
Copy link
Contributor

Added Started label.

@stevemessick
Copy link
Contributor

Removed Type-Enhancement label.
Added Type-Defect, Fixed labels.

@danrubel danrubel added this to the M1 milestone Aug 6, 2012
copybara-service bot pushed a commit that referenced this issue Sep 7, 2022
…3 revisions)

https://dart.googlesource.com/dartdoc/+log/d732c8f4eda4..3bcfc1c2ba36

2022-09-07 [email protected] Deprecate linkedParamsNoMetadataOrNames (#3143)
2022-09-07 [email protected] Bump to 6.1.0 (#3141)
2022-09-07 [email protected] Bump to analyzer 4.7.0 (#3142)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: [email protected]
Change-Id: I148cbeb25af37331694a9c189bc58b7320eefc56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258060
Commit-Queue: DEPS Autoroller <[email protected]>
Commit-Queue: Devon Carew <[email protected]>
Reviewed-by: Devon Carew <[email protected]>
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

2 participants