styleguide
Style guides for Google-originated open-source projects (by google)
google-java-format
Reformats Java source code to comply with Google Java Style. (by google)
Our great sponsors
styleguide | google-java-format | |
---|---|---|
17 | 21 | |
36,506 | 5,407 | |
0.5% | 1.3% | |
5.0 | 8.6 | |
5 days ago | 3 days ago | |
HTML | Java | |
Apache License 2.0 | GNU General Public License v3.0 or later |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
styleguide
Posts with mentions or reviews of styleguide.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-25.
- [Cpp] Welchen C++-Linter verwendest du?
- [Cpp] Quel C ++ Linter utilisez-vous?
- Google Style Guides
-
Set Code Style to "Google Python Style Guide"
Hey, looking for a way to change the default PEP-8 code style to the one of Google. I see that I can set it manually or import the settings, but I've been unable to find a settings file (other than this one for Vim). I also haven't been able to find examples of what a PyCharm-supported settings file would be formatted like, so I can write one myself.
-
How to Configure C++ Code Formatting in Visual Studio Code
Google C++ Style Guide Example
-
I'm kinda new to Java, and it feels like I'm screaming at a coffee cup every time there's an error.
I use intellij and import Googlecodestyles, modify it a bit to my liking and save that setting. I believe they have one for eclipse also. I believe this it is https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
-
How does Apache ShardingSphere standardize and format code? We use Spotless
For latest rules of ShardingSphere, see [shardingsphereeclipseformatter.xml](https://github.com/apache/shardingsphere/blob/master/src/resources/shardingsphere_eclipse_formatter.xml). For references, check the [eclipse-java-google-style.xml](https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml) file.
-
What is the recommended way to format code files like Java, JavaScript, etc. in Sublime?
Would it be possible to get IDE level formatting capabilities? I am not exactly looking for IDEL level customisability. I just need a way to figure out how to use Google Style Guides to format codes while editing.
-
Zero Config Code Formatter?
You just need to have the desired Format rules, like https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
-
NaturalDocs: Plain English Code Documentation
Since it's been around since 2003, I'm curious to know how many projects out there are using it. Would be great if there are some open source examples available as well. I mostly stick to Python, so I'm most familiar with the Google docstring format[1], but seeing as there are other ones[2] as well aren't those usable for other languages too? Seems to be the case of yet another "standard", though since this is such an old project I may out of my depth in saying that.
---
[1]: https://github.com/google/styleguide/blob/gh-pages/pyguide.m...
google-java-format
Posts with mentions or reviews of google-java-format.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-12.
-
How to automatically format Java code similar to Rust (rustfmt)?
The code block you pasted is not at all what the Google Java Format utility would do. Don't use VSCode to handle IntelliJ's job :P
-
After a few attempts I'm officially a programmer :^)
Follow a style guide, doesn’t really matter which you choose, you’ll thank me later. This one will work automatically https://github.com/google/google-java-format
-
For Contributors to my OpenSSG
Like Prettier and ESLint in Javascript, I needed to add Java formatting and linting tools. For formatting, I looked at google-java-format, codestyle, and spotless. Since I'm not using Java framework, I can only use plugin to format my code. Although google-java-format does not support configurability, I just chose to follow Google Java format as I believe they have most common language format standard. To use google-java-format in MacOS, go to IntelliJ IDEA -> Preference (Windows: File -> Setting) and search "plugin" menu. Then, find google-java-format using search bar. Now all you need to do is to install the plugin. I didn't have to enable it, I think it needs to be enabled in some cases. You can refer to the documentation. To format your code, go to Code menu and select Reformat code or Reformat file. It will format your code.
-
Coding standards
I cloned a Maven plug-in that enforces Google code style guidelines (modifying a few things, like nesting depth): https://github.com/google/google-java-format
-
I declare as "final" every single variable whose value doesn't change. I also use "this" every time that I'm referring to an attribute, even when there's no ambiguity in not using it
They follow a rectangle rule, which is easy to follow, but can lead to ugly formatting due to excessive indentation in nested statements (which are common using protobuffers). The dart formatter was a lot nicer, and considered human friendly style instead of blindly following the rectangle rule.
-
Creating custom formatter for Java
I spent most of my development career writing simple CRUD applications, recently I read a fascinating article: http://journal.stuffwithstuff.com/2015/09/08/the-hardest-program-ive-ever-written/. It looks like a nice challenge to try creating such a tool. For sure I need first to understand how to build AST etc. I could reuse existing solutions like https://github.com/google/google-java-format, or eclipse fmt, but I would like to understand the whole process, to be able to debug all cases.
- I am about to start a war
-
Zero Config Code Formatter?
Eventually it was clear that google-java-format was pulling ahead, and it was clear that the primary reason for that was The Rectangle Rule -- a principle I'd vomited forth one day that somehow had gone the distance. Structure-revealing code turns out to be readable code, and our users kept preferring it.
- Black, the Uncompromising (Python) Code Formatter Is Stable
-
google-java-format -> Diferences, how to sync with eclipse / stream format
Looks like this was changed in version 1.7.
What are some alternatives?
When comparing styleguide and google-java-format you can also consider the following projects:
palantir-java-format - A modern, lambda-friendly, 120 character Java formatter.
spotless - Keep your code spotless
fmt-maven-plugin - Opinionated Maven Plugin that formats your Java code.
java-code-styles - IntelliJ IDEA code style settings for Square's Java and Android projects.
spring-javaformat
vscode-java - Java Language Support for Visual Studio Code
formatter-maven-plugin - Formatter Maven Plugin
CppCoreGuidelines - The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++
black - The uncompromising Python code formatter
styleguide vs palantir-java-format
google-java-format vs spotless
styleguide vs fmt-maven-plugin
google-java-format vs palantir-java-format
styleguide vs java-code-styles
google-java-format vs spring-javaformat
styleguide vs vscode-java
google-java-format vs formatter-maven-plugin
styleguide vs CppCoreGuidelines
google-java-format vs black
styleguide vs spring-javaformat
google-java-format vs fmt-maven-plugin