Sort Lines in Source Code

This article was adapted from a Google Tech on the Toilet (TotT) episode. You can download a printer-friendly version of this TotT episode and post it in your office.

By Kyle Freeman

Imagine you're adding a two-player mode to a game. When testing the feature, you launch the game but don't see the option to add a second player. The configuration looks correct; you enabled two-player mode on the last line!

So what happened? Can you spot the bug in the following example?

allow_warping: false

enable_two_players: false

show_end_credits: true

enable_frost_band: false

enable_two_players: true

Using keep-sorted (github.com/google/keep-sorted) to sort lines makes the error easy to spot: the flag enable_two_players is set twice, with different values:

# keep-sorted start

allow_warping: false

enable_frost_band: false

enable_two_players: false

enable_two_players: true

show_end_credits: true

# keep-sorted end

Sorted lists and lines of code are easier to read and maintain, and can help prevent bugs. To use keep-sorted in your source code, config, and text files, install keep-sorted and then follow these instructions: 

  1. Add keep-sorted start and keep-sorted end comments in your file, surrounding the lines you want to sort.

  2. Run keep-sorted: keep-sorted [file1] [file2] ...

  3. (Optional) Add keep-sorted to your pre-commit so it runs automatically on git commit

You can add options to override default behavior. For example, you can ignore case, sort numerically, order by prefixes, and even sort by regular expressions:

bosses := []int{

  // keep-sorted start by_regex=//.*

  111213, // Aethon Annie

  52816,  // Blazing Benny

  711,    // Daisy Dragon

  1003,   // Kenzie Kraken

  // keep-sorted end

}

Remember: before sorting, ensure the original order isn't intentional. For example, order can be critical when loading dependencies.


Beta Channel Update for ChromeOS / ChromeOS Flex

The ChromeOS Dev channel is being updated to OS version 16371.41.0 (Browser version 140.0.7339.136) for most ChromeOS devices.

If you find new issues, please let us know one of the following ways:
  1. File a bug
  2. Visit our ChromeOS communities

    1. General: Chromebook Help Community

    2. Beta Specific: ChromeOS Beta Help Community

  3. Report an issue or send feedback on Chrome

  4. Interested in switching channels? Find out how.

Luis Menezes

Google ChromeOS

Google Workspace Updates Weekly Recap – September 12, 2025

  

Previous announcements
The announcements below were published on the Workspace Updates blog earlier this week. Please refer to the original blog posts for complete details.

Get real-time push notifications for reactions on your messages in Google Chat
Chat users can now receive real-time push notifications for reactions on their messages. This can help users stay on top of reactions on their messages and avoid missing potentially important updates. | Learn more about notifications for reactions in Chat.

Public notebooks in partnership with OpenStax
We've partnered with OpenStax, the leading provider of free, peer-reviewed textbooks, to transform some of their most popular academic titles into interactive Notebooks. These ready-to-use Notebooks are designed to help high school and college students turn passive reading into active learning. With content curated from subjects like Biology, Psychology, and Business, you can instantly engage with complex material and accelerate your understanding.  | Learn more about the new interactive Notebooks.

Available in closed beta: enhancing security outcomes with the Shared Signals Framework
The Shared Signals Framework (SSF) is a community supported initiative of the OpenID Foundation, focused on developing and maintaining a standardized protocol for cross-system communication between security platforms to share security insights and events. To support the SSF initiative, Google Workspace is implementing a SSF Receiver to ingest Continuous Access Evaluation Profile (CAEP) signals. | Learn more about the beta for shared signals framework.

Understand changes more quickly with condensed version history in Sheets
We are introducing a new condensed view for version history in Google Sheets. By default, Sheets will now only show rows with cells that had changes in the selected version. The condensed version history will help users identify relevant edits to the sheet more quickly and efficiently. | Learn more about the new condensed version history here.

Educators and students can now create Flashcards, Quizzes and new Reports in NotebookLM
NotebookLM can now turn your documents into interactive flashcards and quizzes, creating a personalized study session, generated in seconds and grounded only in your source materials. Prep for exams, master a new skill, and share it with anyone with a simple link. | Learn more about the Flashcards, Quizzes, and Reports.

See file summaries on the Home page in Google Drive
You can now see Gemini summaries directly within the suggested files surfaced on the Home page in Google Drive. These summaries will show on select Docs, Sheets, Slides, and PDFs in your suggested file list. You can click the “See more” button that appears on hover to view a more in-depth analysis, or ask Gemini follow up questions about the file in the Gemini side panel. | Learn more about the new sumaries in Google Drive here.

See file summaries on the Home page in Google Drive

What’s changing 

You can now see Gemini summaries directly within the suggested files surfaced on the Home page in Google Drive. These summaries will show on select Docs, Sheets, Slides, and PDFs in your suggested file list. You can click the “See more” button that appears on hover to view a more in-depth analysis, or ask Gemini follow up questions about the file in the Gemini side panel. 

Getting started 


Rollout pace 

Rapid and Schedules Release domains: Gradual rollout (up to 15 days for feature visibility) starting on September 4, 2025.

Availability 

Available for Google Workspace: 
  • Business Standard and Plus 
  • Enterprise Standard and Plus 
  • Google AI Pro for Education
Also available to
  • Google One AI Premium 
Anyone who previously purchased these add-ons will also receive this feature: 
  • Gemini Business* Gemini Enterprise* 
*As of January 15, 2025, we’re no longer offering the Gemini Business and Gemini Enterprise add-ons for sale. Please refer to this announcement for more details. 

Resources