Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.
/ codestyle Public archive

A project that helps developers to cover Shiru ka's code style.

License

Notifications You must be signed in to change notification settings

shiruka/codestyle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

All

Java

  • Alignment
    • Fields Example
      • public -> protected -> package-private -> private
      • immutable(final) -> mutable(non-final)
      • static -> non-static
      • ordered by name
    • Methods Example
      • public -> protected -> package-private -> private
      • immutable(final) -> mutable(non-final)
      • static -> non-static
      • ordered by name
  • Style
    • Local values have to have var keyword that comes with Java 11. Example
    • Fields and methods have to annotatated with @NotNull and @Nullable. Nullable NotNull
    • The classes that are not supposed to extensible have to have final keyword. Example
    • The methods where is in an abstract class should have final keyword. Example
    • The fields which suppose to be immutable have to have final keyword. Example
    • The constructors mustn't have real code in it. Wrong Correct
    • Using this keyword for fields and methods is a must. Example
    • The Javadoc for each constructor, method, class, and the field is a must. Example
    • The Javadocs start with lowercase letter is a must. Example
    • The end line is a must. Example
    • No blank line before the latest brace is a must. Example
    • No blank line in any method is a must. Example
    • Blank lines between fields and methods only 1 is a must. Example
    • 1 blank line after the class header is a must. Example
    • package-info.java for each package is a must. Example

XML

  • Alignment
    • .
  • Style
    • .

Properties

  • Style
    • .properties files can have blank lines. Example

About

A project that helps developers to cover Shiru ka's code style.

Topics

Resources

License

Stars

Watchers

Forks