Skip to content

Commit

Permalink
Consolidate formatting pages (#5387)
Browse files Browse the repository at this point in the history
We have different issues open tracking other improvements to the page.

Fixes #5091

---------

Co-authored-by: Marya <[email protected]>
  • Loading branch information
parlough and MaryaBelanger authored Dec 4, 2023
1 parent d2f69c6 commit 96d527b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 55 deletions.
1 change: 1 addition & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
{ "source": "/guides/language/effective-dart", "destination": "/effective-dart", "type": 301 },
{ "source": "/guides/language/effective-dart/:page*", "destination": "/effective-dart/:page*", "type": 301 },
{ "source": "/guides/language/extension-methods", "destination": "/language/extension-methods", "type": 301 },
{ "source": "/guides/language/formatting", "destination": "/tools/dart-format", "type": 301 },
{ "source": "/guides/language/library-tour", "destination": "/guides/libraries/library-tour", "type": 301 },
{ "source": "/guides/language/sound-dart", "destination": "/language/type-system", "type": 301 },
{ "source": "/guides/language/sound-faq", "destination": "/language/type-system", "type": 301 },
Expand Down
8 changes: 2 additions & 6 deletions src/_data/side-nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,6 @@
permalink: /tools/build_runner
- title: webdev
permalink: /tools/webdev
- title: Managing source code
children:
- title: Formatting code
permalink: /guides/language/formatting
- title: What not to commit
permalink: /guides/libraries/private-files
- title: Static analysis
children:
- title: Customizing static analysis
Expand All @@ -331,6 +325,8 @@
permalink: /guides/testing
- title: Debugging web apps
permalink: /web/debugging
- title: What not to commit
permalink: /guides/libraries/private-files

- title: Resources
expanded: false
Expand Down
38 changes: 0 additions & 38 deletions src/guides/language/formatting.md

This file was deleted.

21 changes: 10 additions & 11 deletions src/tools/dart-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,14 @@ use the `dart help` command or see the documentation for the
$ dart help format
```

{% comment %}
[PENDING: Add info on commonly used options.]

[PENDING: Advocate using this! Perhaps steal the first paragraph from
dart_style's readme:
{{site.alert.tip}}
To avoid making changes that might be unsafe,
`dart format` only affects whitespace.

There's a lot more to writing readable and
consistent code than just whitespace, though.
To learn more about best practices for writing and styling Dart code,
check out the [Dart style guide][].
{{site.alert.end}}

The dart_style package defines an automatic, opinionated formatter
for Dart code. It replaces the whitespace in your program with what
it deems to be the best formatting for it. Resulting code should
follow the Dart style guide and, more importantly, should look nice
to most human readers, most of the time.]
{% endcomment %}
[Dart style guide]: /effective-dart/style

0 comments on commit 96d527b

Please sign in to comment.