Check compliance with object-oriented exercise

Overview

Object-oriented exercise is introduced in the book Thought Works Anthology. Nine rules that can improve software design are introduced. The good and bad of this rule is introduced in various places, so please refer to that.

Based on these, there is one big problem in actually practicing object-oriented exercise. There is no way to check how well they are compliant. Of course, you can check it visually, but it is very difficult to check all the programs, and the number of methods and the number of lines cannot be counted. On the contrary, since the rules themselves are firmly established, it should be possible to confirm them programmatically. When I searched for it, I couldn't find such a confirmation tool. So, it is a promotion that I tried to make a confirmation tool. In creating it, I practiced object-oriented exercise.

9rules

It is a tool published at https://github.com/tamada/9rules. It is a tool that targets Java source code and points out points that violate the nine rules of object-oriented exercise.

Installation & usage

$ git clone https://github.com/tamada/9rules.git
$ cd 9rules
$ mvn package
$ java -jar target/9rules-1.0-SNAPSHOT.jar -h
java -jar 9rules.jar [OPTIONS] <ARGUMENTS...>

OPTIONS:
    --strict:  Strictly level check (Default).
    --general: General level check.
    --rough:   Rough level check.
    --help:    Print this message and exit.

ARGUMENTS:
    Directories include Java source files, and Java source files.
$ java -jar target/9rules-1.0-SNAPSHOT.jar src/main/java

Dependent libraries

Feature

What you can do

Things impossible

Try object-oriented exercise

What is necessary for compliance.

Very difficult to comply with.

Recommended Posts

Check compliance with object-oriented exercise
Check CSV value with RSpec
Integer check method with ruby
Check performance quickly with irb
Object-oriented (java) with Strike Gundam
Exciting environment check with mkmf
[Java 8] Duplicate deletion (& duplicate check) with Stream
Study Flilnk with Kafka Exercise Code
Study Flilnk with Elasticsearch Exercise Code
Molecular phylogenetics exercise with docker (working)
[Java] Element existence check with Stream
Easy input check with Bean Validation!
Check date correlation with Spring Boot
Check when moss with SimpleDateFormat parse
Check your internet connection with Alamofire