{"id":18367812,"url":"https://github.com/gantsign/checkstyle-config","last_synced_at":"2026-03-19T04:03:40.766Z","repository":{"id":10981728,"uuid":"67889255","full_name":"gantsign/checkstyle-config","owner":"gantsign","description":"Checkstyle rules for GantSign Java code style","archived":false,"fork":false,"pushed_at":"2023-09-03T16:55:18.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T20:49:30.826Z","etag":null,"topics":["checkstyle"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gantsign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-10T19:06:20.000Z","updated_at":"2024-05-28T19:41:02.000Z","dependencies_parsed_at":"2024-11-05T23:37:36.321Z","dependency_job_id":null,"html_url":"https://github.com/gantsign/checkstyle-config","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantsign%2Fcheckstyle-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantsign%2Fcheckstyle-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantsign%2Fcheckstyle-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantsign%2Fcheckstyle-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gantsign","download_url":"https://codeload.github.com/gantsign/checkstyle-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248259465,"owners_count":21074128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["checkstyle"],"created_at":"2024-11-05T23:23:31.365Z","updated_at":"2026-02-02T17:38:10.886Z","avatar_url":"https://github.com/gantsign.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# GantSign Checkstyle Configuration\n\n[![Validation](https://github.com/gantsign/checkstyle-config/workflows/Validation/badge.svg)](https://github.com/gantsign/checkstyle-config/actions?query=workflow%3AValidation)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nCheckstyle configuration for Java code written by GantSign.\n\n## Severity Level\n\nThe default severity level is `error`; the goal is to ensure quality rather than\nsuggest it.\n\n## @SuppressWarnings Support\n\nBecause the rules are quite strict `@SuppressWarnings` can be used to suppress\nerrors where necessary. It is the responsibility of the code reviewer to judge\nwhether suppression of the rule is the appropriate solution.\n\n## Google Java Style Guide compatibility\n\nGantsign rules are based on the Google Java Style Guide\n[Checkstyle rules](https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml).\nIt's recommended that your source code be automatically formated as part of\nyour build. You can find formatting tools at\n[https://github.com/google/google-java-format](https://github.com/google/google-java-format)).\n\nAny file compliant with these rules is compliant with Google Java Style Guide\nCheckstyle rules. The reverse isn't necessarily true as the GantSign rules\ninclude some additional checks.\n\n## Additional rules for GantSign's code\n\n* [DeclarationOrder](http://checkstyle.sourceforge.net/config_coding.html#DeclarationOrder)\n\n    * Declaration order: enforce declarations appear in the following order:\n\n        1. Class (`static`) variables. First the `public` class variables,\n           then `protected`, then package level (no access modifier), and then\n           `private`.\n        2. Instance variables. First the `public` class variables, then\n           `protected`, then package level (no access modifier), and then\n           `private`.\n        3. Constructors\n        4. Methods\n\n* [RedundantModifier](http://checkstyle.sourceforge.net/config_modifier.html#RedundantModifier)\n\n    * Modifiers: ban redundant modifiers (e.g. public for methods in an\n      interface).\n\n* [RedundantImport](http://checkstyle.sourceforge.net/config_imports.html#RedundantImport)\n\n    * Imports: ban redundant imports.\n\n* [MissingDeprecated](http://checkstyle.sourceforge.net/config_annotation.html#MissingDeprecated)\n\n    * Deprecated: require `@Deprecated` annotation and `@deprecated` JavaDoc tag\n      if either are present.\n\n* [MissingOverride](http://checkstyle.sourceforge.net/config_annotation.html#MissingOverride)\n\n    * Override: require `@Overrides` annotation if `@inheritDoc` JavaDoc tag is\n      present.\n\n* [PackageAnnotation](http://checkstyle.sourceforge.net/config_annotation.html#PackageAnnotation)\n\n    * Package annotations: ensure package annotations are only used in the\n      `package-info.java` file.\n\n* [InterfaceIsType](http://checkstyle.sourceforge.net/config_design.html#InterfaceIsType)\n\n    * Interfaces: make sure interfaces contain methods and not just constants;\n      no more interfaces like `javax.swing.SwingConstants`.\n\n* [CovariantEquals](http://checkstyle.sourceforge.net/config_coding.html#CovariantEquals)\n\n    * Equals: if you define your own type-specific equals method e.g.\n      `Person.equals(Person)`, you must also override the default equals method\n      e.g. `Person.equals(Object)`.\n\n* [EqualsHashCode](http://checkstyle.sourceforge.net/config_coding.html#EqualsHashCode)\n\n    * HashCode: if you override `equals()` you must also override `hashCode()`.\n\n* [MagicNumber](http://checkstyle.sourceforge.net/config_coding.html#MagicNumber)\n\n    * Numbers: ban magic numbers (i.e. numbers not defined with constants);\n      sensible exclusions apply (e.g. array initializers).\n\n* [SimplifyBooleanExpression](http://checkstyle.sourceforge.net/config_coding.html#SimplifyBooleanExpression)\n\n    * Boolean logic: force obvious simplification of boolean logic:\n\n      e.g.\n\n      ```java\n      if (booleanValue == true)\n      ```\n\n      should be:\n\n      ```java\n      if (booleanValue)\n      ```\n\n* [SimplifyBooleanReturn](http://checkstyle.sourceforge.net/config_coding.html#SimplifyBooleanReturn)\n\n    * Boolean returns: ban unnecessary `if` `else` blocks for boolean returns:\n\n      e.g.\n\n      ```java\n      if (booleanValue) {\n          return true;\n      } else {\n          return false;\n      }\n      ```\n\n      should be:\n\n      ```java\n      return booleanValue;\n      ```\n\n* [StringLiteralEquality](http://checkstyle.sourceforge.net/config_coding.html#StringLiteralEquality)\n\n    * String: ban use of identity equals on strings literals.\n\n* [ExplicitInitialization](http://checkstyle.sourceforge.net/config_coding.html#ExplicitInitialization)\n\n    * Initialization: ban explicitly initializing fields to their default\n      values.\n\n* [IllegalInstantiation](http://checkstyle.sourceforge.net/config_coding.html#IllegalInstantiation)\n\n    * Wrapper types: ban using constructor of wrapper types.\n\n* [IllegalType](http://checkstyle.sourceforge.net/config_coding.html#IllegalType)\n\n    * Collections: enforce using Collection interfaces for return types,\n      parameter types and fields for basic collection implementation types.\n\n* [MutableException](http://checkstyle.sourceforge.net/config_design.html#MutableException)\n\n    * Exceptions: ban mutable exceptions; be aware this only checks the fields\n      in the exception are declared final.\n\n* [IllegalThrows](http://checkstyle.sourceforge.net/config_coding.html#IllegalThrows)\n\n    * Exception handling: ban throwing `java.lang.Throwable`,\n      `RuntimeException`, `Error`, `Throwable`, `java.lang.Error` and\n      `java.lang.RuntimeException`.\n\n## License\n\nThis software is licensed under the terms in the file named \"[LICENSE](LICENSE)\"\nin the root directory of this project.\n\n## Author Information\n\nJohn Freeman\n\nGantSign Ltd.\nCompany No. 06109112 (registered in England)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgantsign%2Fcheckstyle-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgantsign%2Fcheckstyle-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgantsign%2Fcheckstyle-config/lists"}