Skip to content
forked from l3r8yJ/oop-cop

The Maven plugin for checking class mutability within your project

License

Notifications You must be signed in to change notification settings

trapvpack/sa-tan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Managed By Self XDSD

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

codecov

A plugin for Maven that will let you know you have a problem if it sees setters in your project. When I talk about setters I don't mean method name signatures, I mean methods with a changeable object state

Examples

These classes are valid

import ru.l3r8y.annotations.Mutable;

class MyValidClass {
    private final String name;

    public MyValidClass(final String n) {
        this.name = n;
    }
}

@Mutable
class MarkedClass {
    private String name;

    public void setName(final String name) {
        this.name = name;
    }
}

This class is invalid

class MyInvalidClass {
    private String name;

    public MyValidClass(final String n) {
        this.name = n;
    }

    public void setName(final String name) {
        this.name = name;
    }
}

How to use

The plugin could be run using several approaches but for both of them you need at least Maven 3.8.+ and Java 8+.

Add as maven plugin into your pom.xml

<build>
  <plugins>
    <plugin>
      <groupId>ru.l3r8y</groupId>
      <artifactId>sa-tan</artifactId>
      <version>0.1.3</version>
      <executions>
        <execution>
          <goals>
            <goal>search</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

Run plugin directly

mvn ru.l3r8y:sa-tan:search

How to Contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

mvn clean install -Pqulice

About

The Maven plugin for checking class mutability within your project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.1%
  • Groovy 1.9%