whatisgithub

What is java-code-styles?

square/java-code-styles — explained in plain English

Analysis updated 2026-07-13 · repo last pushed 2025-11-19

2,948ShellAudience · developerComplexity · 1/5QuietSetup · easy

In one sentence

Ready-made code formatting rules for Java and Android projects in IntelliJ IDEA, so teams don't have to build a style guide from scratch. Deprecated, Square now recommends .editorconfig files instead.

Mindmap

mindmap
  root((repo))
    What it does
      Java formatting rules
      Android formatting rules
      One script install
    Use cases
      Standardize team code style
      Quick setup for startups
      Match Square defaults
    Tech stack
      Shell script
      IntelliJ config
    Audience
      Java developers
      Android teams
    Status
      Deprecated
      Use editorconfig instead
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Standardize code formatting across a Java or Android team without writing a style guide from scratch.

USE CASE 2

Give a new Android project sensible formatting defaults used by a well-known engineering team.

USE CASE 3

Eliminate style debates by having every developer's IntelliJ apply the same rules automatically.

What is it built with?

ShellIntelliJ IDEA

How does it compare?

square/java-code-stylesbepb/bepbzolrath/wemux
Stars2,9483,1593,672
LanguageShellShellShell
Last pushed2025-11-192026-07-09
MaintenanceQuietActive
Setup difficultyeasyeasyeasy
Complexity1/52/52/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Run the install script for your OS, restart IntelliJ IDEA, then select the code style in project settings.

So what is it?

Square's java-code-styles repository provides ready-made formatting rules for Java and Android projects in IntelliJ IDEA, the popular development environment. The idea is simple: instead of every developer on a team manually configuring how their code looks, things like indentation, spacing, and brace placement, you install these settings once and everyone's editor automatically formats code the same way. This keeps codebases consistent and eliminates petty arguments about style. Using it is straightforward. You run a script (there's one for Mac/Linux and one for Windows), restart IntelliJ, and then pick the code style from your project settings. From that point on, the IDE applies those formatting rules automatically. It's essentially a configuration file packaged with a helper script to put it in the right place on your computer. This would appeal to engineering teams building Java or Android apps who want to standardize how their code looks without building a style guide from scratch. A startup spinning up its first Android app, for instance, could use these settings to get sensible defaults that match what a well-known company like Square uses. It saves time and ensures consistency across the team. However, it's worth noting that this project is deprecated and no longer maintained. The team at Square has moved on to using ktfmt for Kotlin code, and they now recommend using .editorconfig files instead, which are a more modern and broadly supported way to share formatting rules across different editors and tools. So while the settings here still work, they represent an older approach that most teams today would skip in favor of newer alternatives.

Copy-paste prompts

Prompt 1
I want to apply Square's Java code style in IntelliJ IDEA. Walk me through running the install script and selecting the code style in project settings on macOS.
Prompt 2
Our team is starting a new Android project and wants consistent formatting. Compare using this repo's IntelliJ code style versus a .editorconfig file, which should we pick today and why?
Prompt 3
I installed Square's java-code-styles on Windows and restarted IntelliJ but don't see the code style in settings. Help me troubleshoot where the config file should be placed.
Prompt 4
Help me migrate from Square's deprecated IntelliJ code styles to a modern .editorconfig file that keeps the same formatting rules for a Java project.

Frequently asked questions

What is java-code-styles?

Ready-made code formatting rules for Java and Android projects in IntelliJ IDEA, so teams don't have to build a style guide from scratch. Deprecated, Square now recommends .editorconfig files instead.

What language is java-code-styles written in?

Mainly Shell. The stack also includes Shell, IntelliJ IDEA.

Is java-code-styles actively maintained?

Quiet — no commits in 6-12 months (last push 2025-11-19).

How hard is java-code-styles to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is java-code-styles for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.